Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Add Firefox to the clipboard tests
Merged did:key:z6MkkfM3...sVz5 opened 1 year ago

Webkit still doesn’t allow to grant permissions and doesn’t allow clipboard interaction by default.

This test closes issue eb0b990

check check-visual check-unit-test check-http-client-unit-test check-radicle-httpd check-e2e check-build check-http

👉 Preview 👉 Workflow runs 👉 Branch on GitHub

1 file changed +4 -4 a73c5490 8d30407d
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);