From 483b306e693e5be15c41082d90733a4adcb6c457 Mon Sep 17 00:00:00 2001 From: okbel Date: Wed, 20 Dec 2017 20:09:51 -0300 Subject: [PATCH] Updated tests --- client/coral-admin/src/graphql/index.js | 6 +++--- test/e2e/specs/04_userStatus.js | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/coral-admin/src/graphql/index.js b/client/coral-admin/src/graphql/index.js index 419e34fe8..545a05809 100644 --- a/client/coral-admin/src/graphql/index.js +++ b/client/coral-admin/src/graphql/index.js @@ -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: { diff --git a/test/e2e/specs/04_userStatus.js b/test/e2e/specs/04_userStatus.js index bc1c85b9c..b87817e8b 100644 --- a/test/e2e/specs/04_userStatus.js +++ b/test/e2e/specs/04_userStatus.js @@ -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();