summaryrefslogtreecommitdiff
path: root/test/endless
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2015-08-03 15:46:28 -0700
committerMatt Watson <mattdangerw@gmail.com>2015-08-06 14:01:54 -0700
commitb867b717bb94804427cc4bba6b54c485cb92c352 (patch)
treefdcd6501aca7540ec4c7f23b8981ab83f47d0f77 /test/endless
parent259f874fa34bf68c085eb7a404c2dec9d622dc14 (diff)
search_box: add function to set text programmatically
This way we can set the search box text without triggering the signals for settings autocomplete entries [endlessm/eos-sdk#3442]
Diffstat (limited to 'test/endless')
-rw-r--r--test/endless/testSearchBox.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/endless/testSearchBox.js b/test/endless/testSearchBox.js
new file mode 100644
index 0000000..9d8686d
--- /dev/null
+++ b/test/endless/testSearchBox.js
@@ -0,0 +1,20 @@
+const Endless = imports.gi.Endless;
+const Gtk = imports.gi.Gtk;
+
+const Utils = imports.test.utils;
+
+Gtk.init(null);
+
+describe('SearchBox', function () {
+ let search_box;
+
+ beforeEach(function () {
+ search_box = new Endless.SearchBox();
+ });
+
+ it('emits no signal when you change the text programmatically', function () {
+ search_box.connect('text-changed', () => fail());
+ search_box.set_text_programmatically('some text');
+ Utils.update_gui();
+ });
+});