mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix ReportContent.feature
This commit is contained in:
parent
4db242933f
commit
41cf347f21
@ -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"
|
||||
|
||||
@ -64,7 +64,7 @@ When(
|
||||
)
|
||||
|
||||
When('I click on the author', () => {
|
||||
cy.get('a.author')
|
||||
cy.get('a.user')
|
||||
.first()
|
||||
.click()
|
||||
.wait(200)
|
||||
|
||||
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user