Created
December 7, 2017 16:25
-
-
Save joemsak/771ae438953133230e7093f0ef0eaabf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scenario "Upload 2 .jpg screenshots" do | |
within(".screenshots.incomplete") do | |
click_link "Upload screenshots of your app" | |
end | |
attach_file( | |
"Select up to 6 screenshots", | |
Rails.root + "spec/support/fixtures/screenshot.jpg" | |
) | |
click_button "Upload" | |
within(".screenshots.complete") do | |
expect(page).not_to have_link("Upload screenshots of your app") | |
expect(page).to have_content("Your team has uploaded 1 screenshot") | |
click_link "Make changes to your screenshots" | |
end | |
within(find_all(".field--file-upload")[1]) do | |
attach_file( | |
"Select up to 6 screenshots", | |
Rails.root + "spec/support/fixtures/screenshot.jpg" | |
) | |
end | |
click_button "Upload" | |
within(".screenshots.complete") do | |
expect(page).to have_content("Your team has uploaded 2 screenshots") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment