-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/cypress-13-validation' into fix/cypress-13-typed
- Loading branch information
Showing
77 changed files
with
8,557 additions
and
3,123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: e2e-cypress-12-ccy-1.10 | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-cypress-12-ccy-1.10: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install Cypress 12.17.4 | ||
run: cd ./packages/cypress-cloud | npm install [email protected] | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run compatibility tests | ||
working-directory: ./e2e/cypress-12-demo | ||
env: | ||
CURRENTS_API_KEY: YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9 | ||
CURRENTS_RUN_BASE_URL: https://api.currents.dev/v1/runs/ | ||
CURRENTS_PROJECT_ID: 2cI1I5 | ||
CURRENTS_RECORD_KEY: YakSabgBLb7D40nZ | ||
|
||
run: > | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: e2e-cypress-13-ccy-1.10 | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
e2e-cypress-13-ccy-1.10: | ||
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: currents:* | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["18"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install Cypress 13.1.0 | ||
run: cd ./packages/cypress-cloud | npm install [email protected] | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run compatibility tests | ||
working-directory: ./e2e/cypress-13-demo | ||
env: | ||
CURRENTS_API_KEY: YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9 | ||
CURRENTS_RUN_BASE_URL: https://api.currents.dev/v1/runs/ | ||
CURRENTS_PROJECT_ID: 2cI1I5 | ||
CURRENTS_RECORD_KEY: YakSabgBLb7D40nZ | ||
|
||
run: > | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
e2e: { | ||
batchSize: 4, // how many specs to send in one batch | ||
}, | ||
component: { | ||
batchSize: 5, // how many specs to send in one batch | ||
}, | ||
// eslint-disable-next-line turbo/no-undeclared-env-vars | ||
projectId: !!(process.env.GITHUB_ACTION || process.env.CIRCLE_BRANCH) | ||
? "Ij0RfK" | ||
: "l4zuz8", | ||
// cloudServiceUrl: "http://localhost:1234", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { defineConfig } from "cypress"; | ||
import currents from "cypress-cloud/plugin"; | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
baseUrl: "https://todomvc.com/examples/vanillajs", | ||
supportFile: "cypress/support/e2e.ts", | ||
specPattern: "cypress/*/**/*.spec.js", | ||
setupNodeEvents(on, config) { | ||
require("@cypress/grep/src/plugin")(config); | ||
// require("cypress-terminal-report/src/installLogsPrinter")(on); | ||
return currents(on, config); | ||
}, | ||
}, | ||
|
||
component: { | ||
specPattern: ["pages/__tests__/*.spec.tsx"], | ||
setupNodeEvents(on, config) { | ||
return currents(on, config); | ||
}, | ||
devServer: { | ||
framework: "next", | ||
bundler: "webpack", | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
describe('Failing test with 2 attempts', () => { | ||
it('should try 2 times', { | ||
retries: 2, | ||
}, () => { | ||
cy.wrap(false).should('be.true'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
let attempt = 0; | ||
describe('Failing test with 2 attempts, passed test and flaky test with 2 attempts', () => { | ||
it('should try 2 times', { | ||
retries: 2, | ||
}, () => { | ||
cy.wrap(false).should('be.true'); | ||
}); | ||
|
||
it('should assert that true is true', () => { | ||
cy.wrap(true).should('be.true'); | ||
}); | ||
|
||
it('should fail on the first attempt and pass on the second', { retries: 2 }, () => { | ||
if (attempt === 0) { | ||
attempt++; | ||
cy.wrap(false).should('be.true'); // This will fail on the first attempt | ||
} else { | ||
cy.wrap(true).should('be.true'); // This will pass on the second attempt | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('Ignored test', () => { | ||
it.skip('should be a skipped test', () => { | ||
cy.wrap(false).should('be.true'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
describe('Passed test with screenshot, passed test with no screenshots', () => { | ||
it('should assert and take a screenshot', () => { | ||
// Assert that true is true | ||
cy.wrap(true).should('be.true'); | ||
|
||
// Take a screenshot | ||
cy.screenshot('internal-assert-screenshot'); | ||
}); | ||
|
||
it('should assert that true is true', () => { | ||
cy.wrap(true).should('be.true'); | ||
}); | ||
}); |
Oops, something went wrong.