diff --git a/components/User.vue b/components/User.vue
index da4ca7f98..1c78b34cc 100644
--- a/components/User.vue
+++ b/components/User.vue
@@ -25,13 +25,13 @@
slot="default"
slot-scope="{openMenu, closeMenu, isOpen}"
>
-
+
+
{
- cy.get('a.author')
+ cy.get('a.user')
.first()
.click()
.wait(200)
diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js
index ec5f15602..eeb3a49d3 100644
--- a/cypress/integration/common/steps.js
+++ b/cypress/integration/common/steps.js
@@ -157,9 +157,9 @@ When('I press {string}', label => {
Given('we have the following posts in our database:', table => {
table.hashes().forEach(({ Author, ...postAttributes }) => {
const userAttributes = {
- name: Author,
- email: `${Author}@example.org`,
- password: '1234'
+ name: Author,
+ email: `${Author}@example.org`,
+ password: '1234'
}
postAttributes.deleted = Boolean(postAttributes.deleted)
const disabled = Boolean(postAttributes.disabled)
@@ -167,19 +167,18 @@ Given('we have the following posts in our database:', table => {
.create('User', userAttributes)
.authenticateAs(userAttributes)
.create('Post', postAttributes)
- if(disabled) {
- const moderatorParams = {
- email: 'moderator@example.org',
- role: 'moderator',
- password: '1234'
- }
- cy.factory()
- .create('User', moderatorParams)
- .authenticateAs(moderatorParams)
- .mutate('mutation($id: ID!) { disable(id: $id) }', postAttributes)
+ if (disabled) {
+ const moderatorParams = {
+ email: 'moderator@example.org',
+ role: 'moderator',
+ password: '1234'
}
+ cy.factory()
+ .create('User', moderatorParams)
+ .authenticateAs(moderatorParams)
+ .mutate('mutation($id: ID!) { disable(id: $id) }', postAttributes)
+ }
})
-
})
Then('I see a success message:', message => {