Files
radicle-explorer/tests/e2e/node.spec.ts
T
Sebastian MartinezandRūdolfs Ošiņš 1add6958cb Add externalNodes to node detail view
Instead of showing the node id with a clipboard that copies a possible
wrong port number, this commit adds the externalAddresses config to the
node detail view, so node operators can define which externalAddresses
should show up.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-11-06 14:34:18 +01:00

54 lines
1.4 KiB
TypeScript

import {
aliceMainHead,
expect,
shortNodeRemote,
sourceBrowsingRid,
test,
} from "@tests/support/fixtures.js";
test("node metadata", async ({ page, peerManager }) => {
const peer = await peerManager.startPeer({
name: "node-metadata-peer",
});
await peer.startHttpd();
await peer.startNode({
policy: "track",
scope: "all",
alias: "palm",
externalAddresses: ["seed.radicle.test:8123"],
});
await page.goto(peer.uiUrl());
await expect(
page.locator(".header").getByText("radicle.local"),
).toBeVisible();
await expect(
page.getByText(`${shortNodeRemote}@seed.radicle.test:8123`),
).toBeVisible();
await expect(page.getByText("0.1.0-")).toBeVisible();
await peer.stopHttpd();
await peer.stopNode();
});
test("node projects", async ({ page }) => {
await page.goto("/nodes/radicle.local");
const project = page.locator(".project", { hasText: "source-browsing" });
// Project metadata.
{
await expect(project.getByText("source-browsing")).toBeVisible();
await expect(
project.getByText("Git repository for source browsing tests"),
).toBeVisible();
await expect(project.getByText(aliceMainHead)).toBeVisible();
}
// Show project ID on hover.
{
await expect(project.getByText(sourceBrowsingRid)).not.toBeVisible();
await project.hover();
await expect(project.getByText(sourceBrowsingRid)).toBeVisible();
}
});