From 9f1ddf6a64ada633810e984314bf58ab4cfd2231 Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Wed, 4 Jan 2023 11:14:57 +0000 Subject: [PATCH] Merge pull request #10960 from overleaf/mj-keybindinging-cypress [web] Add cypress tests for emacs and vim keybindings GitOrigin-RevId: 17ada42d39ed81e2a0947fd102e5782428c1c619 --- services/web/cypress/support/shared/commands/index.ts | 4 ++++ 1 file changed, 4 insertions(+) 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') +})