mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
replaced eslint:recommended with prettier
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module.exports = {
|
||||
|
||||
before: (client) => {
|
||||
before: client => {
|
||||
client.setWindowPosition(0, 0);
|
||||
client.resizeWindow(1600, 1200);
|
||||
},
|
||||
@@ -12,17 +11,17 @@ module.exports = {
|
||||
done();
|
||||
},
|
||||
|
||||
after: (client) => {
|
||||
after: client => {
|
||||
client.end();
|
||||
},
|
||||
|
||||
'admin logs in': (client) => {
|
||||
'admin logs in': client => {
|
||||
const adminPage = client.page.admin();
|
||||
const {testData: {admin}} = client.globals;
|
||||
const { testData: { admin } } = client.globals;
|
||||
|
||||
adminPage.navigateAndLogin(admin);
|
||||
},
|
||||
'admin flags users username as offensive': (client) => {
|
||||
'admin flags users username as offensive': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
|
||||
const comments = embedStream.navigate().ready();
|
||||
@@ -43,7 +42,7 @@ module.exports = {
|
||||
.waitForElementVisible('@popUpText')
|
||||
.click('@continueButton');
|
||||
},
|
||||
'admin goes to Reported Usernames': (client) => {
|
||||
'admin goes to Reported Usernames': client => {
|
||||
const adminPage = client.page.admin();
|
||||
|
||||
const community = adminPage
|
||||
@@ -55,48 +54,47 @@ module.exports = {
|
||||
.waitForElementVisible('@flaggedAccountsContainer')
|
||||
.waitForElementVisible('@flaggedUser');
|
||||
},
|
||||
'admin rejects the user flag': (client) => {
|
||||
'admin rejects the user flag': client => {
|
||||
const community = client.page.admin().section.community;
|
||||
|
||||
community
|
||||
.waitForElementVisible('@flaggedUserRejectButton')
|
||||
.click('@flaggedUserRejectButton');
|
||||
},
|
||||
'admin suspends the user': (client) => {
|
||||
'admin suspends the user': client => {
|
||||
const community = client.page.admin().section.community;
|
||||
const usernameDialog = client.page.admin().section.usernameDialog;
|
||||
|
||||
usernameDialog
|
||||
.waitForElementVisible('@buttons')
|
||||
.waitForElementVisible('@step0')
|
||||
.waitForElementVisible('@suspend')
|
||||
.waitForElementVisible('@step0')
|
||||
.waitForElementVisible('@suspend')
|
||||
.click('@suspend')
|
||||
.waitForElementVisible('@step1')
|
||||
.waitForElementVisible('@step1')
|
||||
.waitForElementVisible('@suspend')
|
||||
.click('@suspend');
|
||||
|
||||
community
|
||||
.waitForElementNotPresent('@flaggedUser');
|
||||
|
||||
community.waitForElementNotPresent('@flaggedUser');
|
||||
},
|
||||
'admin logs out': (client) => {
|
||||
'admin logs out': client => {
|
||||
client.page.admin().logout();
|
||||
},
|
||||
'user logs in': (client) => {
|
||||
const {testData: {user}} = client.globals;
|
||||
'user logs in': client => {
|
||||
const { testData: { user } } = client.globals;
|
||||
const embedStream = client.page.embedStream();
|
||||
|
||||
embedStream
|
||||
.navigate()
|
||||
.ready()
|
||||
.openLoginPopup((popup) => popup.login(user));
|
||||
.openLoginPopup(popup => popup.login(user));
|
||||
},
|
||||
'user account is suspended, should see restricted message box': (client) => {
|
||||
'user account is suspended, should see restricted message box': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.section.comments;
|
||||
|
||||
comments.waitForElementVisible('@restrictedMessageBox');
|
||||
},
|
||||
'user should not be able to comment': (client) => {
|
||||
'user should not be able to comment': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.section.comments;
|
||||
|
||||
@@ -104,10 +102,10 @@ module.exports = {
|
||||
.waitForElementNotPresent('@commentBoxTextarea')
|
||||
.waitForElementNotPresent('@commentBoxPostButton');
|
||||
},
|
||||
'user picks another username': (client) => {
|
||||
'user picks another username': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.section.comments;
|
||||
const {testData: {user}} = client.globals;
|
||||
const { testData: { user } } = client.globals;
|
||||
|
||||
comments
|
||||
.waitForElementVisible('@changeUsernameInput')
|
||||
@@ -116,7 +114,7 @@ module.exports = {
|
||||
.click('@changeUsernameSubmitButton')
|
||||
.waitForElementNotPresent('@changeUsernameInput');
|
||||
},
|
||||
'user should be able to comment': (client) => {
|
||||
'user should be able to comment': client => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.section.comments;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user