Form submit with Jasmine

1,765 views
Skip to first unread message

Rob Conaway

unread,
Jan 19, 2011, 9:59:29 AM1/19/11
to Jasmine
Is there a practical way to have Jasmine drive a test which includes a
form submit? The obvious problem is that when you submit a form the
new page replaces the existing page, including the test runner. Is
there a solution involving separate windows, perhaps?

Jeff Deville

unread,
Jan 19, 2011, 11:22:37 AM1/19/11
to jasmi...@googlegroups.com
Given that you're mocking the html, and not pulling it from a server, do you care what is happening after the submission, or are you just trying to verify that the form was submitted?  If the former, I don't know how you'd do this anyway, because there's no where to post the data to.  If the latter, you can hook into the form submission event, and spy on it, and then mock it to return null. 


--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.


Pranjulya Bajpai

unread,
May 17, 2016, 4:23:37 PM5/17/16
to Jasmine, rcon...@pillartechnology.com
HI just test whether the given form has successfully submitted or not, there is no possible way to test what is happening after the submission.
Reply all
Reply to author
Forward
0 new messages