Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Add firefox to the clipboard tests
Sebastian Martinez committed 1 year ago
commit 8d30407de64de7367814b05262717980a0ef0456
parent a73c549
1 file changed +4 -4
modified tests/e2e/clipboard.spec.ts
@@ -18,12 +18,12 @@ async function expectClipboard(content: string, page: Page) {
// so that we don't run into race conditions, because there is no way to isolate
// the clipboard in Playwright yet.
test("copy to clipboard", async ({ page, browserName, context }) => {
-
  // These tests only work in Chromium, because other browsers don't support
-
  // changing permissions.
-
  if (browserName !== "chromium") {
+
  if (browserName === "chromium") {
+
    await context.grantPermissions(["clipboard-read", "clipboard-write"]);
+
  } else if (browserName === "webkit") {
+
    // We aren't able to programatically change the permissions in webkit.
    test.skip();
  }
-
  await context.grantPermissions(["clipboard-read", "clipboard-write"]);

  await page.goto(sourceBrowsingUrl);