Skip to content

Commit 20dfd26

Browse files
committed
Issue #2453 - Adds functional test for label filtering
1 parent f1a7812 commit 20dfd26

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/functional/labels-auth.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,35 @@ registerSuite("Labels (auth)", {
109109
assert.notInclude("is-active", className);
110110
})
111111
.end();
112+
},
113+
114+
"Label editor filters label list based on entered text": function() {
115+
var count = 0;
116+
return FunctionalHelpers.openPage(
117+
this,
118+
url("/issues/100"),
119+
".js-LabelEditorLauncher",
120+
true /* longerTimeout */
121+
)
122+
.findByCssSelector(".js-LabelEditorLauncher")
123+
.click()
124+
.end()
125+
.findByCssSelector(".js-label-search")
126+
.type("tacos")
127+
.end()
128+
.sleep(1000)
129+
.findAllByXpath(
130+
'//label[contains (@class, "label-editor-list-item") and not(@style="display: none;")]'
131+
)
132+
.then(function(elements) {
133+
count = elements.length;
134+
assert.deepEqual(
135+
1,
136+
count,
137+
"Entering label name in search box filters to matching label"
138+
);
139+
})
140+
.end();
112141
}
113142
}
114143
});

0 commit comments

Comments
 (0)