DEV: Fix test flakyness (#305)
This commit is contained in:
parent
799c3515ce
commit
3c5e9f3e1d
|
|
@ -26,21 +26,21 @@ acceptance("Post event - composer", function (needs) {
|
|||
);
|
||||
await timezoneInput.expand();
|
||||
await timezoneInput.selectRowByValue("Europe/London");
|
||||
assert.equal(
|
||||
assert.strictEqual(
|
||||
timezoneInput.header().value(),
|
||||
"Europe/London",
|
||||
"Timezone can be changed"
|
||||
);
|
||||
|
||||
const fromDate = query(`${modal} .from input[type=date]`);
|
||||
fillIn(fromDate, "2022-07-01");
|
||||
await fillIn(fromDate, "2022-07-01");
|
||||
|
||||
const fromTime = selectKit(`${modal} .from .d-time-input .select-kit`);
|
||||
await fromTime.expand();
|
||||
await fromTime.selectRowByName("12:00");
|
||||
|
||||
const toDate = query(`${modal} .to input[type=date]`);
|
||||
fillIn(toDate, "2022-07-01");
|
||||
await fillIn(toDate, "2022-07-01");
|
||||
const toTime = selectKit(`${modal} .to .d-time-input .select-kit`);
|
||||
await toTime.expand();
|
||||
await toTime.selectRowByName("13:00");
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ discourseModule(
|
|||
|
||||
async test(assert) {
|
||||
assert.equal(
|
||||
query("button").innerText,
|
||||
query("button").innerText.trim(),
|
||||
"Enable",
|
||||
"it displays an enable button"
|
||||
);
|
||||
|
|
@ -56,7 +56,7 @@ discourseModule(
|
|||
|
||||
async test(assert) {
|
||||
assert.equal(
|
||||
query("button").innerText,
|
||||
query("button").innerText.trim(),
|
||||
"Disable",
|
||||
"it displays a disable button"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -20,24 +20,24 @@ discourseModule(
|
|||
},
|
||||
|
||||
async test(assert) {
|
||||
assert.equal(
|
||||
query("table tbody tr:nth-child(1) td:nth-child(1)").innerText,
|
||||
assert.strictEqual(
|
||||
query("table tbody tr:nth-child(1) td:nth-child(1)").innerText.trim(),
|
||||
"2022-01-01",
|
||||
"it displays the first holiday date"
|
||||
);
|
||||
assert.equal(
|
||||
query("table tbody tr:nth-child(1) td:nth-child(2)").innerText,
|
||||
assert.strictEqual(
|
||||
query("table tbody tr:nth-child(1) td:nth-child(2)").innerText.trim(),
|
||||
"New Year's Day",
|
||||
"it displays the first holiday name"
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
query("table tbody tr:nth-child(2) td:nth-child(1)").innerText,
|
||||
assert.strictEqual(
|
||||
query("table tbody tr:nth-child(2) td:nth-child(1)").innerText.trim(),
|
||||
"2022-01-17",
|
||||
"it displays the second holiday date"
|
||||
);
|
||||
assert.equal(
|
||||
query("table tbody tr:nth-child(2) td:nth-child(2)").innerText,
|
||||
assert.strictEqual(
|
||||
query("table tbody tr:nth-child(2) td:nth-child(2)").innerText.trim(),
|
||||
"Martin Luther King, Jr. Day",
|
||||
"it displays the second holiday name"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue