mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +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({
|
||||
e2e: {
|
||||
projectId: "qa7fe2",
|
||||
defaultCommandTimeout: 10000,
|
||||
chromeWebSecurity: false,
|
||||
baseUrl: "http://localhost:3000",
|
||||
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', () => {
|
||||
cy.contains('.base-card', 'The Truth about the Holocaust')
|
||||
.find('.content-menu .base-button')
|
||||
.click({force: true})
|
||||
.click()
|
||||
|
||||
cy.get('.popover .ds-menu-item-link')
|
||||
.contains('Report Post')
|
||||
|
||||
@ -10,7 +10,7 @@ Given('somebody reported the following posts:', table => {
|
||||
cy.factory()
|
||||
.build('user', {}, 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) {
|
||||
reportId
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import { Given } from "@badeball/cypress-cucumber-preprocessor";
|
||||
|
||||
Given("there is an annoying user who has muted me", () => {
|
||||
cy.neode()
|
||||
.first("User", {
|
||||
.firstOf("User", {
|
||||
role: 'moderator'
|
||||
})
|
||||
.then(mutedUser => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user