Skip to content

Commit 13d3234

Browse files
devvaannshabose
authored andcommitted
fix: terminal paste tests fails
1 parent 7edbe95 commit 13d3234

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

test/spec/Terminal-integ-test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -708,14 +708,14 @@ define(function (require, exports, module) {
708708
await openTerminal();
709709
await waitForShellReady();
710710

711-
// Mock clipboard.readText to return a known string,
712-
// since the test iframe may not have clipboard
713-
// permission (no window focus).
711+
// Mock Phoenix.app.clipboardReadText to return a
712+
// known string, since the test iframe may not have
713+
// clipboard permission (no window focus).
714714
const pasteText = "PASTEMARKER456";
715-
const clipboard = testWindow.navigator.clipboard;
716-
spyOn(clipboard, "readText").and.returnValue(
717-
testWindow.Promise.resolve(pasteText)
718-
);
715+
spyOn(testWindow.Phoenix.app, "clipboardReadText")
716+
.and.returnValue(
717+
testWindow.Promise.resolve(pasteText)
718+
);
719719

720720
// Execute the paste command
721721
await CommandManager.execute("terminal.paste");

0 commit comments

Comments
 (0)