Skip to content

Commit

Permalink
fix ensure scroll into view is finished before check
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Aug 23, 2023
1 parent e00d096 commit 384109c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cypress/e2e/Image.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ context('Image', () => {
cy.get('#attachment-details-alt-text').type('Test Alt Text');
cy.get('.media-button-select').contains('Select').click();

cy.get('.wp-block-example-image-example img').scrollIntoView({offset: -50}).should('be.visible');
cy.get('.wp-block-example-image-example img').scrollIntoView({offset: -50})
cy.get('.wp-block-example-image-example img').should('be.visible');

cy.get('.wp-block-example-image-example img')
.should('have.attr', 'alt');
Expand All @@ -34,7 +35,8 @@ context('Image', () => {

cy.wait(500);

cy.get('.wp-block-example-image-example img').scrollIntoView({offset: -50}).should('be.visible');
cy.get('.wp-block-example-image-example img').scrollIntoView({offset: -50})
cy.get('.wp-block-example-image-example img').should('be.visible');

})

Expand Down

0 comments on commit 384109c

Please sign in to comment.