-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: playwright, puppteer, WDIO, and, WDJS tests #499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this problem was caused by us not realizing that the pages we navigated to were returning 404s, I think we should take the extra time here and assert that the page is what we expect before running tests. Something like assert the title of the page or the status of the page should be sufficient.
const title = await page.title();
asset.equal(title, 'Nested Frames')
// or
const response = await page.goto(url);
asset.equal(response.status(), 200)
Edit: I think asserting the status is probably the better solution
Unfortunately, WDJS' Similarly, WDIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For wdjs and wdio you can assert that the title
isn't "Error"
.
await client.url(`${addr}/doesnt-exist-frameset.html`);
const title = await client.getTitle(); // { title: 'Error' }
assert.notEqual(title, 'Error');
Mostly, the pathing of the test fixtures were incorrect, so it was not testing the correct page.