-
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
Migrate/e2e to playwright round one #38949
Conversation
Co-authored-by: Max Schmitt <[email protected]>
Size Change: +46 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
@kevin940726 I'm encountering an issue, and I'm not really sure about what is causing it. I have the style-variation.spec.js test, which uses some utilities in inserter.js. When I run the tests, I get this error The utilities are properly exported in index.ts though. Is there something I'm missing? |
* @param {string} searchTerm The text to search the inserter for. | ||
*/ | ||
export async function insertBlock( searchTerm ) { | ||
await searchForBlock( searchTerm ); |
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.
We can't just call the util because it depends on this
to bind to PageUtils
. Since we're operating under strict mode (the default), calling a function directly inside another function will set this
to undefined
. Instead, expose the util in PageUtils
and call this.searchForBlock
.
await searchForBlock( searchTerm ); | |
await this.searchForBlock( searchTerm ); |
I agree it could be quite annoying to have to handle this
though, open to any other ideas!
Follows up #38570.
This PR adds some e2e tests with Playwright.
See #38851 for overview of the migration progress.