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.expand();
|
||||||
await timezoneInput.selectRowByValue("Europe/London");
|
await timezoneInput.selectRowByValue("Europe/London");
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
timezoneInput.header().value(),
|
timezoneInput.header().value(),
|
||||||
"Europe/London",
|
"Europe/London",
|
||||||
"Timezone can be changed"
|
"Timezone can be changed"
|
||||||
);
|
);
|
||||||
|
|
||||||
const fromDate = query(`${modal} .from input[type=date]`);
|
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`);
|
const fromTime = selectKit(`${modal} .from .d-time-input .select-kit`);
|
||||||
await fromTime.expand();
|
await fromTime.expand();
|
||||||
await fromTime.selectRowByName("12:00");
|
await fromTime.selectRowByName("12:00");
|
||||||
|
|
||||||
const toDate = query(`${modal} .to input[type=date]`);
|
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`);
|
const toTime = selectKit(`${modal} .to .d-time-input .select-kit`);
|
||||||
await toTime.expand();
|
await toTime.expand();
|
||||||
await toTime.selectRowByName("13:00");
|
await toTime.selectRowByName("13:00");
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ discourseModule(
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
query("button").innerText,
|
query("button").innerText.trim(),
|
||||||
"Enable",
|
"Enable",
|
||||||
"it displays an enable button"
|
"it displays an enable button"
|
||||||
);
|
);
|
||||||
|
|
@ -56,7 +56,7 @@ discourseModule(
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
query("button").innerText,
|
query("button").innerText.trim(),
|
||||||
"Disable",
|
"Disable",
|
||||||
"it displays a disable button"
|
"it displays a disable button"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -20,24 +20,24 @@ discourseModule(
|
||||||
},
|
},
|
||||||
|
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
query("table tbody tr:nth-child(1) td:nth-child(1)").innerText,
|
query("table tbody tr:nth-child(1) td:nth-child(1)").innerText.trim(),
|
||||||
"2022-01-01",
|
"2022-01-01",
|
||||||
"it displays the first holiday date"
|
"it displays the first holiday date"
|
||||||
);
|
);
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
query("table tbody tr:nth-child(1) td:nth-child(2)").innerText,
|
query("table tbody tr:nth-child(1) td:nth-child(2)").innerText.trim(),
|
||||||
"New Year's Day",
|
"New Year's Day",
|
||||||
"it displays the first holiday name"
|
"it displays the first holiday name"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
query("table tbody tr:nth-child(2) td:nth-child(1)").innerText,
|
query("table tbody tr:nth-child(2) td:nth-child(1)").innerText.trim(),
|
||||||
"2022-01-17",
|
"2022-01-17",
|
||||||
"it displays the second holiday date"
|
"it displays the second holiday date"
|
||||||
);
|
);
|
||||||
assert.equal(
|
assert.strictEqual(
|
||||||
query("table tbody tr:nth-child(2) td:nth-child(2)").innerText,
|
query("table tbody tr:nth-child(2) td:nth-child(2)").innerText.trim(),
|
||||||
"Martin Luther King, Jr. Day",
|
"Martin Luther King, Jr. Day",
|
||||||
"it displays the second holiday name"
|
"it displays the second holiday name"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue