From edbb0c3d1f78afad94db2d12e88fc4e99edc630a Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 12 Nov 2019 17:37:16 +0100 Subject: [PATCH] Fix cypress tests --- cypress/integration/common/steps.js | 7 ++++++- cypress/integration/notifications/Mentions.feature | 1 + cypress/integration/post/WritePost.feature | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 493c54e38..ec63a81c8 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -245,6 +245,11 @@ Then("I select a category", () => { .click(); }); +When("I choose a language for the post", () => { + cy.get('.ds-flex-item > .ds-form-item .ds-select ') + .click().get('.ds-select-option').first().click() +}) + Then("the post shows up on the landing page at position {int}", index => { cy.openPage("landing"); const selector = `.post-card:nth-child(${index}) > .ds-card-content`; @@ -536,4 +541,4 @@ Then("I see only one post with the title {string}", title => { .find(".post-link") .should("have.length", 1); cy.get(".main-container").contains(".post-link", title); -}); \ No newline at end of file +}); diff --git a/cypress/integration/notifications/Mentions.feature b/cypress/integration/notifications/Mentions.feature index 7523e3d05..810b77433 100644 --- a/cypress/integration/notifications/Mentions.feature +++ b/cypress/integration/notifications/Mentions.feature @@ -20,6 +20,7 @@ Feature: Notification for a mention """ And mention "@matt-rider" in the text And I select a category + And I choose a language for the post And I click on "Save" When I log out And I log in with the following credentials: diff --git a/cypress/integration/post/WritePost.feature b/cypress/integration/post/WritePost.feature index 461766532..c5762536e 100644 --- a/cypress/integration/post/WritePost.feature +++ b/cypress/integration/post/WritePost.feature @@ -17,7 +17,8 @@ Feature: Create a post Human Connection is a free and open-source social network for active citizenship. """ - Then I select a category + And I select a category + And I choose a language for the post And I click on "Save" Then I get redirected to ".../my-first-post" And the post was saved successfully