Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress 13 #7

Merged
merged 80 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2258d7c
tests and test attempts data
miguelangarano Sep 5, 2023
a94d9f2
screenshots data structure and tests with attempts sent as expected w…
miguelangarano Sep 6, 2023
aeab2fb
remove yarn
miguelangarano Sep 6, 2023
5242604
chore: wip
agoldis Sep 6, 2023
0daa82c
added types and quick fix for removing not relevant attempts and scre…
miguelangarano Sep 6, 2023
0d7b2eb
fix: combine standalone with spec:after results
agoldis Sep 6, 2023
9a83d60
Merge branch 'fix/cypress-13-ml' of https://github.com/currents-dev/c…
agoldis Sep 6, 2023
640a163
chore: fixing types
agoldis Sep 6, 2023
45fd903
feat: support cypres@13+
agoldis Sep 6, 2023
22576f7
added types and quick fix for removing not relevant attempts and scre…
miguelangarano Sep 6, 2023
7d62eac
chore: fixing types
agoldis Sep 6, 2023
3e35acd
Merge branch 'fix/cypress-13-ml' of https://github.com/currents-dev/c…
agoldis Sep 6, 2023
3d19fee
chore: release v1.10.0-beta.1
agoldis Sep 6, 2023
f37312e
fix: set test id for pending tests
agoldis Sep 6, 2023
a3d70da
chore: release v1.10.0-beta.2
agoldis Sep 6, 2023
bfd11fe
validation tests for cypress 12 and 13 with the latest modification b…
miguelangarano Sep 7, 2023
675f830
added viewer for results comparison
miguelangarano Sep 7, 2023
cf8ca5d
fix: issue 179 fixes
agoldis Sep 8, 2023
11268e2
chore: release v1.10.0-beta.3
agoldis Sep 8, 2023
2c08548
automated test validation
miguelangarano Sep 8, 2023
bda5ae1
fix for cypress 13 ccy 1.10
miguelangarano Sep 9, 2023
9369b8e
added test full pipeline
miguelangarano Sep 11, 2023
cd64d3a
log fixes
miguelangarano Sep 11, 2023
6a26e40
fix: coverage uploads
agoldis Sep 11, 2023
ed8a777
fix: backfill config
agoldis Sep 11, 2023
d39a81d
chore: release v1.10.0-beta.4
agoldis Sep 11, 2023
917ab2c
added avoided properties to make the tests pass
miguelangarano Sep 12, 2023
be0620c
fixing .env variables
miguelangarano Sep 12, 2023
a45f17c
ci files implementation
miguelangarano Sep 12, 2023
6773bab
chore: remove debug [skip ci]
agoldis Sep 12, 2023
e6de37c
Merge branch 'fix/cypress-13-ml' into fix/cypress-13-validation
agoldis Sep 12, 2023
949701d
functions refactor
miguelangarano Sep 13, 2023
47940f2
fixes to cypress cloud and tests
miguelangarano Sep 14, 2023
25ed7c8
added throw error test
miguelangarano Sep 14, 2023
cfe03d0
fix spec properties
miguelangarano Sep 14, 2023
67e6a0d
fix: pick test:after results explicitly
agoldis Sep 14, 2023
94d91fb
chore: release v1.10.0-beta.5
agoldis Sep 14, 2023
8025626
removed avoidable properties
miguelangarano Sep 14, 2023
8abf23e
fix ci files
miguelangarano Sep 14, 2023
505bc2c
added properties to comply with ci runner
miguelangarano Sep 14, 2023
61dabab
fix for comply with ci runner properties avoid
miguelangarano Sep 14, 2023
d8aa446
fix last avoidable properties for cypress 13
miguelangarano Sep 14, 2023
01c7371
cypress 12 ccy 1.9.4 fixes
miguelangarano Sep 15, 2023
e024cbf
fix ci cypress version installation
miguelangarano Sep 15, 2023
5317b24
fix cypress config to support e2e_smoke spec patttern
miguelangarano Sep 15, 2023
4ba5173
attempt to fix e2e-exports ci
miguelangarano Sep 15, 2023
c91d5f4
attempt 2 to fix e2e-exports ci
miguelangarano Sep 15, 2023
bb25f14
attempt 1 fix e2e-smoke-windows ci
miguelangarano Sep 15, 2023
c6f903a
roolback attempt 1 fix e2e-smoke-windows ci
miguelangarano Sep 15, 2023
6912895
fix ts errors and added api test property avoided
miguelangarano Sep 15, 2023
dc1792b
fix unit tests
miguelangarano Sep 15, 2023
7e228fe
make cy 12 test work
miguelangarano Sep 15, 2023
f6812d2
chore: ..
miguelangarano Sep 15, 2023
77c01fc
fix
miguelangarano Sep 15, 2023
67155b2
fix remove require cypress
miguelangarano Sep 15, 2023
13ba59a
chore: change script name
miguelangarano Sep 15, 2023
b3a1241
chore: wip [skip ci]
agoldis Sep 16, 2023
6ef9415
chore: .. [skip ci]
agoldis Sep 16, 2023
d1c0651
chore: add warnings
agoldis Sep 17, 2023
afb690a
chore: fix tests
agoldis Sep 17, 2023
f32a1d5
chore: ..
agoldis Sep 17, 2023
22b21db
chore: add dataFlow tests
agoldis Sep 19, 2023
20bec50
Merge branch 'fix/cypress-13-validation' into fix/cypress-13-typed
agoldis Sep 19, 2023
1d88e79
Merge remote-tracking branch 'private/fix/cypress-13-validation' into…
agoldis Sep 19, 2023
4f07bde
fix: videoUploadOnPasses [skip ci]
agoldis Sep 19, 2023
cf8bcb7
fix: update snapshots
agoldis Sep 19, 2023
709766c
chore: fix warnings
agoldis Sep 19, 2023
9587d1a
chore: testing CI
agoldis Sep 19, 2023
fd2e245
fix: spec.name
agoldis Sep 19, 2023
74ec56c
chore: ..
agoldis Sep 19, 2023
de458a8
chore: ..
agoldis Sep 19, 2023
9437283
chore: ..
agoldis Sep 19, 2023
92ad2a8
chore: ..
agoldis Sep 19, 2023
cc15ba6
fix: custom screenshot name
agoldis Sep 19, 2023
da7dbba
chore: e2e cy 13
agoldis Sep 19, 2023
479763f
chore: ..
agoldis Sep 19, 2023
3c78cc9
chore: ..
agoldis Sep 19, 2023
fc5587a
fix: reimplement cy13 comatibility tests
agoldis Sep 19, 2023
d9ab6ea
chore: readd e2e tests
agoldis Sep 19, 2023
9d29f63
chore: remove node 14
agoldis Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Integrate Cypress with alternative cloud services like Currents or Sorry Cypress
## Requirements

