From 3bed08c2ec767b87709bb7fa09f1af2ca5be77fd Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 6 Nov 2024 14:05:23 -0500 Subject: [PATCH 1/4] further simplify test - checking url should be sufficient we dont need to validate onboarding content thats already covered by onboarding and dependent on options and capabilities. --- tests/cypress/integration/notifications.cy.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/cypress/integration/notifications.cy.js b/tests/cypress/integration/notifications.cy.js index b6bf04e..17813f6 100644 --- a/tests/cypress/integration/notifications.cy.js +++ b/tests/cypress/integration/notifications.cy.js @@ -167,13 +167,8 @@ describe( 'Notifications', () => { .should( 'be.visible' ) .and( 'contain', 'TRY NOW' ) .click(); - cy.url().should( - 'include', - 'nfd-onboarding#/wp-setup/step' - ); - cy.get( '.nfd-onboarding-sitegen-options__option--large' ).should( - 'be.visible' - ); + cy.get( '.ai-sitegen-modal' ).should( 'not.visible' ); + cy.url().should( 'include', 'nfd-onboarding' ); } ); it( 'Should close the modal when NO THANKS button is clicked', () => { From 8c10f8404f8e65964a29c45c3532f213acce444c Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 6 Nov 2024 14:14:48 -0500 Subject: [PATCH 2/4] visit fresh plugin page for test --- tests/cypress/integration/notifications.cy.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/cypress/integration/notifications.cy.js b/tests/cypress/integration/notifications.cy.js index 17813f6..08b53c7 100644 --- a/tests/cypress/integration/notifications.cy.js +++ b/tests/cypress/integration/notifications.cy.js @@ -150,6 +150,7 @@ describe( 'Notifications', () => { } ); it( 'Should redirect to AI onboarding when TRY NOW button is clicked', () => { + cy.visit( '/wp-admin/index.php' ); cy.intercept( { method: 'GET', @@ -157,7 +158,13 @@ describe( 'Notifications', () => { }, notifications ).as( 'notifications' ); - cy.reload(); + + cy.visit( + '/wp-admin/admin.php?page=' + + Cypress.env( 'pluginId' ) + + '#/home', + { timeout: 30000 } + ); cy.wait( '@notifications' ); cy.wait( 2000 ); cy.get( From 15d89d8d1e218639d3d269e3bf2d1925999f78a7 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 6 Nov 2024 14:42:37 -0500 Subject: [PATCH 3/4] remove not.visible check --- tests/cypress/integration/notifications.cy.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/cypress/integration/notifications.cy.js b/tests/cypress/integration/notifications.cy.js index 08b53c7..0abb303 100644 --- a/tests/cypress/integration/notifications.cy.js +++ b/tests/cypress/integration/notifications.cy.js @@ -174,7 +174,6 @@ describe( 'Notifications', () => { .should( 'be.visible' ) .and( 'contain', 'TRY NOW' ) .click(); - cy.get( '.ai-sitegen-modal' ).should( 'not.visible' ); cy.url().should( 'include', 'nfd-onboarding' ); } ); @@ -203,7 +202,7 @@ describe( 'Notifications', () => { .should( 'be.visible' ) .and( 'contain', 'NO, THANKS' ) .click(); - cy.get( '.ai-sitegen-modal' ).should( 'not.visible' ); + cy.get( '.ai-sitegen-modal' ).should( 'not.be.visible' ); } ); } From b109f9667dd79e0583dde725d6931bfd125b17d9 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 6 Nov 2024 14:47:48 -0500 Subject: [PATCH 4/4] add dependabot workflow --- .github/dependabot.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3babe22 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,33 @@ +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "develop" + allow: + - dependency-type: direct + schedule: + interval: "daily" + commit-message: + prefix: "GitHub Actions" + include: "scope" + labels: + - "dependencies" + + # Maintain dependencies for Composer + - package-ecosystem: "composer" + directory: "/" + target-branch: "develop" + schedule: + interval: "daily" + allow: + - dependency-type: direct + versioning-strategy: increase + commit-message: + prefix: "Composer" + prefix-development: "Composer Dev" + include: "scope" + labels: + - "dependencies" + - "php"