From 2dbdc2846e1f8b0b979db92f7407034b9632a520 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 3 Jan 2024 17:41:34 -0500 Subject: [PATCH] use fixed module-based wonder blocks test --- cypress.config.js | 1 - tests/cypress/integration/wonder-blocks.cy.js | 44 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 tests/cypress/integration/wonder-blocks.cy.js diff --git a/cypress.config.js b/cypress.config.js index db7549c17..d63ccccaf 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -77,7 +77,6 @@ module.exports = defineConfig( { excludeSpecPattern: [ 'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/4-design-steps/**', 'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/wp-module-support/', - 'vendor/newfold-labs/wp-module-patterns/tests/cypress/integration/', ], }, retries: 1, diff --git a/tests/cypress/integration/wonder-blocks.cy.js b/tests/cypress/integration/wonder-blocks.cy.js deleted file mode 100644 index 72b410c5b..000000000 --- a/tests/cypress/integration/wonder-blocks.cy.js +++ /dev/null @@ -1,44 +0,0 @@ -// - -describe( 'Wonder Blocks', function () { - before( () => { - cy.visit( '/wp-admin/post-new.php' ); - } ); - - it( 'Wonder Blocks button exists', () => { - cy.get( '#nfd-wba-toolbar-button' ).should( 'exist' ); - } ); - - it( 'Wonder Blocks button opens modal', () => { - cy.wait( 1000 ); - cy.get( 'body' ).click( { force: true } ); // clear welcome guide - cy.wait( 100 ); - cy.get( '#nfd-wba-toolbar-button button' ).click(); - cy.wait( 100 ); - // body has class modal-open - cy.get( 'body' ).should( 'have.class', 'modal-open' ); - // modal window exists - cy.get( '.nfd-wba-modal[role="dialog"]' ).should( 'be.visible' ); - } ); - - it( 'Close buttons closes modal', () => { - cy.get( - '.nfd-wba-modal__header button[aria-label="Close dialog"]' - ).should( 'exist' ); - cy.get( - '.nfd-wba-modal__header button[aria-label="Close dialog"]' - ).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 button' ).click(); - cy.wait( 100 ); - cy.get( '.nfd-wba-modal[role="dialog"]' ).should( 'be.visible' ); - cy.get( 'body' ).type( '{esc}' ); - cy.wait( 100 ); - cy.get( '.nfd-wba-modal[role="dialog"]' ).should( 'not.exist' ); - } ); -} );