Created
May 3, 2016 14:38
-
-
Save LBRapid/08e5453e1644608369e3a631b0b7a766 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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' | |
click_link 'Print This' | |
begin | |
switch_to_new_pop_up | |
has_text? "Save Your Design" | |
fill_in 'Name Your Design:', with: "123" | |
fill_in 'Your Email Address:', with: "[email protected]" | |
click_button 'Save and Print' | |
has_text? "PRINTED PROOF" | |
close_active_window | |
has_no_text? 'PRINTED PROOF' | |
has_text? 'Save Completed' | |
rescue Capybara::Poltergeist::JavascriptError | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment