Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ yarn-error.log
testem.log
/typings
/cypress/videos/
/cypress/downloads/

# System Files
.DS_Store
Expand Down
16 changes: 16 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const config: any = {
e2e: {
// include existing .cy.ts specs and legacy integration folder
specPattern: ['cypress/**/*.cy.{js,ts}', 'cypress/integration/**/*.cy.{js,ts}'],
supportFile: 'cypress/support/index.ts',
videosFolder: 'cypress/videos',
downloadsFolder: 'cypress/downloads',
baseUrl: 'https://text-compare.netlify.app',
setupNodeEvents(on, cfg) {
// keep default behavior; add plugins here if needed
return cfg;
}
}
};

export default config;
2 changes: 1 addition & 1 deletion cypress/integration/home.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="Cypress" />
/// <reference types="cypress" />

describe('Text Compare App', () => {
beforeEach(() => {
Expand Down
50 changes: 7 additions & 43 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,7 @@
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// ***********************************************
// declare namespace Cypress {
// interface Chainable<Subject = any> {
// customCommand(param: any): typeof customCommand;
// }
// }
//
// function customCommand(param: any): void {
// console.warn(param);
// }
//
// NOTE: You can use it like so:
// Cypress.Commands.add('customCommand', customCommand);
//
// ***********************************************
// This example commands.js 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) => { ... })
// Custom Cypress commands can go here.
// Kept minimal to avoid unnecessary boilerplate in repository.

// Example:
// Cypress.Commands.add('login', (email, password) => { /* ... */ });

export {};
6 changes: 4 additions & 2 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
// https://on.cypress.io/configuration
// ***********************************************************

// When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands';
// Load custom commands
import './commands';

// Additional global test setup can be added here.
Loading