mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Fix the Cucumber tests so they pass
With the change of factories, single Cucumber test stopped working due to text in the test being dependant on a now randomly (Faker) defined value.
This commit is contained in:
parent
38d303b658
commit
208ef0bfe1
2 changed files with 7 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue