mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: avoids test failing at some times of the day
This commit is contained in:
parent
1f3e9a4350
commit
87ada55e67
1 changed files with 6 additions and 6 deletions
|
@ -24,10 +24,10 @@ QUnit.test('autoclose - specific time', assert => {
|
||||||
click('.toggle-admin-menu');
|
click('.toggle-admin-menu');
|
||||||
click('.topic-admin-status-update button');
|
click('.topic-admin-status-update button');
|
||||||
expandSelectKit('.future-date-input-selector');
|
expandSelectKit('.future-date-input-selector');
|
||||||
selectKitSelectRow('later_today', { selector: '.future-date-input-selector' });
|
selectKitSelectRow('next_week', { selector: '.future-date-input-selector' });
|
||||||
|
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Later today');
|
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Next week');
|
||||||
const regex = /will automatically close in/g;
|
const regex = /will automatically close in/g;
|
||||||
const html = find('.future-date-input .topic-status-info').html().trim();
|
const html = find('.future-date-input .topic-status-info').html().trim();
|
||||||
assert.ok(regex.test(html));
|
assert.ok(regex.test(html));
|
||||||
|
@ -40,9 +40,9 @@ QUnit.test('autoclose', assert => {
|
||||||
click('.topic-admin-status-update button');
|
click('.topic-admin-status-update button');
|
||||||
expandSelectKit('.future-date-input-selector');
|
expandSelectKit('.future-date-input-selector');
|
||||||
|
|
||||||
selectKitSelectRow('later_today', { selector: '.future-date-input-selector' });
|
selectKitSelectRow('next_week', { selector: '.future-date-input-selector' });
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Later today');
|
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Next week');
|
||||||
const regex = /will automatically close in/g;
|
const regex = /will automatically close in/g;
|
||||||
const html = find('.future-date-input .topic-status-info').html().trim();
|
const html = find('.future-date-input .topic-status-info').html().trim();
|
||||||
assert.ok(regex.test(html));
|
assert.ok(regex.test(html));
|
||||||
|
@ -83,9 +83,9 @@ QUnit.test('close temporarily', assert => {
|
||||||
});
|
});
|
||||||
|
|
||||||
expandSelectKit('.future-date-input-selector');
|
expandSelectKit('.future-date-input-selector');
|
||||||
selectKitSelectRow('tomorrow', { selector: '.future-date-input-selector' });
|
selectKitSelectRow('next_week', { selector: '.future-date-input-selector' });
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Tomorrow');
|
assert.equal(selectKit('.future-date-input-selector').header.name(), 'Next week');
|
||||||
const regex = /will automatically open in/g;
|
const regex = /will automatically open in/g;
|
||||||
const html = find('.future-date-input .topic-status-info').html().trim();
|
const html = find('.future-date-input .topic-status-info').html().trim();
|
||||||
assert.ok(regex.test(html));
|
assert.ok(regex.test(html));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue