Skip to content

Commit

Permalink
3.0.0: Upgrade to cypress 13
Browse files Browse the repository at this point in the history
  • Loading branch information
marjan-georgiev committed Jun 19, 2024
1 parent 9a8609b commit 3034021
Show file tree
Hide file tree
Showing 10 changed files with 5,296 additions and 3,176 deletions.
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
CHANGELOG
=========
# CHANGELOG

## HEAD (Unreleased)

_(none)_

---

## 3.0.0 (2024-06-19)

- Upgrade to cypress 13

## 2.0.2 (2021-11-09)

_(none)_

## 2.0.1 (2021-04-20)

- Fix peerDependencies (requires Cypress v7)

## 2.0.0 (2021-04-20)

- Use `cy.intercept`

## 1.1.0 (2021-04-16)

- Support windows paths

## 1.0.1 (2020-10-30)

_(none)_

## 1.0.0 (2020-10-30)
_(none)_

_(none)_
11 changes: 11 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
supportFile: 'cypress/support/index.js',
specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx}',
setupNodeEvents(on, config) {
return require('cypress/plugins/index.js')(on, config);
},
},
});
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

8 changes: 3 additions & 5 deletions cypress/integration/failExtraApiCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ describe('failExtraApiCalls', () => {
});

beforeEach(() => {
cy.server();

cy.failExtraApiCalls('/api/');
cy.route('/api/test/');
cy.intercept('/api/test/', {});
});

it('should fail on unmocked calls', () => {
Expand All @@ -17,12 +15,12 @@ describe('failExtraApiCalls', () => {
});

it('should not fail on defined routes', () => {
cy.request('/api/test/').should('contain', 'The file was not found');
cy.request('/api/test/').should('equal', '');
});

it('should fail on unmocked but valid calls', () => {
cy.fails(() => {
cy.request('/api/test.json').should('contain', 'The file was not found');
}, '/api/test.json" is not mocked');
});
});
});
6 changes: 2 additions & 4 deletions cypress/integration/logExtraApiCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ describe('logExtraApiCalls', () => {
});

beforeEach(() => {
cy.server();

cy.logExtraApiCalls('/api/');
cy.route('/api/test/');
cy.intercept('/api/test/');
});

it('should log on undefined routes', () => {
Expand All @@ -21,4 +19,4 @@ describe('logExtraApiCalls', () => {
it('should not interfere with exiting api', () => {
cy.request('/api/test.json').should('match', /"test": "api"/);
});
});
});
Loading

0 comments on commit 3034021

Please sign in to comment.