Skip to content

Commit 39071ad

Browse files
committed
Account for changes to media libary DOM structure.
1 parent 72002fe commit 39071ad

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/cypress/e2e/images.test.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ describe( '[Block Editor] Image distribution tests', () => {
3333
.find( `#${ id } button.components-button` )
3434
.contains( 'Media Library' )
3535
.click();
36-
cy.get( '.attachments-browser .attachment' ).eq( 1 ).click();
37-
cy.get( '.media-button-select' ).click();
36+
cy.get( '[id^=__wp-uploader-id-]:visible' )
37+
.find( '.attachments-browser .attachment' )
38+
.eq( 1 )
39+
.click();
40+
cy.get( '[id^=__wp-uploader-id-]:visible' )
41+
.find( '.media-button-select' )
42+
.click();
3843
cy.getBlockEditor().find( `#${ id } img` ).should( 'be.visible' );
3944
} );
4045
};

0 commit comments

Comments
 (0)