Skip to content

Commit

Permalink
skip coming-soon-woo test in older envs
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Dec 2, 2024
1 parent a190999 commit 4ccfe6f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ module.exports = defineConfig( {
}
}

// Exclude Onboarding and ecommerce tests for WordPress lower than 6.5 (6.4 or 6.3) or PHP lower than 7.4 (7.1, 7.2 and 7.3)
if ( semver.satisfies( config.env.wpSemverVersion, '<6.5.0' ) || semver.satisfies( config.env.phpSemverVersion, '<7.4.0' )) {
// Exclude tests for WordPress lower than 6.5 (6.4 or 6.3) or PHP lower than 7.4 (7.1, 7.2 and 7.3)
if (
semver.satisfies( config.env.wpSemverVersion, '<6.5.0' ) ||
semver.satisfies( config.env.phpSemverVersion, '<7.4.0' )
) {
config.excludeSpecPattern = config.excludeSpecPattern.concat( [
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Site-Capabilities/**',
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Home/homePageWithWoo.cy.js',
'vendor/newfold-labs/wp-module-ecommerce/tests/cypress/integration/Home/ecommerce-next-steps.cy.js', // Skip this since Onboarding does not support this version
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/**' // Onboarding requires WP 6.5 or greater, as it uses the Wonder Theme which has the same requirement
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/**', // Onboarding requires WP 6.5 or greater, as it uses the Wonder Theme which has the same requirement
'vendor/newfold-labs/wp-module-coming-soon/cypress/integration/coming-soon-woo.cy.js', // woo is required and is not supported in older WP or PHP
] );
}

Expand Down

0 comments on commit 4ccfe6f

Please sign in to comment.