diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 119ab03..698b01a 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -1,5 +1,6 @@ +/// // *********************************************** -// This example commands.js shows you how to +// This example commands.ts shows you how to // create various custom commands and overwrite // existing commands. // @@ -23,3 +24,14 @@ // // -- 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 +// drag(subject: string, options?: Partial): Chainable +// dismiss(subject: string, options?: Partial): Chainable +// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable +// } +// } +// } \ No newline at end of file diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js new file mode 100644 index 0000000..b5a0e99 --- /dev/null +++ b/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.ts is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands'; + +// Alternatively you can use CommonJS syntax: +// require('./commands') \ No newline at end of file diff --git a/cypress/support/eyes-index.d.js b/cypress/support/eyes-index.d.js new file mode 100644 index 0000000..b7a17d9 --- /dev/null +++ b/cypress/support/eyes-index.d.js @@ -0,0 +1 @@ +import "@applitools/eyes-cypress" \ No newline at end of file diff --git a/cypress/support/index.js b/cypress/support/index.js index 93c1dd4..47f07e4 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -20,3 +20,8 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') +Cypress.on('uncaught:exception', (err, runnable) => { + // returning false here prevents Cypress from + // failing the test + return false + });