Skip to content

Commit

Permalink
run site cap tests only
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeetha-nayak committed Dec 28, 2023
1 parent fc74365 commit fcafda7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
run: npx wp-env start --debug

- name: Run Cypress Tests
run: npx cypress run
run: npx cypress run --spec ./vendor/${{ github.repository }}/tests/cypress/integration

- name: Store screenshots of test failures
if: ${{ failure() }}
Expand Down
3 changes: 2 additions & 1 deletion tests/cypress/integration/Home/siteCapabilities.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe(
"isEcommerce" : true,
"isJarvis" : true,
}
const cap = JSON.stringify(cTBAndYithTrue)
// const cTBAndYithTrue = 'a:7:{s:11:"canAccessAI";b:1;s:18:"canAccessGlobalCTB";b:1;s:19:"canAccessHelpCenter";b:1;s:11:"hasEcomdash";b:0;s:15:"hasYithExtended";b:1;s:11:"isEcommerce";b:1;s:8:"isJarvis";b:1;}'
const cTBFalseYithTrue = 'a:5:{s:19:"canAccessHelpCenter";b:1;s:11:"hasEcomdash";b:0;s:15:"hasYithExtended";b:1;s:11:"isEcommerce";b:1;s:8:"isJarvis";b:1;}'
const cTBTrueYithFalse = 'a:5:{s:19:"canAccessHelpCenter";b:1;s:11:"hasEcomdash";b:0;s:15:"hasYithExtended";b:0;s:11:"isEcommerce";b:1;s:8:"isJarvis";b:1;}'
Expand All @@ -38,7 +39,7 @@ describe(
it('1 Verify Install Now is shown when canAccessGlobalCTB and hasYithExtended set to true', () => {
// cy.exec( `npx wp-env run cli wp option get _transient_nfd_site_capabilities` )
cy.exec( `npx wp-env run cli wp option delete _transient_nfd_site_capabilities`, {failOnNonZeroExit: false})
cy.exec(`npx wp-env run cli wp option set _transient_nfd_site_capabilities '${cTBAndYithTrue}' --format=json`, { timeout: customCommandTimeout }).then((result) => {
cy.exec(`npx wp-env run cli wp option set _transient_nfd_site_capabilities '${cap}' --format=json`, { timeout: customCommandTimeout }).then((result) => {
cy.log(result.stdout);
cy.log(result.stderr);
})
Expand Down

0 comments on commit fcafda7

Please sign in to comment.