mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
improve erratic test
This commit is contained in:
@ -37,19 +37,19 @@ QUnit.test('replying to post - reply_as_private_message', assert => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('replying to post - reply_to_topic', assert => {
|
QUnit.test('replying to post - reply_to_topic', async assert => {
|
||||||
const composerActions = selectKit('.composer-actions');
|
const composerActions = selectKit('.composer-actions');
|
||||||
|
|
||||||
visit('/t/internationalization-localization/280');
|
await visit('/t/internationalization-localization/280');
|
||||||
click('article#post_3 button.reply');
|
await click('article#post_3 button.reply');
|
||||||
fillIn('.d-editor-input', 'test replying to topic when initially replied to post');
|
await fillIn('.d-editor-input', 'test replying to topic when initially replied to post');
|
||||||
composerActions.expand().selectRowByValue('reply_to_topic');
|
|
||||||
|
|
||||||
andThen(() => {
|
await composerActions.expandAwait();
|
||||||
assert.equal(find('.action-title .topic-link').text().trim(), 'Internationalization / localization');
|
await composerActions.selectRowByValueAwait('reply_to_topic');
|
||||||
assert.equal(find('.action-title .topic-link').attr("href"), '/t/internationalization-localization/280');
|
|
||||||
assert.equal(find('.d-editor-input').val(), 'test replying to topic when initially replied to post');
|
assert.equal(find('.action-title .topic-link').text().trim(), 'Internationalization / localization');
|
||||||
});
|
assert.equal(find('.action-title .topic-link').attr("href"), '/t/internationalization-localization/280');
|
||||||
|
assert.equal(find('.d-editor-input').val(), 'test replying to topic when initially replied to post');
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('replying to post - toggle_whisper', assert => {
|
QUnit.test('replying to post - toggle_whisper', assert => {
|
||||||
|
@ -124,6 +124,10 @@ function selectKit(selector) { // eslint-disable-line no-unused-vars
|
|||||||
return selectKit(selector);
|
return selectKit(selector);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectRowByValueAwait: function(value) {
|
||||||
|
return selectKitSelectRowByValue(value, selector);
|
||||||
|
},
|
||||||
|
|
||||||
selectRowByValue: function(value) {
|
selectRowByValue: function(value) {
|
||||||
selectKitSelectRowByValue(value, selector);
|
selectKitSelectRowByValue(value, selector);
|
||||||
return selectKit(selector);
|
return selectKit(selector);
|
||||||
|
Reference in New Issue
Block a user