diff options
author | Philip Chimento <philip@endlessm.com> | 2014-11-18 11:57:51 -0800 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2014-11-18 11:57:51 -0800 |
commit | 5b050ccdc07e642580778443d91cd8d880dace9e (patch) | |
tree | ef4c7ce30e6be664fa2907f47deca49572c58882 /test/endless/testTopbarNavButton.js | |
parent | 72fbe1cd2fe49a7982e248181a20f1651131e089 (diff) |
TopbarNavButton works with no_show_all
Previously, if you created an Endless.TopbarNavButton with no_show_all
set to TRUE, and subsequently called show() on it, it would not become
visible, because the child widgets were still not shown. By showing them
at construct time, we solve this problem because they immediately become
visible when the TopbarNavButton widget itself is shown.
[endlessm/eos-sdk#2495]
Diffstat (limited to 'test/endless/testTopbarNavButton.js')
-rw-r--r-- | test/endless/testTopbarNavButton.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/endless/testTopbarNavButton.js b/test/endless/testTopbarNavButton.js new file mode 100644 index 0000000..50849d2 --- /dev/null +++ b/test/endless/testTopbarNavButton.js @@ -0,0 +1,17 @@ +const Endless = imports.gi.Endless; +const Gtk = imports.gi.Gtk; +const Lang = imports.lang; + +Gtk.init(null); + +describe('TopbarNavButton', function () { + it('works correctly with no_show_all', function () { + let button = new Endless.TopbarNavButton({ + no_show_all: true, + }); + button.show(); + expect(button.visible).toBe(true); + expect(button.back_button.visible).toBe(true); + expect(button.forward_button.visible).toBe(true); + }); +}); |