mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fix reporting e2e tests
This commit is contained in:
parent
c218a550d2
commit
ad1ee56064
@ -37,6 +37,7 @@ const { parsed } = dotenv.config({ path: '../backend/.env' })
|
|||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
projectId: "qa7fe2",
|
projectId: "qa7fe2",
|
||||||
|
defaultCommandTimeout: 10000,
|
||||||
chromeWebSecurity: false,
|
chromeWebSecurity: false,
|
||||||
baseUrl: "http://localhost:3000",
|
baseUrl: "http://localhost:3000",
|
||||||
specPattern: "cypress/e2e/**/*.feature",
|
specPattern: "cypress/e2e/**/*.feature",
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor";
|
|||||||
When('I click on "Report Post" from the content menu of the post', () => {
|
When('I click on "Report Post" from the content menu of the post', () => {
|
||||||
cy.contains('.base-card', 'The Truth about the Holocaust')
|
cy.contains('.base-card', 'The Truth about the Holocaust')
|
||||||
.find('.content-menu .base-button')
|
.find('.content-menu .base-button')
|
||||||
.click({force: true})
|
.click()
|
||||||
|
|
||||||
cy.get('.popover .ds-menu-item-link')
|
cy.get('.popover .ds-menu-item-link')
|
||||||
.contains('Report Post')
|
.contains('Report Post')
|
||||||
|
|||||||
@ -10,7 +10,7 @@ Given('somebody reported the following posts:', table => {
|
|||||||
cy.factory()
|
cy.factory()
|
||||||
.build('user', {}, submitter)
|
.build('user', {}, submitter)
|
||||||
.authenticateAs(submitter)
|
.authenticateAs(submitter)
|
||||||
.mutate(gql`mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
.mutate(`mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) {
|
||||||
fileReport(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) {
|
fileReport(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) {
|
||||||
reportId
|
reportId
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Given } from "@badeball/cypress-cucumber-preprocessor";
|
|||||||
|
|
||||||
Given("there is an annoying user who has muted me", () => {
|
Given("there is an annoying user who has muted me", () => {
|
||||||
cy.neode()
|
cy.neode()
|
||||||
.first("User", {
|
.firstOf("User", {
|
||||||
role: 'moderator'
|
role: 'moderator'
|
||||||
})
|
})
|
||||||
.then(mutedUser => {
|
.then(mutedUser => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user