mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Handle custom httpd port
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>
This commit is contained in:
@@ -29,7 +29,7 @@ test("global hotkeys", async ({ page }) => {
|
||||
await expect(page.getByPlaceholder(searchPlaceholder)).toHaveValue(
|
||||
"searchquery?",
|
||||
);
|
||||
await expect(page.getByText("⏎")).toBeVisible();
|
||||
await expect(page.getByText("⏎")).toBeHidden();
|
||||
await expect(page.getByPlaceholder(searchPlaceholder)).not.toBeFocused();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
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");
|
||||
});
|
||||
Reference in New Issue
Block a user