Skip to content

Commit

Permalink
Fixed issue with allowClipboard function not working in tests (#22382)
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 authored Jul 9, 2024
1 parent e2f66ed commit ab3bd14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/screenshot-testing/support/page-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
};


Expand Down

0 comments on commit ab3bd14

Please sign in to comment.