Update tests to isolate marionette failures

This commit is contained in:
Thomas Walpole 2016-06-12 16:28:47 -07:00
parent c08a186bda
commit fe6c8e75da
3 changed files with 8 additions and 6 deletions

View File

@ -413,12 +413,9 @@ Capybara::SpecHelper.spec '#click_button' do
@session.visit('/form')
@session.fill_in('address1_city', :with =>'Paris')
@session.fill_in('address1_street', :with =>'CDG')
@session.fill_in('address1_street', :with =>'CDG')
@session.select("France", :from => 'address1_country')
@session.fill_in('address2_city', :with => 'Mikolaiv')
@session.fill_in('address2_street', :with => 'PGS')
@session.select("Ukraine", :from => 'address2_country')
@session.click_button "awesome"

View File

@ -2,7 +2,12 @@
Capybara::SpecHelper.spec "#execute_script", :requires => [:js] do
it "should execute the given script and return nothing" do
@session.visit('/with_js')
expect(@session.execute_script("$('#change').text('Funky Doodle')")).to be_nil
expect(@session.execute_script("document.getElementById('change').textContent = 'Funky Doodle'")).to be_nil
expect(@session).to have_css('#change', :text => 'Funky Doodle')
end
it "should be able to call functions defined in the page" do
@session.visit('/with_js')
expect{ @session.execute_script("$('#change').text('Funky Doodle')") }.not_to raise_error
end
end

View File

@ -253,7 +253,7 @@ New line after and before textarea tag
<label for='address1_country'>Country</label>
<select name="form[addresses][][country]" id="address1_country">
<option>France</option>
<option selected>France</option>
<option>Ukraine</option>
</select>
</p>
@ -269,7 +269,7 @@ New line after and before textarea tag
<label for='address2_country'>Country</label>
<select name="form[addresses][][country]" id="address2_country">
<option>France</option>
<option>Ukraine</option>
<option selected>Ukraine</option>
</select>
</p>