-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update performance tests to work with themes that load editor into an iframe #46665
Conversation
Size Change: 0 B Total Size: 1.32 MB ℹ️ View Unchanged
|
await page.waitForSelector( '.edit-post-layout', { | ||
timeout: 120000, | ||
} ); | ||
await canvas().waitForSelector( '.wp-block', { timeout: 120000 } ); |
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.
Copied this approach from the site editor performance tests:
gutenberg/packages/e2e-tests/specs/performance/site-editor.test.js
Lines 94 to 97 in b1234a7
await page.waitForSelector( '.edit-site-visual-editor', { | |
timeout: 120000, | |
} ); | |
await canvas().waitForSelector( '.wp-block', { timeout: 120000 } ); |
Not sure if the large timeout is necessary. Should be harmless though.
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.
personally I've raised questions about them too and I think we'd benefit but cutting out earlier. in cases like these we have to wait two extra minutes before calling it a failure, but the threshold is far earlier than two minutes where we know something went wrong.
Cool that seems to work! |
Will merge this so that we can unblock everyone's PRs 🙂 |
LGTM |
cc: @ellatrix |
Thanks noisysocks! Not sure why it didn't fail. Maybe @youknowriad knows more. |
nop, that's a mystery for me too |
Hopefully fixes the Run performance tests GitHub action which is currently failing on every PR.
Working out why the actions is failing by looking at the logs is a bit confusing because the performance tests run differently depending on the branch, what's in
trunk
a the time of run, etc.Instead I ignored all of that and ran
npm run test:performance
locally which output a few errors to do with using selectors that will no longer work as of #46212 because the block editor is now loaded into an iframe.The two big mysteries in my mind are:
trunk
commit?Anyway with these changes
npm run test:performance
and./bin/plugin/cli.js perf
work for me on my local machine. Let's see what GitHub thinks.