Skip to content

Instantly share code, notes, and snippets.

@LBRapid
Created May 3, 2016 15:00
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 LBRapid/c197fcc75a7756d5325ed934d9024677 to your computer and use it in GitHub Desktop.
Save LBRapid/c197fcc75a7756d5325ed934d9024677 to your computer and use it in GitHub Desktop.
require 'capybara_helper'
class LabPrintSaveTest < ActionDispatch::IntegrationTest
it 'save a design through print' do
stub_rack_proxy
insert_cassette 'capybara_lab_print_save'
visit_empty_lab
click_link 'add text'
fill_in 'addText_newText_textEntry', with: "test text"
click_button 'Next'
new_pop_up = window_opened_by { click_link 'Print This' }
within_window new_pop_up do
has_text? "Save Your Design"
fill_in 'Name Your Design:', with: "123"
fill_in 'Your Email Address:', with: "test@customink.com"
click_button 'Save and Print'
has_text? "PRINTED PROOF"
end
# close_active_window
has_no_text? 'PRINTED PROOF'
has_text? 'Save Completed'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment