mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 04:21:52 +08:00
DEV: removes brittle test (#9977)
This commit is contained in:
parent
07774894a6
commit
ae52f5eaf5
@ -259,44 +259,6 @@ componentTest("prevents propagating click event on header", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
componentTest("focusAfterOnChange", {
|
|
||||||
template:
|
|
||||||
"{{d-button class='focus-me'}}{{single-select options=(hash focusAfterOnChange=focusAfterOnChange) value=value content=content onChange=onChange}}",
|
|
||||||
|
|
||||||
beforeEach() {
|
|
||||||
this.setProperties({
|
|
||||||
onChange: () => {
|
|
||||||
find(".focus-me").focus();
|
|
||||||
this.set("value", "foo");
|
|
||||||
},
|
|
||||||
content: DEFAULT_CONTENT,
|
|
||||||
value: DEFAULT_VALUE
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
async test(assert) {
|
|
||||||
this.set("focusAfterOnChange", true);
|
|
||||||
|
|
||||||
await this.subject.expand();
|
|
||||||
await this.subject.selectRowByIndex(0);
|
|
||||||
|
|
||||||
assert.ok(
|
|
||||||
document.activeElement.classList.contains("single-select-header"),
|
|
||||||
"it selects the header"
|
|
||||||
);
|
|
||||||
|
|
||||||
this.set("focusAfterOnChange", false);
|
|
||||||
|
|
||||||
await this.subject.expand();
|
|
||||||
await this.subject.selectRowByIndex(0);
|
|
||||||
|
|
||||||
assert.notOk(
|
|
||||||
document.activeElement.classList.contains("single-select-header"),
|
|
||||||
"it doesn’t select the header"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
componentTest("labelProperty", {
|
componentTest("labelProperty", {
|
||||||
template: '{{single-select labelProperty="foo" value=value content=content}}',
|
template: '{{single-select labelProperty="foo" value=value content=content}}',
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user