Skip to content

Commit f1771d4

Browse files
committed
Fix e2e clipboard shortcuts.
1 parent 2fad34c commit f1771d4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/frontend/tests/e2e-playwright/dashboard/recoveryPhrase.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ class RecoveryPhraseWizard {
3333
// We use selection and copying to the clipboard here to make sure that it
3434
// works correctly for power-users that don't physically write things down.
3535
await this.#dialog.getByRole("list").selectText();
36-
await this.#dialog.press("Meta+c");
36+
await this.#dialog
37+
.page()
38+
.keyboard.press(process.platform === "darwin" ? "Meta+C" : "Control+C");
3739
const clipboard = await readClipboard(this.#dialog.page());
3840
await this.#dialog
3941
.getByRole("button", { name: "I have written it down" })

src/frontend/tests/e2e-playwright/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ export const readClipboard = async (page: Page): Promise<string> => {
370370
return el;
371371
});
372372
// Paste clipboard content into it, read the textarea value and clean it up
373-
await page.keyboard.press("Meta+v");
373+
await page.keyboard.press(
374+
process.platform === "darwin" ? "Meta+V" : "Control+V",
375+
);
374376
return page.evaluate((el) => {
375377
const text = el.value;
376378
el.remove();

0 commit comments

Comments
 (0)