- Cypress version 10+
- NodeJS 14.7.0+
- NodeJS 16+

## Setup

Expand Down
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: npm install [email protected]

- name: Build
run: npm run build

- name: Run compatibility tests
working-directory: ./e2e/cypress-12-demo
env:
CURRENTS_API_KEY: ${{ secrets.CURRENTS_API_KEY }}
CURRENTS_RUN_BASE_URL: ${{ secrets.CURRENTS_RUN_BASE_URL }}
CURRENTS_PROJECT_ID: ${{ secrets.CURRENTS_PROJECT_ID }}
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}

run: >
npm run runtest
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
run: npm install cypress@13

- name: Build
run: npm run build

- name: Run compatibility tests
working-directory: ./e2e/cypress-13-demo
env:
CURRENTS_API_KEY: ${{ secrets.CURRENTS_API_KEY }}
CURRENTS_RUN_BASE_URL: ${{ secrets.CURRENTS_RUN_BASE_URL }}
CURRENTS_PROJECT_ID: ${{ secrets.CURRENTS_PROJECT_ID }}
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}

run: >
npx jest
4 changes: 2 additions & 2 deletions .github/workflows/e2e-exports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: ["18", "16", "14"]
node-version: ["20", "18", "16"]

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +21,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install npm (node14)
run: npm install -g npm@latest
run: npm install -g npm@8.19.4

- name: Install dependencies
run: npm ci
Expand Down
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
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,39 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch ",

"program": "${workspaceFolder}/packages/cypress-cloud/dist/bin/cli.js",
"args": ["--parallel", "--record", "--ci-build-id", "${input:ciBuildId}"],
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}/examples/webapp",
"env": {
"NODE_OPTIONS": "--inspect=9229",
"CURRENTS_PROJECT_ID": "mMsaes",
"CURRENTS_RECORD_KEY": "Fgt2j7QCjNedC2zG",
"CURRENTS_API_URL": "http://localhost:1234/"
},
"type": "node"
},
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "node"
}
],
"inputs": [
{
"id": "ciBuildId",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "date +%s",
"cwd": "${workspaceFolder}"
}
}
]
}
55 changes: 44 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,39 +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

# [1.10.0-beta.0](https://github.com/currents-dev/cypress-cloud/compare/v1.9.3...v1.10.0-beta.0) (2023-08-25)
- 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))

# [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))

# [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))

### 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))
- support cypres@13+ ([45fd903](https://github.com/currents-dev/cypress-cloud/commit/45fd9036ad686f7edfcb7859db64ce79692dd429))

## [1.9.3](https://github.com/currents-dev/cypress-cloud/compare/v1.9.2...v1.9.3) (2023-07-27)
# [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))

### Features

- 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))

## [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 @@ -330,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');
});
});
5 changes: 5 additions & 0 deletions e2e/cypress-12-demo/cypress/e2e/e.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('Should throw an error', () => {
it('Should throw an error', () => {
throw new Error("test error")
});
});
Loading