Skip to content

Commit

Permalink
Merge branch 'fix/cypress-13-validation' into fix/cypress-13-typed
Browse files Browse the repository at this point in the history
  • Loading branch information
agoldis committed Sep 19, 2023
2 parents 22b21db + cfe03d0 commit 20bec50
Show file tree
Hide file tree
Showing 77 changed files with 8,557 additions and 3,123 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/e2e-cypress-12-ccy-1.10.yml
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
41 changes: 41 additions & 0 deletions .github/workflows/e2e-cypress-13-ccy-1.10.yml
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
4 changes: 4 additions & 0 deletions .husky/pre-commit
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
44 changes: 15 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,72 @@


# [1.10.0-beta.5](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.4...v1.10.0-beta.5) (2023-09-14)


### Bug Fixes

* pick test:after results explicitly ([67e6a0d](https://github.com/currents-dev/cypress-cloud/commit/67e6a0df78d3cff32d101d1bbe3f119c0766a9af))
- pick test:after results explicitly ([67e6a0d](https://github.com/currents-dev/cypress-cloud/commit/67e6a0df78d3cff32d101d1bbe3f119c0766a9af))

# [1.10.0-beta.4](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.3...v1.10.0-beta.4) (2023-09-11)


### Bug Fixes

* backfill config ([ed8a777](https://github.com/currents-dev/cypress-cloud/commit/ed8a777f6299f0778eeabe96534b52bcd3472d0f))
* coverage uploads ([6a26e40](https://github.com/currents-dev/cypress-cloud/commit/6a26e4077cab73f75c64235472e8695ebcf14087))
- backfill config ([ed8a777](https://github.com/currents-dev/cypress-cloud/commit/ed8a777f6299f0778eeabe96534b52bcd3472d0f))
- coverage uploads ([6a26e40](https://github.com/currents-dev/cypress-cloud/commit/6a26e4077cab73f75c64235472e8695ebcf14087))

# [1.10.0-beta.3](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.2...v1.10.0-beta.3) (2023-09-08)


### Bug Fixes

* issue 179 fixes ([cf8ca5d](https://github.com/currents-dev/cypress-cloud/commit/cf8ca5d5f71b69a6fc7d1098b1bb0b42d27427d2))
- issue 179 fixes ([cf8ca5d](https://github.com/currents-dev/cypress-cloud/commit/cf8ca5d5f71b69a6fc7d1098b1bb0b42d27427d2))

# [1.10.0-beta.2](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.1...v1.10.0-beta.2) (2023-09-06)


### Bug Fixes

* combine standalone with spec:after results ([0d7b2eb](https://github.com/currents-dev/cypress-cloud/commit/0d7b2eb02ee8aeb0e6ff0627f3afbf0d641bd581))
* set test id for pending tests ([f37312e](https://github.com/currents-dev/cypress-cloud/commit/f37312e0651954481b1e3fb89552606bea3dde38))

- combine standalone with spec:after results ([0d7b2eb](https://github.com/currents-dev/cypress-cloud/commit/0d7b2eb02ee8aeb0e6ff0627f3afbf0d641bd581))
- set test id for pending tests ([f37312e](https://github.com/currents-dev/cypress-cloud/commit/f37312e0651954481b1e3fb89552606bea3dde38))

### Features

* support cypres@13+ ([45fd903](https://github.com/currents-dev/cypress-cloud/commit/45fd9036ad686f7edfcb7859db64ce79692dd429))
- support cypres@13+ ([45fd903](https://github.com/currents-dev/cypress-cloud/commit/45fd9036ad686f7edfcb7859db64ce79692dd429))

# [1.10.0-beta.1](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.0...v1.10.0-beta.1) (2023-09-06)


### Bug Fixes

* combine standalone with spec:after results ([0d7b2eb](https://github.com/currents-dev/cypress-cloud/commit/0d7b2eb02ee8aeb0e6ff0627f3afbf0d641bd581))

- combine standalone with spec:after results ([0d7b2eb](https://github.com/currents-dev/cypress-cloud/commit/0d7b2eb02ee8aeb0e6ff0627f3afbf0d641bd581))

### Features

* support cypres@13+ ([45fd903](https://github.com/currents-dev/cypress-cloud/commit/45fd9036ad686f7edfcb7859db64ce79692dd429))
- support cypres@13+ ([45fd903](https://github.com/currents-dev/cypress-cloud/commit/45fd9036ad686f7edfcb7859db64ce79692dd429))

# [1.10.0-beta.0](https://github.com/currents-dev/cypress-cloud/compare/v1.9.3...v1.10.0-beta.0) (2023-08-25)


### Features

* [CSR-213] Support Code Coverage ([#174](https://github.com/currents-dev/cypress-cloud/issues/174)) ([b29d738](https://github.com/currents-dev/cypress-cloud/commit/b29d738f9a5d54e3214dfd05b66fc053aa3194a8))
- [CSR-213] Support Code Coverage ([#174](https://github.com/currents-dev/cypress-cloud/issues/174)) ([b29d738](https://github.com/currents-dev/cypress-cloud/commit/b29d738f9a5d54e3214dfd05b66fc053aa3194a8))

## [1.9.3](https://github.com/currents-dev/cypress-cloud/compare/v1.9.2...v1.9.3) (2023-07-27)


### Bug Fixes

* retry on ETIMEDOUT, add network req timeout ([#172](https://github.com/currents-dev/cypress-cloud/issues/172)) ([030ae70](https://github.com/currents-dev/cypress-cloud/commit/030ae7086eeb75397c729a79c8eefb9aa2e61d7a))
- retry on ETIMEDOUT, add network req timeout ([#172](https://github.com/currents-dev/cypress-cloud/issues/172)) ([030ae70](https://github.com/currents-dev/cypress-cloud/commit/030ae7086eeb75397c729a79c8eefb9aa2e61d7a))

## [1.9.2](https://github.com/currents-dev/cypress-cloud/compare/v1.9.1...v1.9.2) (2023-07-21)


### Bug Fixes

* exit with status 1 when no spec files found ([#169](https://github.com/currents-dev/cypress-cloud/issues/169)) ([9c7bfd2](https://github.com/currents-dev/cypress-cloud/commit/9c7bfd2a9bc7201af5ee9178c5b7c92cf224955e)), closes [#165](https://github.com/currents-dev/cypress-cloud/issues/165)
- exit with status 1 when no spec files found ([#169](https://github.com/currents-dev/cypress-cloud/issues/169)) ([9c7bfd2](https://github.com/currents-dev/cypress-cloud/commit/9c7bfd2a9bc7201af5ee9178c5b7c92cf224955e)), closes [#165](https://github.com/currents-dev/cypress-cloud/issues/165)

## [1.9.1](https://github.com/currents-dev/cypress-cloud/compare/v1.9.0...v1.9.1) (2023-07-06)


### Bug Fixes

* prevent shared execution state ([#157](https://github.com/currents-dev/cypress-cloud/issues/157)) ([48cf247](https://github.com/currents-dev/cypress-cloud/commit/48cf24712a5362f5557d3a689e891d25e1491638))
- prevent shared execution state ([#157](https://github.com/currents-dev/cypress-cloud/issues/157)) ([48cf247](https://github.com/currents-dev/cypress-cloud/commit/48cf24712a5362f5557d3a689e891d25e1491638))

## [1.9.1-beta.0](https://github.com/currents-dev/cypress-cloud/compare/v1.9.0...v1.9.1-beta.0) (2023-07-06)


### Bug Fixes

* prevent shared execution state ([f71ad89](https://github.com/currents-dev/cypress-cloud/commit/f71ad89b02df80d9bf5e9c0da7e4a2c0ad8212dc))
- prevent shared execution state ([f71ad89](https://github.com/currents-dev/cypress-cloud/commit/f71ad89b02df80d9bf5e9c0da7e4a2c0ad8212dc))

# [1.9.0](https://github.com/currents-dev/cypress-cloud/compare/v1.9.0-beta.0...v1.9.0) (2023-07-04)

Expand Down Expand Up @@ -377,4 +363,4 @@
- implement generic http client with retries ([a9711bd](https://github.com/currents-dev/cypress-cloud/commit/a9711bde1fbb2cd37dbc8979593159d183bfa866))
- improve setup steps ([9bf16fe](https://github.com/currents-dev/cypress-cloud/commit/9bf16fe5f3773db4aa2f169515303ea6d0973da6))
- separate stdout per spec file ([a9d01c3](https://github.com/currents-dev/cypress-cloud/commit/a9d01c349cbfe140a568a452b0e7163e6d27f2db))
- setup github actions ([d439f56](https://github.com/currents-dev/cypress-cloud/commit/d439f5660698177087fcc2e7a61c64ea263816f6))
- setup github actions ([d439f56](https://github.com/currents-dev/cypress-cloud/commit/d439f5660698177087fcc2e7a61c64ea263816f6))
13 changes: 13 additions & 0 deletions e2e/cypress-12-demo/currents.config.js
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",
};
26 changes: 26 additions & 0 deletions e2e/cypress-12-demo/cypress.config.ts
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",
},
},
});
7 changes: 7 additions & 0 deletions e2e/cypress-12-demo/cypress/e2e/a.spec.js
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');
});
});
21 changes: 21 additions & 0 deletions e2e/cypress-12-demo/cypress/e2e/b.spec.js
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
}
});
});
5 changes: 5 additions & 0 deletions e2e/cypress-12-demo/cypress/e2e/c.spec.js
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');
});
});
13 changes: 13 additions & 0 deletions e2e/cypress-12-demo/cypress/e2e/d.spec.js
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');
});
});
Loading

0 comments on commit 20bec50

Please sign in to comment.