From d70030387d5a48ed6fe8f130aed0d3165fc8da7f Mon Sep 17 00:00:00 2001 From: mahula Date: Sat, 3 Jun 2023 07:14:59 +0200 Subject: [PATCH] fix reporting e2e tests --- cypress/cypress.config.js | 1 + .../I_click_on_Report_Post_from_the_content_menu_of_the_post.js | 2 +- .../there_is_an_annoying_user_who_has_muted_me.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/cypress.config.js b/cypress/cypress.config.js index 348b8f388..b099be7e7 100644 --- a/cypress/cypress.config.js +++ b/cypress/cypress.config.js @@ -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", diff --git a/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js index a5da04bfd..8588e156a 100644 --- a/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/I_click_on_Report_Post_from_the_content_menu_of_the_post.js @@ -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') diff --git a/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js b/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js index 71e29ce91..8d61afd61 100644 --- a/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js +++ b/cypress/support/step_definitions/Moderation.ReportContent/there_is_an_annoying_user_who_has_muted_me.js @@ -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 => {