diff options
author | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-06 14:16:39 +0100 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-06 14:16:39 +0100 |
commit | aad4162be83486553b08dacf556814f4108a2a81 (patch) | |
tree | e8507d8acd4f0428f4e3ee171ddbe852c7de4e95 /cypress/support/commands.ts | |
parent | f80e509895b7b2c1d716ac276977b7165a13c192 (diff) |
Set up Cypress
Diffstat (limited to 'cypress/support/commands.ts')
-rw-r--r-- | cypress/support/commands.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts new file mode 100644 index 0000000..698b01a --- /dev/null +++ b/cypress/support/commands.ts @@ -0,0 +1,37 @@ +/// <reference types="cypress" /> +// *********************************************** +// This example commands.ts shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) +// +// declare global { +// namespace Cypress { +// interface Chainable { +// login(email: string, password: string): Chainable<void> +// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> +// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> +// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> +// } +// } +// }
\ No newline at end of file |