File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,8 @@ context('PostFeaturedImage', () => {
4444
4545 cy . get ( '[data-tab-id="edit-post/document"]' ) . click ( ) ;
4646
47- cy . get ( '.components-button.components-panel__body-toggle' ) . contains ( 'Featured image' ) . then ( $button => {
48- if ( $button . attr ( 'aria-expanded' ) === 'false' ) {
49- cy . get ( '.components-button.components-panel__body-toggle' ) . contains ( 'Featured image' ) . click ( ) ;
50- }
51- } )
5247
53- cy . get ( '.editor-post-featured-image img ' ) . should ( 'exist' ) . then ( ( $a ) => {
48+ cy . get ( '.editor-post-featured-image__preview- image' ) . should ( 'exist' ) . then ( ( $a ) => {
5449 const src1 = $a . attr ( 'src' ) ;
5550 const cleanedSrc1 = src1 . replace ( / - \d + x \d + (? = \. \w + $ ) / , '' ) ;
5651
@@ -65,7 +60,7 @@ context('PostFeaturedImage', () => {
6560 } ) ;
6661 } ) ;
6762
68- cy . get ( '.components-button. editor-post-featured-image__action' ) . contains ( 'Remove' ) . click ( ) ;
63+ cy . get ( '.editor-post-featured-image__action' ) . contains ( 'Remove' ) . click ( { force : true } ) ;
6964 cy . get ( '.wp-block-example-custom-post-featured-image__image' ) . should ( 'not.exist' ) ;
7065 } )
7166} )
You can’t perform that action at this time.
0 commit comments