We are trying to disable a specific submit button after clicking on it. Something like that:
assert !page.has_css?("#review_button[disabled='disabled']") click_button "Review" assert page.has_css?("#review_button[disabled='disabled']")
The problem, of course, is that the form is submitted before the second statement is validated. Is there a way to turn off the actual form submission or pause it until the second statement is verified?
I remember that I had the same problem, and I never found a good way to do this, because, as you said, it goes only to the next statement when the "Review" action is completed.
, , , , , (, , ), , . ( ), , .