Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix flaky specs
Rūdolfs Ošiņš committed 3 years ago
commit 2c5830a076fe08dc01c87476263f11ac9f396c9f
parent b14d35ced080f61c027b9791ec44c03d62450f3a
3 files changed +6 -6
modified tests/e2e/clipboard.spec.ts
@@ -24,7 +24,7 @@ test("copy to clipboard", async ({ page, browserName, context }) => {
  if (browserName !== "chromium") {
    test.skip();
  }
-
  context.grantPermissions(["clipboard-read", "clipboard-write"]);
+
  await context.grantPermissions(["clipboard-read", "clipboard-write"]);

  await page.goto(projectFixtureUrl);

modified tests/e2e/project.spec.ts
@@ -388,7 +388,7 @@ test("only one modal can be open at a time", async ({ page }) => {
  }
  await expect(page.locator("text=feature/branch")).not.toBeVisible();

-
  page.locator('button[name="Settings"]').click();
+
  await page.locator('button[name="Settings"]').click();
  await expect(page.locator("text=Code font")).toBeVisible();
  await expect(page.locator("text=Use the Radicle CLI")).not.toBeVisible();
  await expect(page.locator("text=bob hyyzz9")).not.toBeVisible();
modified tests/e2e/settings.spec.ts
@@ -17,7 +17,7 @@ test("default settings", async ({ page }) => {

test("settings persistance", async ({ page }) => {
  await page.goto(sourceBrowsingFixture);
-
  page.locator('button[name="Settings"]').click();
+
  await page.locator('button[name="Settings"]').click();

  await page.locator(".theme .toggle").click();
  await page.getByText("Code font").click();
@@ -26,7 +26,7 @@ test("settings persistance", async ({ page }) => {
  await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
  await expect(page.locator("html")).toHaveAttribute("data-codefont", "system");

-
  page.reload();
+
  await page.reload();

  await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
  await expect(page.locator("html")).toHaveAttribute("data-codefont", "system");
@@ -34,7 +34,7 @@ test("settings persistance", async ({ page }) => {

test("change theme", async ({ page }) => {
  await page.goto(sourceBrowsingFixture);
-
  page.locator('button[name="Settings"]').click();
+
  await page.locator('button[name="Settings"]').click();

  await page.locator(".theme .toggle").click();
  await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
@@ -58,7 +58,7 @@ test("change theme", async ({ page }) => {
test("change code font", async ({ page }) => {
  await page.goto(sourceBrowsingFixture);

-
  page.locator('button[name="Settings"]').click();
+
  await page.locator('button[name="Settings"]').click();
  await page.getByText("Code font").click();

  await page.getByText("System").click();