Skip to content

Commit a0439aa

Browse files
committed
simplify exiting cypress 9
1 parent 94694f7 commit a0439aa

File tree

3 files changed

+12
-45
lines changed

3 files changed

+12
-45
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/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)