Open IvanNaumenko opened 6 years ago
Hello @IvanNaumenko
As a user of nightwatch-cucumber myself, I can say that both work together.
But you cannot use a trigger with BDD steps, since you have to write separate steps to start listenning for XHR, and then another step to get what has been listened.
I use :
Given some stuff
And browser listens for XHR
When some action that should trigger XHR
Then something that checks listened XHRs
where :
Given(/browser listens for XHR/, () =>
client.listenXHR()
);
Then(/something that checks ("something") listened XHRs/, (something) =>
client.getXHR(someUrlPattern, 2000, (xhrs => {
assertSomethingWith(xhrs, something);
}))
);
Thanks! Works!
Can you create some try project to demonstrate how it works correctly and share it on github?
It doesn't show any response code each time. wait 3sec
It doesn't show any response code each time. wait 3sec
Please look at https://github.com/cortexmg/nightwatch-xhr/issues/42 I had similar case and had to modify client.js in es5 folder. This might be due to the fact that there are multiple requests in background and last one finishes with 404.
Hey guys! I downloaded your package and discovered it doesn't work with nigthwatch-cucumber....((
When I run them I got
Error while running waitForFirstXHR command: trigger should be a function
It would be great if you adept it with that framework