-
Notifications
You must be signed in to change notification settings - Fork 443
Improved testing options #460
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
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.
👏
@tunetheweb I made a few tweaks to the code that I thought make things a bit clearer. Let me know if you have any issues with these changes, otherwise feel free to merge. |
@philipwalton , I'll see your one array and raise you some more :-) |
I also added a unit test GitHub action.
|
@philipwalton happy to merge? Or wanna have one last look after latest changes? |
Actually I got the E2E tests working too. With one question. |
test/e2e/onCLS-test.js
Outdated
@@ -662,11 +662,14 @@ describe('onCLS()', async function () { | |||
if (!browserSupportsCLS) this.skip(); | |||
|
|||
await navigateTo('/test/cls?hidden=1'); | |||
// Wait for a frame to be painted. | |||
await nextFrame(); |
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.
Do you know why the nextFrame()
is needed here? Given that the page is loaded in the hidden state, I wonder if waiting for the load event would be better?
You could try navigateTo('/test/cls?hidden=1', {readyState: 'complete'})
and see if that helps.
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.
Good idea, done!
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.
Actually let me see if that fixes the need for the >=
mentioned above...
Improved version of #286
Changes:
npm run test:e2e -- --browser=chrome --metric=TTFB
for example to limit tests to a particular browser and/or metric.it.only
's,depends.only
's, orbrowser.debug
's accidentally left around while testing.