From 9b9a901ed5f4453ef93bcef54ab5c9bc43d4d45d Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Wed, 1 Jan 2025 21:57:09 +0200 Subject: [PATCH] test: speed up writing the debug command to the terminal (#89) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This saves 3-4 seconds and is much less annoying 🙂 --- .../cypress/e2e/blink-ripgrep/basic_spec.cy.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration-tests/cypress/e2e/blink-ripgrep/basic_spec.cy.ts b/integration-tests/cypress/e2e/blink-ripgrep/basic_spec.cy.ts index 858b4af..7ba4d74 100644 --- a/integration-tests/cypress/e2e/blink-ripgrep/basic_spec.cy.ts +++ b/integration-tests/cypress/e2e/blink-ripgrep/basic_spec.cy.ts @@ -294,7 +294,11 @@ describe("debug mode", () => { // start insert mode cy.typeIntoTerminal("a") - cy.typeIntoTerminal(result.value ?? "") + // Quickly send the text over instead of typing it out. Cypress is a + // bit slow when writing a lot of text. + cy.runLuaCode({ + luaCode: `vim.api.nvim_feedkeys([[${result.value}]], "n", true)`, + }) cy.typeIntoTerminal("{enter}") // The results will lbe 5-10 lines of jsonl.