Fix ReportContent.feature

This commit is contained in:
Robert Schäfer 2019-03-16 19:41:56 +01:00
parent 4db242933f
commit 41cf347f21
3 changed files with 22 additions and 23 deletions

View File

@ -25,13 +25,13 @@
slot="default"
slot-scope="{openMenu, closeMenu, isOpen}"
>
<div
@mouseover="openMenu(true)"
@mouseleave="closeMenu(true)"
<nuxt-link
:to="userLink"
:class="['user', isOpen && 'active']"
>
<nuxt-link
:to="userLink"
:class="['user', isOpen && 'active']"
<div
@mouseover="openMenu(true)"
@mouseleave="closeMenu(true)"
>
<div style="display: inline-block; float: left; margin-right: 4px; height: 100%; vertical-align: middle;">
<ds-avatar
@ -49,8 +49,8 @@
{{ user.name | truncate(trunc, 18) }}
</b>
</div>
</nuxt-link>
</div>
</div>
</nuxt-link>
</template>
<template
slot="popover"

View File

@ -64,7 +64,7 @@ When(
)
When('I click on the author', () => {
cy.get('a.author')
cy.get('a.user')
.first()
.click()
.wait(200)

View File

@ -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 => {