-
Notifications
You must be signed in to change notification settings - Fork 2k
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
AT E2E: fix selector for Instagram
block in editor and published state.
#77239
Conversation
- fix selector for both AT and Simple - fix selector in validation to work with AT
await editorCanvas | ||
.getByRole( 'document', { name: 'Block: Embed' } ) | ||
.getByRole( 'button', { | ||
name: 'Embed', | ||
} ) | ||
.click(); |
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.
I've verified that this selector works for both AT and Simple, on Gutenberg Production and Edge.
- remove commented out code
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
await context.page | ||
.getByRole( 'figure' ) | ||
.filter( { | ||
hasText: 'View this post on Instagram', | ||
} ) | ||
.waitFor(); |
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.
The previous selector was matching on two elements (somehow).
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.
Possibly due to proxxied content?
await context.page | ||
.getByRole( 'figure' ) | ||
.filter( { | ||
hasText: 'View this post on Instagram', | ||
} ) | ||
.waitFor(); |
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.
Would this work as well?
await context.page | |
.getByRole( 'figure' ) | |
.filter( { | |
hasText: 'View this post on Instagram', | |
} ) | |
.waitFor(); | |
await context.page | |
.getByText( 'View this post on Instagram' ) | |
.waitFor(); |
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.
I don't see why it wouldn't work - let me give it a try.
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.
Seems to work locally with proxy on and off.
Triggering a Gutenberg build in CI to make sure it works there too.
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.
🚢
- use `getText` selector
Fixes #77190.
Proposed Changes
This PR updates the selector used for the Instagram block in both editor and published state, to work with Simple and AT sites.
Key changes:
Testing Instructions
Passes on both AT and Simple runs locally.
AT
Simple
Ensure the following build configurations are passing:
Pre-merge Checklist