Fix cypress tests

This commit is contained in:
roschaefer 2019-11-12 17:37:16 +01:00
parent 7c278d7c7f
commit edbb0c3d1f
3 changed files with 9 additions and 2 deletions

View File

@ -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);
});
});

View File

@ -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:

View File

@ -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