[gjs: 2/6] tests: Add pending test for composite template subclass
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/6] tests: Add pending test for composite template subclass
- Date: Sat, 27 Jan 2018 22:20:58 +0000 (UTC)
commit fc6240ec8f996f200b7b2c48076fd70518670d6e
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Jan 20 22:51:20 2018 -0800
tests: Add pending test for composite template subclass
This test was sitting in a patch in Bugzilla. Add it, but mark it as
pending until the functionality is fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=768790
installed-tests/js/testGtk.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/installed-tests/js/testGtk.js b/installed-tests/js/testGtk.js
index 7071935..736772e 100755
--- a/installed-tests/js/testGtk.js
+++ b/installed-tests/js/testGtk.js
@@ -64,8 +64,12 @@ const MyComplexGtkSubclassFromResource = GObject.registerClass({
}
});
-function validateTemplate(description, ClassName) {
- describe(description, function () {
+const SubclassSubclass = GObject.registerClass(
+ class SubclassSubclass extends MyComplexGtkSubclass {});
+
+function validateTemplate(description, ClassName, pending=false) {
+ let suite = pending ? xdescribe : describe;
+ suite(description, function () {
let win, content;
beforeEach(function () {
win = new Gtk.Window({ type: Gtk.WindowType.TOPLEVEL });
@@ -100,6 +104,7 @@ describe('Gtk overrides', function () {
validateTemplate('UI template', MyComplexGtkSubclass);
validateTemplate('UI template from resource', MyComplexGtkSubclassFromResource);
+ validateTemplate('Class inheriting from template class', SubclassSubclass, true);
it('sets CSS names on classes', function () {
expect(Gtk.Widget.get_css_name.call(MyComplexGtkSubclass)).toEqual('complex-subclass');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]