Skip to content

Commit

Permalink
ensure the click occurs on the wonder block button
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Dec 5, 2023
1 parent 5b715c1 commit ebf6c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/cypress/integration/wonder-blocks.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe( 'Wonder Blocks', function () {
cy.wait( 1000 );
cy.get( 'body' ).click( { force: true } ); // clear welcome guide
cy.wait( 100 );
cy.get( '#nfd-wba-toolbar-button' ).click( { force: true } );
cy.get( '#nfd-wba-toolbar-button button' ).click();
cy.wait( 100 );
// body has class modal-open
cy.get( 'body' ).should( 'have.class', 'modal-open' );
Expand All @@ -27,14 +27,14 @@ describe( 'Wonder Blocks', function () {
).should( 'exist' );
cy.get(
'.nfd-wba-modal__header button[aria-label="Close dialog"]'
).click( { force: true } );
).click();
cy.wait( 100 );
cy.get( 'body' ).should( 'not.have.class', 'modal-open' );
cy.get( '.nfd-wba-modal[role="dialog"]' ).should( 'not.exist' );
} );

it( 'ESC button closes modal too', () => {
cy.get( '#nfd-wba-toolbar-button' ).click( { force: true } );
cy.get( '#nfd-wba-toolbar-button button' ).click();
cy.wait( 100 );
cy.get( '.nfd-wba-modal[role="dialog"]' ).should( 'be.visible' );
cy.get( 'body' ).type( '{esc}' );
Expand Down

0 comments on commit ebf6c5a

Please sign in to comment.