mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
select-kit refactoring
* better test helper * more reliable tests * more consistent use of data-value/data-name/title/aria-label everywhere: header and rows
This commit is contained in:
@ -5,15 +5,15 @@ componentTest('default', {
|
||||
template: '{{categories-admin-dropdown}}',
|
||||
|
||||
test(assert) {
|
||||
const $selectKit = selectKit('.categories-admin-dropdown');
|
||||
const subject = selectKit();
|
||||
|
||||
assert.equal($selectKit.el.find(".d-icon-bars").length, 1);
|
||||
assert.equal($selectKit.el.find(".d-icon-caret-down").length, 1);
|
||||
assert.equal(subject.el().find(".d-icon-bars").length, 1);
|
||||
assert.equal(subject.el().find(".d-icon-caret-down").length, 1);
|
||||
|
||||
expandSelectKit();
|
||||
subject.expand();
|
||||
|
||||
andThen(() => {
|
||||
assert.equal($selectKit.rowByValue("create").name(), "New Category");
|
||||
assert.equal(subject.rowByValue("create").name(), "New Category");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user