Merge pull request #1459 from Ducz0r/lm-fix-cucumber-tests

Fix the Cucumber tests so they pass
This commit is contained in:
Miha Mencin 2019-01-21 17:20:42 +01:00 committed by GitHub
commit 58f06ac570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -23,19 +23,12 @@ Feature: Team settings
Then I click "Save" button Then I click "Save" button
And I should see "BioSistemika Process Company" on "#team-name" element 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 @javascript
Scenario: Successfully changes team description Scenario: Successfully changes team description
Given I'm on "BioSistemika Process" team settings page Given I'm on "BioSistemika Process" team settings page
Then I click on ".description-label" element 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 Then I click "Save" button
And I should see "I was on Triglav one summer." on ".description-label" element And I should see "I was on Triglav one summer." on ".description-label" element

View file

@ -128,6 +128,11 @@ Then(/^I change "([^"]*)" with "([^"]*)" in "([^"]*)" textarea field$/) do |old_
textarea.set(new_text) textarea.set(new_text)
end 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| Then(/^I should see "([^"]*)" on "([^"]*)" element$/) do |text, element|
wait_for_ajax wait_for_ajax
expect(find(element)).to have_content(text) expect(find(element)).to have_content(text)