handle when forms try to leave, too
This commit is contained in:
parent
8a5121bd90
commit
2c27d6b6b3
@ -72,9 +72,9 @@ describe "jasmine-headless-webkit" do
|
|||||||
describe 'tries to click a button' do
|
describe 'tries to click a button' do
|
||||||
it "should not leave the page nor loop" do
|
it "should not leave the page nor loop" do
|
||||||
system %{bin/jasmine-headless-webkit -j spec/jasmine/click_button/click_button.yml --report #{report}}
|
system %{bin/jasmine-headless-webkit -j spec/jasmine/click_button/click_button.yml --report #{report}}
|
||||||
$?.exitstatus.should == 1
|
$?.exitstatus.should == 0
|
||||||
|
|
||||||
report.should be_a_report_containing(2, 0, false)
|
report.should be_a_report_containing(0, 0, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function yes() {
|
function yes() {
|
||||||
$('body').append('<form><button /><form>')
|
$('body').append('<form action="something" method="post"><button /><form>')
|
||||||
$('button').trigger('click')
|
$('button').trigger('click')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
src_files:
|
src_files:
|
||||||
- spec/jasmine/leave_page/leave_page.js
|
- spec/jasmine/click_button/leave_page.js
|
||||||
|
|
||||||
spec_files:
|
spec_files:
|
||||||
- spec/jasmine/leave_page/leave_page_spec.js
|
- spec/jasmine/click_button/leave_page_spec.js
|
||||||
|
|
||||||
src_dir: .
|
src_dir: .
|
||||||
spec_dir: .
|
spec_dir: .
|
||||||
|
Loading…
Reference in New Issue
Block a user