Skip to content

Commit

Permalink
chore: update cypress to v13
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong committed Oct 16, 2023
1 parent 22b8f9f commit a776843
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/smoke_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
export NEXUS_PASS=$(cat /tmp/password)
echo $NEXUS_PASS
cat /tmp/password
cypress run --headless --browser chrome
cypress run
env:
TEST_SNYK_TOKEN: ${{ secrets.TEST_SNYK_TOKEN }}
TEST_SNYK_ORG: ${{ secrets.TEST_SNYK_ORG }}
Expand All @@ -83,14 +83,14 @@ jobs:
if: always()
with:
name: screenshots
path: /home/runner/work/nexus-snyk-security-plugin/nexus-snyk-security-plugin/test/smoke/cypress/screenshots/cypress-test.spec.js/
path: /home/runner/work/nexus-snyk-security-plugin/nexus-snyk-security-plugin/test/smoke/cypress/screenshots/cypress-test.cy.js/test
retention-days: 1

- uses: actions/upload-artifact@v2
if: always()
with:
name: video
path: /home/runner/work/nexus-snyk-security-plugin/nexus-snyk-security-plugin/test/smoke/cypress/videos/cypress-test.spec.js.mp4
path: /home/runner/work/nexus-snyk-security-plugin/nexus-snyk-security-plugin/test/smoke/cypress/videos/cypress-test.cy.js.mp4
retention-days: 1

- name: Save docker logs to file
Expand Down
12 changes: 12 additions & 0 deletions test/smoke/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
defaultCommandTimeout: 20000,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
},
supportFile: false,
video: true,
},
};
3 changes: 0 additions & 3 deletions test/smoke/cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ describe("test", () => {
cy.log("in the diaglog callback");
if ($dialog.find("a").length) {
cy.log("found the Next button");
cy.wrap($dialog).should("be.visible").contains("Next").click();
// cy.wrap($dialog).should("be.visible").contains("Next").click();
cy.contains("Next").click();
cy.log("clicked the Next button");

// Set new password
Expand Down Expand Up @@ -56,11 +57,11 @@ describe("test", () => {
cy.log("found an anonymous access radio button");
cy.wrap($anonymous).get('div[role="radiogroup"] input').check();
cy.log("checked the first anonymous access radio buttong");
cy.contains(
'div[role="dialog"] a[role="button"]:visible',
"Next"
).click();
cy.log("clicked the Next button");
// cy.contains(
// 'div[role="dialog"] a[role="button"]:visible',
// "Next"
// ).click();
// cy.log("clicked the Next button");
}
});

Expand Down

0 comments on commit a776843

Please sign in to comment.