Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add private project visual tests
Sebastian Martinez committed 2 years ago
commit e080883059990c62f52f957f27229b6cac95da86
parent 3c72bfad48eb1eb2aaab6a8516fcec6f23658a35
1 file changed +16 -0
modified tests/visual/node.spec.ts
@@ -1,4 +1,5 @@
import { test, expect } from "@tests/support/fixtures.js";
+
import { createProject } from "@tests/support/project.js";

test("node page", async ({ page }) => {
  await page.addInitScript(() => {
@@ -15,6 +16,21 @@ test("node page", async ({ page }) => {
  await expect(page).toHaveScreenshot();
});

+
test("private projects", async ({ page, authenticatedPeer }) => {
+
  await createProject(authenticatedPeer, {
+
    name: "private-project",
+
    visibility: "private",
+
  });
+
  await page.goto("/", { waitUntil: "networkidle" });
+
  await expect(page).toHaveScreenshot();
+

+
  await page.goto(authenticatedPeer.uiUrl(), { waitUntil: "networkidle" });
+
  await expect(page).toHaveScreenshot();
+

+
  await page.getByRole("link", { name: "private-project Private" }).click();
+
  await expect(page).toHaveScreenshot();
+
});
+

test("node not found", async ({ page }) => {
  await page.goto("/nodes/this.node.does.not.exist.xyz", {
    waitUntil: "networkidle",