diff --git a/services/web/cypress/support/shared/commands/index.ts b/services/web/cypress/support/shared/commands/index.ts index 2bd102b220..d1f1c135c7 100644 --- a/services/web/cypress/support/shared/commands/index.ts +++ b/services/web/cypress/support/shared/commands/index.ts @@ -12,6 +12,7 @@ declare global { interceptCompile: typeof interceptCompile interceptEvents: typeof interceptEvents interceptSpelling: typeof interceptSpelling + index: () => Chainable } } } @@ -19,3 +20,6 @@ declare global { Cypress.Commands.add('interceptCompile', interceptCompile) Cypress.Commands.add('interceptEvents', interceptEvents) Cypress.Commands.add('interceptSpelling', interceptSpelling) +Cypress.Commands.add('index', { prevSubject: true }, subject => { + return cy.wrap(subject).invoke('index') +})