Skip to content
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

Keep Link UI open upon initial link creation when used in RichText #57726

Merged
merged 17 commits into from
Jan 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/e2e/specs/editor/blocks/links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,13 @@ test.describe( 'Links', () => {
await pageUtils.pressKeys( 'Enter' );

const linkPopover = LinkUtils.getLinkPopover();
await expect( linkPopover ).toBeVisible();
// Close the link control to return the caret to the canvas
await pageUtils.pressKeys( 'Escape' );

// Deselect the link text by moving the caret to the end of the line
// and the link popover should not be displayed.
await pageUtils.pressKeys( 'End' );
await expect( linkPopover ).toBeHidden();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we invert this instead? toBeVisible()?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd need to do a little bit more, since the focus is in a different spot. I modified it to match the spirit of what the test was already testing. fb8f5a9


// Move the caret back into the link text and the link popover
// should be displayed.
Expand Down
Loading