From d64450d2cd9d04232624241b77feccfcc1366247 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Tue, 9 Jul 2024 22:28:53 +1200 Subject: [PATCH] Fixed issue with allowClipboard function not working in tests --- tests/lib/screenshot-testing/support/page-renderer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/screenshot-testing/support/page-renderer.js b/tests/lib/screenshot-testing/support/page-renderer.js index c1bca1fa634..9c4000a8652 100644 --- a/tests/lib/screenshot-testing/support/page-renderer.js +++ b/tests/lib/screenshot-testing/support/page-renderer.js @@ -526,8 +526,8 @@ PageRenderer.prototype.getWholeCurrentUrl = function () { return this.webpage.evaluate(() => window.location.href); }; -PageRenderer.prototype.allowClipboard = function () { - this.browserContext.overridePermissions(this.getWholeCurrentUrl(), ['clipboard-read', 'clipboard-write']); +PageRenderer.prototype.allowClipboard = async function () { + await this.browserContext.overridePermissions(await this.getWholeCurrentUrl(), ['clipboard-read', 'clipboard-write']); };