summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overrides/endless_private/topbar_nav_button.js2
-rw-r--r--test/endless/Makefile.am.inc1
-rw-r--r--test/endless/testTopbarNavButton.js17
3 files changed, 20 insertions, 0 deletions
diff --git a/overrides/endless_private/topbar_nav_button.js b/overrides/endless_private/topbar_nav_button.js
index ef79094..9f8f952 100644
--- a/overrides/endless_private/topbar_nav_button.js
+++ b/overrides/endless_private/topbar_nav_button.js
@@ -64,6 +64,8 @@ const TopbarNavButton = new Lang.Class({
this.add(this._back_button);
this.add(this._forward_button);
+ this._back_button.show();
+ this._forward_button.show();
},
get back_button() {
diff --git a/test/endless/Makefile.am.inc b/test/endless/Makefile.am.inc
index 536a878..5e83d2f 100644
--- a/test/endless/Makefile.am.inc
+++ b/test/endless/Makefile.am.inc
@@ -16,4 +16,5 @@ test_endless_run_tests_LDADD = $(TEST_LIBS)
javascript_tests += \
test/endless/testCustomContainer.js \
+ test/endless/testTopbarNavButton.js \
$(NULL)
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);
+ });
+});