Skip to content

Commit

Permalink
Merge pull request #33 from newfold-labs/update/test-onboarding
Browse files Browse the repository at this point in the history
further simplify test - checking url should be sufficient
  • Loading branch information
circlecube authored Nov 6, 2024
2 parents 9cc5b56 + b109f96 commit dd0c763
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
19 changes: 10 additions & 9 deletions tests/cypress/integration/notifications.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,21 @@ describe( 'Notifications', () => {
} );

it( 'Should redirect to AI onboarding when TRY NOW button is clicked', () => {
cy.visit( '/wp-admin/index.php' );
cy.intercept(
{
method: 'GET',
url: /newfold-notifications(\/|%2F)v1(\/|%2F)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(
Expand All @@ -167,13 +174,7 @@ 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.url().should( 'include', 'nfd-onboarding' );
} );

it( 'Should close the modal when NO THANKS button is clicked', () => {
Expand Down Expand Up @@ -201,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' );
} );
}

Expand Down

0 comments on commit dd0c763

Please sign in to comment.