Skip to content

Commit

Permalink
Merge pull request #281 from javierbrea/cypress-12
Browse files Browse the repository at this point in the history
Support Cypress 12
  • Loading branch information
javierbrea committed Dec 8, 2022
2 parents 2c12e95 + e17511d commit 966f60a
Show file tree
Hide file tree
Showing 37 changed files with 11,769 additions and 6,022 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Removed
### BREAKING CHANGES

## [7.0.0] - 2022-12-08

### Added
- test: Add Cypress v12 tests

### Removed
- test: Drop support for Cypress 7

## [6.0.0] - 2022-12-07

### Added
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,22 @@ Note: The example above is only valid for Cypress versions lower than 10. Use th

## Tests

To ensure the plugin stability, it is being tested with Cypress major versions 7.x, 8.x, 9.x, 10.x and 11.x, and new releases will be published for each new Cypress minor or major releases, updating the package E2E tests.
To ensure the plugin stability, the current major version is being tested with Cypress major versions 8.x, 9.x, 10.x, 11.x and 12.x, and new releases will be published for each new Cypress minor or major releases, updating the package E2E tests.

Latest versions used in the E2E tests can be checked in the `devDependencies` of the `package.json` files of the E2E tests:
* [Cypress v7.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-7/package.json)
Minor versions used in the E2E tests can be checked in the `devDependencies` of the `package.json` files of the E2E tests:
* [Cypress v8.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-8/package.json)
* [Cypress v9.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-9/package.json)
* [Cypress v10.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-10/package.json)
* [Cypress v11.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-11/package.json)
* [Cypress v12.x](https://github.com/javierbrea/cypress-fail-fast/blob/main/test-e2e/cypress-variants/cypress-12/package.json)

* If you need Cypress 6 or Cypress 7 support, use `cypress-fail-fast` 5.x
Even when current major version may work with previous Cypress versions, it is not tested, so, to be sure it works you should use:

* If you need Cypress 7 support, use `cypress-fail-fast` 6.x
* If you need Cypress 6 support, use `cypress-fail-fast` 5.x
* If you need Cypress 5 or lower, use `cypress-fail-fast` <= 4.x

Anyway, if you find any issue for a specific Cypress version, please report it at https://github.com/javierbrea/cypress-fail-fast/issues.
If you find any issue for a specific Cypress version, please report it at https://github.com/javierbrea/cypress-fail-fast/issues.

## Acknowledgements

Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress-fail-fast",
"version": "6.0.0",
"version": "7.0.0",
"description": "Skip the rest of Cypress tests on first failure",
"keywords": [
"cypress",
Expand Down Expand Up @@ -41,7 +41,7 @@
"prepare": "is-ci || husky install"
},
"peerDependencies": {
"cypress": ">=7.0.0"
"cypress": ">=8.0.0"
},
"dependencies": {
"chalk": "4.1.2"
Expand All @@ -51,7 +51,7 @@
"@stryker-mutator/jest-runner": "6.3.0",
"babel-eslint": "10.1.0",
"cross-env": "7.0.3",
"cypress": "11.2.0",
"cypress": "12.0.1",
"eslint": "8.29.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
Expand Down
10 changes: 5 additions & 5 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
"github>javierbrea/nodejs-ci-cd-shared-config"
],
"packageRules": [
{
"matchPaths": ["test-e2e/cypress-variants/cypress-7/package.json"],
"matchPackageNames": ["cypress"],
"allowedVersions": "<7.6.0"
},
{
"matchPaths": ["test-e2e/cypress-variants/cypress-8/package.json"],
"matchPackageNames": ["cypress"],
Expand All @@ -28,6 +23,11 @@
"matchPackageNames": ["cypress"],
"allowedVersions": "11.x"
},
{
"matchPaths": ["test-e2e/cypress-variants/cypress-12/package.json"],
"matchPackageNames": ["cypress"],
"allowedVersions": "12.x"
},
{
"matchPaths": ["package.json"],
"matchPackageNames": ["chalk"],
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.organization=javierbrea
sonar.projectKey=javierbrea_cypress-fail-fast
sonar.projectVersion=6.0.0
sonar.projectVersion=7.0.0

sonar.javascript.file.suffixes=.js
sonar.sourceEncoding=UTF-8
Expand Down
19 changes: 11 additions & 8 deletions test-e2e/commands/support/variants.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
const VARIANTS = [
{
name: "Cypress 7",
path: "cypress-7",
version: "7",
typescript: false,
skippable: true,
copyPlugin: true,
},
{
name: "Cypress 8",
path: "cypress-8",
Expand Down Expand Up @@ -40,6 +32,17 @@ const VARIANTS = [
name: "Cypress 11",
path: "cypress-11",
version: "11",
isLatest: false,
typescript: false,
skippable: false,
configFile: "cypress.config.js",
supportFile: "e2e.js",
copyPlugin: false,
},
{
name: "Cypress 12",
path: "cypress-12",
version: "12",
isLatest: true,
typescript: false,
skippable: false,
Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/all-tests-passing/a-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
5 changes: 4 additions & 1 deletion test-e2e/cypress-src/integration/all-tests-passing/b-file.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
cy.visit("/");
cy.task("runBIsWaiting");
cy.task("waitUntilRunAIsCancelled");
});

beforeEach(() => {
cy.visit("/");
});

it("should display title", () => {
cy.get("h1").should("have.text", "Items list");
});
Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/all-tests-passing/c-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/before-failing/b-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/before-failing/c-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/before-failing/d-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", { failFast: { enabled: false } }, () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", { failFast: { enabled: true } }, () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items disabled", { failFast: { enabled: false } }, () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items fail-fast enabled", { failFast: { enabled: true } }, () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down
3 changes: 3 additions & 0 deletions test-e2e/cypress-src/integration/many-failing-tests/a-file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe("List items", () => {
before(() => {
cy.task("log", "Executing before hook");
});

beforeEach(() => {
cy.visit("/");
});

Expand Down

0 comments on commit 966f60a

Please sign in to comment.