Remove cypress changes.

This commit is contained in:
elweyn 2023-06-08 19:45:58 +02:00
parent 719f7c52b6
commit 31e1efd356
3 changed files with 5 additions and 4 deletions

View File

@ -37,8 +37,7 @@ const { parsed } = dotenv.config({ path: '../backend/.env' })
module.exports = defineConfig({ module.exports = defineConfig({
e2e: { e2e: {
projectId: "qa7fe2", projectId: "qa7fe2",
defaultCommandTimeout: 60000, defaultCommandTimeout: 10000,
pageLoadTimeout: 180000,
chromeWebSecurity: false, chromeWebSecurity: false,
baseUrl: "http://localhost:3000", baseUrl: "http://localhost:3000",
specPattern: "cypress/e2e/**/*.feature", specPattern: "cypress/e2e/**/*.feature",

View File

@ -49,8 +49,9 @@ Cypress.Commands.add(
'mutate', 'mutate',
{ prevSubject: true }, { prevSubject: true },
(graphQLClient, mutation, variables, response) => { (graphQLClient, mutation, variables, response) => {
return new Cypress.Promise((resolve, reject) => { return new Cypress.Promise(async (resolve, reject) => {
graphQLClient.request(mutation, variables).then(() => resolve(graphQLClient)) graphQLClient.request(mutation, variables).then(() => resolve(graphQLClient))
}) })
}) })

View File

@ -3,6 +3,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor";
When("mention {string} in the text", mention => { When("mention {string} in the text", mention => {
cy.get(".ProseMirror") cy.get(".ProseMirror")
.type(" @"); .type(" @");
cy.contains(".suggestion-list__item", mention) cy.get(".suggestion-list__item")
.contains(mention)
.click(); .click();
}); });