mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
Updating tests to reflect graphql changes.
This commit is contained in:
+8
-6
@@ -1,8 +1,8 @@
|
||||
const Comments = require('../../models/comment');
|
||||
const Users = require('../../models/user');
|
||||
const Actions = require('../../models/action');
|
||||
const Assets = require('../../models/asset');
|
||||
const Settings = require('../../models/setting');
|
||||
const Comments = require('../../services/comments');
|
||||
const Users = require('../../services/users');
|
||||
const Actions = require('../../services/actions');
|
||||
const Assets = require('../../services/assets');
|
||||
const Settings = require('../../services/settings');
|
||||
const globals = require('./globals');
|
||||
|
||||
/* Create an array of comments */
|
||||
@@ -22,4 +22,6 @@ module.exports.users = (users) => Users.createLocalUsers(users);
|
||||
module.exports.actions = (actions) => Actions.create(actions);
|
||||
|
||||
/* Update a setting */
|
||||
module.exports.settings = (setting) => Settings.init().then(() => Settings.updateSettings(setting));
|
||||
module.exports.settings = (setting) => Settings.init().then(() => {
|
||||
Settings.updateSettings(setting);
|
||||
});
|
||||
|
||||
@@ -127,10 +127,10 @@ module.exports = {
|
||||
selector: '.comment .coral-plugin-flags-popup'
|
||||
},
|
||||
flagCommentOption: {
|
||||
selector: '.comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="comments"]'
|
||||
selector: '.comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="COMMENTS"]'
|
||||
},
|
||||
flagUsernameOption: {
|
||||
selector: '.comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="user"]'
|
||||
selector: '.comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="USERS"]'
|
||||
},
|
||||
flagOtherOption: {
|
||||
selector: '.comment .coral-plugin-flags-popup .coral-plugin-flags-popup-radio-label[for="other"]'
|
||||
|
||||
@@ -170,7 +170,7 @@ module.exports = {
|
||||
|
||||
// Verify that comment count is correct
|
||||
client.waitForElementVisible('.coral-plugin-comment-count-text', 2000)
|
||||
.assert.containsText('.coral-plugin-comment-count-text', '1 Comment');
|
||||
.assert.containsText('.coral-plugin-comment-count-text', '2 Comments');
|
||||
done();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = {
|
||||
embedStreamPage
|
||||
.signUp({
|
||||
email: `visitor_${Date.now()}@test.com`,
|
||||
displayName: 'visitor',
|
||||
displayName: `visitor${Date.now()}`,
|
||||
pass: 'testtest'
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user