Skip to content

Commit

Permalink
Fix rebase & e2e tests
Browse files Browse the repository at this point in the history
The inserting of links cahnges, so need to
remove the click to apply, and add tab + enter.
  • Loading branch information
mkaz committed Apr 14, 2020
1 parent d730645 commit 4a29c55
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/e2e-tests/specs/editor/various/links.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ describe( 'Links', () => {

// Click on the Submit button
await page.keyboard.press( 'Enter' );

// Reselect the link.
await pressKeyWithModifier( 'shiftAlt', 'ArrowLeft' );
};

it( 'can be edited', async () => {
Expand Down Expand Up @@ -490,13 +493,6 @@ describe( 'Links', () => {
await waitForAutoFocus();
await page.keyboard.type( 'w.org' );

// Insert the link
await page.keyboard.press( 'Enter' );

// Navigate back to the popover
await pressKeyWithModifier( 'primary', 'k' );
await waitForAutoFocus();

// Navigate to and toggle the "Open in new tab" checkbox.
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
Expand All @@ -508,7 +504,8 @@ describe( 'Links', () => {

// Close dialog. Expect that "Open in new tab" would have been applied
// immediately.
await page.keyboard.press( 'Escape' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Enter' );

expect( await getEditedPostContent() ).toMatchSnapshot();

Expand All @@ -519,9 +516,10 @@ describe( 'Links', () => {
//
// See: https://github.com/WordPress/gutenberg/pull/15573

// Collapse selection.
// Move caret back into the link.
await page.keyboard.press( 'ArrowLeft' );
await page.keyboard.press( 'ArrowRight' );
await page.keyboard.press( 'ArrowLeft' );

// Edit link.
await pressKeyWithModifier( 'primary', 'k' );
await waitForAutoFocus();
Expand All @@ -532,6 +530,10 @@ describe( 'Links', () => {
await page.keyboard.press( 'Enter' );

// Navigate back to the popover
await page.keyboard.press( 'ArrowLeft' );
await page.keyboard.press( 'ArrowLeft' );

// Navigate back to inputs to verify appears as changed.
await pressKeyWithModifier( 'primary', 'k' );
await waitForAutoFocus();

Expand Down

0 comments on commit 4a29c55

Please sign in to comment.