install cypress and add initial test
This commit is contained in:
5
cypress/support/e2e.ts
Normal file
5
cypress/support/e2e.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
Cypress.Commands.add('dataCy', value => {
|
||||
return cy.get(`[data-cy=${value}]`);
|
||||
});
|
||||
11
cypress/support/index.d.ts
vendored
Normal file
11
cypress/support/index.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
/**
|
||||
* Custom command to select DOM element by data-cy attribute.
|
||||
* @example cy.dataCy('greeting')
|
||||
*/
|
||||
dataCy(value: string): Chainable<JQuery<HTMLElement>>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user