Files
radicle-explorer/tests/e2e/httpd.spec.ts
T
Sebastian Martinez 910c103a9b Change rad web command when httpd port changes
Instead of using always the `config.seeds.defaultHttpdPort` which is
443, we should take into account the `customPort` variable that is set by the
user.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-31 15:38:36 +02:00

28 lines
777 B
TypeScript

import { expect, test } from "@tests/support/fixtures.js";
test("rad web command reacts to port change", async ({ page, peerManager }) => {
const peer = await peerManager.startPeer({
name: "port-test",
});
await peer.startHttpd(8090);
await page.goto("/");
await page.getByRole("button", { name: "radicle.local" }).click();
await expect(
page.getByText(
"rad web --frontend http://localhost:3001 --backend http://127.0.0.1:8081",
),
).toBeVisible();
await page.locator('input[name="port"]').fill("8090");
await page.locator('input[name="port"]').press("Enter");
await expect(
page.getByText(
"rad web --frontend http://localhost:3001 --backend http://127.0.0.1:8090",
),
).toBeVisible();
await peer.stopHttpd();
});