Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created December 7, 2017 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemsak/771ae438953133230e7093f0ef0eaabf to your computer and use it in GitHub Desktop.
Save joemsak/771ae438953133230e7093f0ef0eaabf to your computer and use it in GitHub Desktop.
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