mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Updated tests
This commit is contained in:
@@ -165,7 +165,7 @@ export default {
|
||||
updateQueries: {
|
||||
TalkAdmin_Community: (prev) => {
|
||||
const updated = update(prev, {
|
||||
users: {
|
||||
flaggedUsers: {
|
||||
nodes: {$apply: (nodes) => nodes.filter((node) => node.id !== id)},
|
||||
},
|
||||
});
|
||||
@@ -177,13 +177,13 @@ export default {
|
||||
updateQueries: {
|
||||
TalkAdmin_Community: (prev) => {
|
||||
const updated = update(prev, {
|
||||
users: {
|
||||
flaggedUsers: {
|
||||
nodes: {$apply: (nodes) => nodes.filter((node) => node.id !== userId)},
|
||||
},
|
||||
});
|
||||
return updated;
|
||||
}
|
||||
}
|
||||
},
|
||||
}),
|
||||
UpdateSettings: ({variables: {input}}) => ({
|
||||
updateQueries: {
|
||||
|
||||
@@ -62,6 +62,7 @@ module.exports = {
|
||||
},
|
||||
'admin suspends the user': (client) => {
|
||||
const adminPage = client.page.admin();
|
||||
const community = client.page.admin().section.community;
|
||||
|
||||
adminPage
|
||||
.waitForElementVisible('@usernameDialog')
|
||||
@@ -72,6 +73,9 @@ module.exports = {
|
||||
.waitForElementVisible('@usernameDialogStep1')
|
||||
.waitForElementVisible('@usernameDialogSuspend')
|
||||
.click('@usernameDialogSuspend');
|
||||
|
||||
community
|
||||
.waitForElementNotPresent('@flaggedUser');
|
||||
},
|
||||
'admin logs out': (client) => {
|
||||
client.page.admin().logout();
|
||||
|
||||
Reference in New Issue
Block a user