From 272012c0207f3cdd8e0f8c4cf8807897f1e229c2 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Tue, 8 Jan 2019 18:45:36 +0100 Subject: [PATCH] Further condensed testing --- cypress/integration/AboutMeAndLocation.feature | 10 ++++------ cypress/integration/common/steps.js | 10 ++++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cypress/integration/AboutMeAndLocation.feature b/cypress/integration/AboutMeAndLocation.feature index d013823c0..9d0760a04 100644 --- a/cypress/integration/AboutMeAndLocation.feature +++ b/cypress/integration/AboutMeAndLocation.feature @@ -11,17 +11,16 @@ Feature: About me and and location And I am on the "settings" page Scenario: I change my name - When save "Hansi" as my new name + When I save "Hansi" as my new name Then I can see my new name "Hansi" when I click on my profile picture in the top right When I refresh the page Then I can see my new name "Hansi" when I click on my profile picture in the top right Scenario Outline: I set my location to "" - When I enter "" as my location - And I press "Save" + When I save "" as my location And I visit the "profile/peter-lustig" page - Then I can see a "" as my location + Then I can see "" as my location Examples: Location | location | type | @@ -30,8 +29,7 @@ Feature: About me and and location | Germany | Country | Scenario: I write about me - When I enter "Some text about me" to about me - And I press "Save" + When I save "Some text about me" to about me And I visit the "profile/peter-lustig" page Then I can see a "Some text about me" as my about me diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 4e7ac892d..5619174d9 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -161,18 +161,20 @@ Then('I can see a list of tags ordered by user and post count:', table => { lastColumnIsSortedInDescendingOrder() }) -When('I enter {string} as my location', location => { +When('I save {string} as my location', location => { cy.get('input[id=city]').type(location) cy.get('.ds-select-option') .contains(location) .click() + cy.contains('Save').click() }) -When('I enter {string} to about me', text => { +When('I save {string} to about me', text => { cy.get('textarea[id=bio]') .clear() .type(text) + cy.contains('Save').click() }) -When('save {string} as my new name', name => { +When('I save {string} as my new name', name => { cy.get('input[id=name]') .clear() .type(name) @@ -189,7 +191,7 @@ Then( When('I press {string}', label => { cy.contains(label).click() }) -Then('I can see a {string} as my location', location => { +Then('I can see {string} as my location', location => { cy.contains(location) }) Then('I can see a {string} as my about me', about => {