mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: remove qunit rails fork and add a couple of async tests
This commit is contained in:
@@ -7,21 +7,20 @@ acceptance('Composer Actions', {
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('replying to post', assert => {
|
||||
QUnit.test('replying to post', async assert => {
|
||||
const composerActions = selectKit('.composer-actions');
|
||||
|
||||
visit('/t/internationalization-localization/280');
|
||||
click('article#post_3 button.reply');
|
||||
|
||||
composerActions.expand();
|
||||
await composerActions.expandAwait();
|
||||
|
||||
assert.equal(composerActions.rowByIndex(0).value(), 'reply_as_new_topic');
|
||||
assert.equal(composerActions.rowByIndex(1).value(), 'reply_as_private_message');
|
||||
assert.equal(composerActions.rowByIndex(2).value(), 'reply_to_topic');
|
||||
assert.equal(composerActions.rowByIndex(3).value(), 'toggle_whisper');
|
||||
assert.equal(composerActions.rowByIndex(4).value(), undefined);
|
||||
|
||||
andThen(() => {
|
||||
assert.equal(composerActions.rowByIndex(0).value(), 'reply_as_new_topic');
|
||||
assert.equal(composerActions.rowByIndex(1).value(), 'reply_as_private_message');
|
||||
assert.equal(composerActions.rowByIndex(2).value(), 'reply_to_topic');
|
||||
assert.equal(composerActions.rowByIndex(3).value(), 'toggle_whisper');
|
||||
assert.equal(composerActions.rowByIndex(4).value(), undefined);
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test('replying to post - reply_as_private_message', assert => {
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("User Directory");
|
||||
|
||||
QUnit.test("Visit Page", assert => {
|
||||
visit("/users");
|
||||
andThen(() => {
|
||||
assert.ok($('body.users-page').length, "has the body class");
|
||||
assert.ok(exists('.directory table tr'), "has a list of users");
|
||||
});
|
||||
QUnit.test("Visit Page", async assert => {
|
||||
await visit("/users");
|
||||
assert.ok($('body.users-page').length, "has the body class");
|
||||
assert.ok(exists('.directory table tr'), "has a list of users");
|
||||
});
|
||||
|
||||
QUnit.test("Visit All Time", assert => {
|
||||
visit("/users?period=all");
|
||||
andThen(() => {
|
||||
assert.ok(exists('.time-read'), "has time read column");
|
||||
});
|
||||
});
|
||||
QUnit.test("Visit All Time", async assert => {
|
||||
await visit("/users?period=all");
|
||||
assert.ok(exists('.time-read'), "has time read column");
|
||||
});
|
||||
|
||||
@@ -105,6 +105,10 @@ function selectKit(selector) { // eslint-disable-line no-unused-vars
|
||||
};
|
||||
|
||||
return {
|
||||
expandAwait: function() {
|
||||
return expandSelectKit(selector);
|
||||
},
|
||||
|
||||
expand: function() {
|
||||
expandSelectKit(selector);
|
||||
return selectKit(selector);
|
||||
|
||||
Reference in New Issue
Block a user