I have a test setup using ZombieJS.
When clicking on a button in my page, I do a Ajax request to the backend, based on the current state of the page this could be a POST or a GET.
Is it possible, with ZombieJS to assert that a certain request was made, and if that request was a post or a get.
It'd be best to call getAttribute
on the form before submitting.
browser.query('#myform').getAttribute('method')
after submitting, you'd do assert.ok(browser.success)
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.