diff --git a/features/settings_page/team.feature b/features/settings_page/team.feature index 5db5997ce..3716ff51b 100644 --- a/features/settings_page/team.feature +++ b/features/settings_page/team.feature @@ -23,19 +23,12 @@ Feature: Team settings Then I click "Save" button And I should see "BioSistemika Process Company" on "#team-name" element - @javascript - Scenario: Successfully adds team description - Given I'm on "BioSistemika Process" team settings page - Then I click on ".description-label" element - And I fill in "I was on Triglav one summer." in "team_description" textarea field - Then I click "Save" button - And I should see "I was on Triglav one summer." on ".description-label" element - @javascript Scenario: Successfully changes team description Given I'm on "BioSistemika Process" team settings page Then I click on ".description-label" element - And I change "Lorem ipsum dolor sit amet, consectetuer adipiscing eli." with "I was on Triglav one summer." in "team_description" textarea field + Then I should not see "I was on Triglav one summer." on ".description-label" element + And I fill in "I was on Triglav one summer." in "team_description" textarea field Then I click "Save" button And I should see "I was on Triglav one summer." on ".description-label" element diff --git a/features/step_definitions/shared_steps.rb b/features/step_definitions/shared_steps.rb index 4aa9dced0..01a3550bd 100644 --- a/features/step_definitions/shared_steps.rb +++ b/features/step_definitions/shared_steps.rb @@ -128,6 +128,11 @@ Then(/^I change "([^"]*)" with "([^"]*)" in "([^"]*)" textarea field$/) do |old_ textarea.set(new_text) end +Then(/^I should not see "([^"]*)" on "([^"]*)" element$/) do |text, element| + wait_for_ajax + expect(find(element)).not_to have_content(text) +end + Then(/^I should see "([^"]*)" on "([^"]*)" element$/) do |text, element| wait_for_ajax expect(find(element)).to have_content(text)