Skip to content

Commit 7372934

Browse files
authored
Upgrade cypress to 15.6.0 (#68)
* simplify exiting cypress 9 * upgrade cypress to 15.6.0
1 parent 94694f7 commit 7372934

File tree

7 files changed

+375
-311
lines changed

7 files changed

+375
-311
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ yarn-error.log
3636
testem.log
3737
/typings
3838
/cypress/videos/
39+
/cypress/downloads/
3940

4041
# System Files
4142
.DS_Store

cypress.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const config: any = {
2+
e2e: {
3+
// include existing .cy.ts specs and legacy integration folder
4+
specPattern: ['cypress/**/*.cy.{js,ts}', 'cypress/integration/**/*.cy.{js,ts}'],
5+
supportFile: 'cypress/support/index.ts',
6+
videosFolder: 'cypress/videos',
7+
downloadsFolder: 'cypress/downloads',
8+
baseUrl: 'https://text-compare.netlify.app',
9+
setupNodeEvents(on, cfg) {
10+
// keep default behavior; add plugins here if needed
11+
return cfg;
12+
}
13+
}
14+
};
15+
16+
export default config;

cypress/integration/home.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference types="Cypress" />
1+
/// <reference types="cypress" />
22

33
describe('Text Compare App', () => {
44
beforeEach(() => {

cypress/support/commands.ts

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,7 @@
1-
// ***********************************************
2-
// This example namespace declaration will help
3-
// with Intellisense and code completion in your
4-
// IDE or Text Editor.
5-
// ***********************************************
6-
// declare namespace Cypress {
7-
// interface Chainable<Subject = any> {
8-
// customCommand(param: any): typeof customCommand;
9-
// }
10-
// }
11-
//
12-
// function customCommand(param: any): void {
13-
// console.warn(param);
14-
// }
15-
//
16-
// NOTE: You can use it like so:
17-
// Cypress.Commands.add('customCommand', customCommand);
18-
//
19-
// ***********************************************
20-
// This example commands.js shows you how to
21-
// create various custom commands and overwrite
22-
// existing commands.
23-
//
24-
// For more comprehensive examples of custom
25-
// commands please read more here:
26-
// https://on.cypress.io/custom-commands
27-
// ***********************************************
28-
//
29-
//
30-
// -- This is a parent command --
31-
// Cypress.Commands.add("login", (email, password) => { ... })
32-
//
33-
//
34-
// -- This is a child command --
35-
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
36-
//
37-
//
38-
// -- This is a dual command --
39-
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
40-
//
41-
//
42-
// -- This will overwrite an existing command --
43-
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
1+
// Custom Cypress commands can go here.
2+
// Kept minimal to avoid unnecessary boilerplate in repository.
3+
4+
// Example:
5+
// Cypress.Commands.add('login', (email, password) => { /* ... */ });
6+
7+
export {};

cypress/support/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
1515

16-
// When a command from ./commands is ready to use, import with `import './commands'` syntax
17-
// import './commands';
16+
// Load custom commands
17+
import './commands';
18+
19+
// Additional global test setup can be added here.

0 commit comments

Comments
 (0)