mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-03 10:40:30 +08:00
We only supported fetching the default httpd port (8080). This commit removes navigation to `radicle.local` which represents `0.0.0.0:8080`, and prepares the app for defining custom port. Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
30 lines
893 B
TypeScript
30 lines
893 B
TypeScript
import { test, expect } from "@tests/support/fixtures.js";
|
|
|
|
test("change httpd port", async ({ page, peerManager }) => {
|
|
const peer = await peerManager.startPeer({ name: "httpd" });
|
|
|
|
await peer.startHttpd(8070);
|
|
await peer.startNode();
|
|
|
|
await page.goto("/");
|
|
await page.getByRole("button", { name: "radicle.local" }).click();
|
|
|
|
await page.locator('input[name="port"]').fill("8070");
|
|
await page.locator('input[name="port"]').press("Enter");
|
|
|
|
const { stdout } = await peer.rad([
|
|
"web",
|
|
"--frontend",
|
|
"http://localhost:3000",
|
|
"--backend",
|
|
"http://127.0.0.1:8070",
|
|
]);
|
|
const match = stdout.trim().match(/(http:\/\/localhost:3000\/.*)$/);
|
|
if (!match) {
|
|
throw Error("Not able to parse auth url");
|
|
}
|
|
await page.goto(match[0]);
|
|
await expect(page.getByText("Authenticated")).toBeVisible();
|
|
await expect(page).toHaveURL("/seeds/127.0.0.1:8070");
|
|
});
|