@@ -478,83 +478,6 @@ describe( 'Links', () => {
478
478
) ;
479
479
} ) ;
480
480
481
- it ( 'should contain a label when it should open in a new tab' , async ( ) => {
482
- await clickBlockAppender ( ) ;
483
- await page . keyboard . type ( 'This is WordPress' ) ;
484
- // Select "WordPress".
485
- await pressKeyWithModifier ( 'shiftAlt' , 'ArrowLeft' ) ;
486
- await pressKeyWithModifier ( 'primary' , 'k' ) ;
487
- await waitForURLFieldAutoFocus ( ) ;
488
- await page . keyboard . type ( 'w.org' ) ;
489
-
490
- // Link settings open
491
- await page . keyboard . press ( 'Tab' ) ;
492
- await page . keyboard . press ( 'Space' ) ;
493
-
494
- // Navigate to and toggle the "Open in new tab" checkbox.
495
- await page . keyboard . press ( 'Tab' ) ;
496
- await page . keyboard . press ( 'Space' ) ;
497
-
498
- // Confirm that focus was not prematurely returned to the paragraph on
499
- // a changing value of the setting.
500
- await page . waitForSelector (
501
- ':focus.components-checkbox-control__input'
502
- ) ;
503
-
504
- // Submit link. Expect that "Open in new tab" would have been applied
505
- // immediately.
506
- await page . keyboard . press ( 'Tab' ) ;
507
- await page . keyboard . press ( 'Enter' ) ;
508
-
509
- // Wait for Gutenberg to finish the job.
510
- await page . waitForXPath (
511
- '//a[contains(@href,"w.org") and @target="_blank"]'
512
- ) ;
513
-
514
- expect ( await getEditedPostContent ( ) ) . toMatchSnapshot ( ) ;
515
-
516
- // Regression Test: This verifies that the UI is updated according to
517
- // the expected changed values, where previously the value could have
518
- // fallen out of sync with how the UI is displayed (specifically for
519
- // collapsed selections).
520
- //
521
- // See: https://github.com/WordPress/gutenberg/pull/15573
522
-
523
- // Move caret back into the link.
524
- await page . keyboard . press ( 'ArrowLeft' ) ;
525
- await page . keyboard . press ( 'ArrowLeft' ) ;
526
-
527
- // Edit link.
528
- await pressKeyWithModifier ( 'primary' , 'k' ) ;
529
- await waitForURLFieldAutoFocus ( ) ;
530
- await pressKeyWithModifier ( 'primary' , 'a' ) ;
531
- await page . keyboard . type ( 'wordpress.org' ) ;
532
-
533
- // Update the link.
534
- await page . keyboard . press ( 'Enter' ) ;
535
-
536
- // Navigate back to the popover.
537
- await page . keyboard . press ( 'ArrowLeft' ) ;
538
- await page . keyboard . press ( 'ArrowLeft' ) ;
539
-
540
- // Navigate back to inputs to verify appears as changed.
541
- await pressKeyWithModifier ( 'primary' , 'k' ) ;
542
- await waitForURLFieldAutoFocus ( ) ;
543
-
544
- // Navigate to the "Open in new tab" checkbox.
545
- await page . keyboard . press ( 'Tab' ) ;
546
- await page . keyboard . press ( 'Tab' ) ;
547
- // Uncheck the checkbox.
548
- await page . keyboard . press ( 'Space' ) ;
549
-
550
- // Wait for Gutenberg to finish the job.
551
- await page . waitForXPath (
552
- '//a[contains(@href,"wordpress.org") and not(@target)]'
553
- ) ;
554
-
555
- expect ( await getEditedPostContent ( ) ) . toMatchSnapshot ( ) ;
556
- } ) ;
557
-
558
481
describe ( 'Editing link text' , ( ) => {
559
482
it ( 'should not display text input when initially creating the link' , async ( ) => {
560
483
// Create a block with some text.
0 commit comments