Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b943258
Proof of concept
getdave Jan 18, 2024
b4bc075
Replace Unlink button in toolbar with edit link button
jeryj Jan 18, 2024
101723a
Avoid need for anchor hook
getdave Jan 19, 2024
bbde341
Activating a link via keyboard or toolbar goes to preview mode
getdave Jan 19, 2024
74a3e9e
Remove clickedLink state
jeryj Jan 22, 2024
cd51c57
Fix bug where no contentEditable would crash block
jeryj Jan 23, 2024
8fde809
Fix some e2e tests
jeryj Jan 23, 2024
b7659ef
Fix bug with collapsed selections at edge
getdave Jan 24, 2024
016a3ea
Revert unwanted stuff
getdave Jan 24, 2024
e7286f6
Revert "Revert unwanted stuff"
jeryj Jan 24, 2024
b7ba204
Revert "Fix bug with collapsed selections at edge"
jeryj Jan 24, 2024
ec501ea
Check for isActive before opening popover on link click
jeryj Jan 24, 2024
2f6b91e
Return focus to the element that opened the link control popover
jeryj Jan 24, 2024
94e332a
Use onFocusOutside to prevent stealing focus
jeryj Jan 24, 2024
9da61c7
Change name back to stopAddingLink
jeryj Jan 24, 2024
c59c5c0
Add comments
jeryj Jan 24, 2024
5091a0a
Only add link for email and urls if it's a new link
jeryj Jan 24, 2024
c006259
Update test for escape from link popover to return focus
jeryj Jan 24, 2024
76b89d3
Leave link UI open after initial creation
jeryj Jan 24, 2024
196d888
Fix createAndReselect test util
jeryj Jan 24, 2024
8ff163c
Fix keyboard shortcut tests
getdave Jan 25, 2024
c3200f2
Fix and simplify updating URL test
getdave Jan 25, 2024
21a8b12
Fix test for preserving state of advanced settings drawer
getdave Jan 25, 2024
3ff54ff
Fix test for toggling link settings
getdave Jan 25, 2024
2517f50
Fix link text change test
getdave Jan 25, 2024
7ab61d1
Update Edit Link -> Edit link
jeryj Jan 25, 2024
6b878f0
Change Edit link to Link
jeryj Jan 25, 2024
ba67044
Fix some tests
jeryj Jan 25, 2024
e75f2b1
Remove test no longer relevant
jeryj Jan 25, 2024
783a378
Remove unused test. Add test for onFocusOutside
jeryj Jan 25, 2024
abf7fcc
Hopefully fix test that is passing locally but failing on github
jeryj Jan 25, 2024
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
Prev Previous commit
Next Next commit
Fix some tests
  • Loading branch information
jeryj committed Jan 25, 2024
commit ba6704431b73834cc460f9eff1b855c5b91f632a
13 changes: 5 additions & 8 deletions test/e2e/specs/editor/blocks/links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ test.describe( 'Links', () => {
await LinkUtils.createLink();

// Click on the Edit button.
await page.getByRole( 'button', { name: 'Edit' } ).click();
await page.getByLabel( 'Edit', { exact: true } ).click();
await page.getByRole( 'button', { name: 'Edit', exact: true } ).click();

// Change the URL.
// getByPlaceholder required in order to handle Link Control component
// managing focus onto other inputs within the control.
Expand All @@ -250,13 +250,8 @@ test.describe( 'Links', () => {
] );
} );

test( `can remove existing links`, async ( {
editor,
LinkUtils,
pageUtils,
} ) => {
test( `can remove existing links`, async ( { editor, LinkUtils } ) => {
await LinkUtils.createLink();
await pageUtils.pressKeys( 'primary+k' );

const linkPopover = LinkUtils.getLinkPopover();

Expand Down Expand Up @@ -338,6 +333,7 @@ test.describe( 'Links', () => {
pageUtils,
} ) => {
await LinkUtils.createLink();
await pageUtils.pressKeys( 'Escape' );
// Make a collapsed selection inside the link.
await pageUtils.pressKeys( 'ArrowLeft' );
await pageUtils.pressKeys( 'ArrowRight' );
Expand Down Expand Up @@ -957,6 +953,7 @@ test.describe( 'Links', () => {
LinkUtils,
} ) => {
await LinkUtils.createLink();
await pageUtils.pressKeys( 'Escape' );

// Make a collapsed selection inside the link. This is used
// as a stress test to ensure we can find the link text from a
Expand Down