Fix repo and router specs

They were not run by the test suite at all, because they lacked the
.spec.ts suffix. This change makes sure they're run again and fixes a
all failing specs.
This commit is contained in:
Rūdolfs Ošiņš
2026-02-26 12:47:14 -06:00
parent 06aaa6a97c
commit 5c12ab3f92
6 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
},
"preferredSeeds": [
{
"hostname": "127.0.0.1",
"hostname": "localhost",
"port": 8081,
"scheme": "http"
}
+1 -1
View File
@@ -66,7 +66,7 @@
<Hotkeys />
{#if $activeRouteStore.resource === "booting"}
<div class="loading">
<div class="loading" role="progressbar" aria-label="App loading">
<Loading />
</div>
{:else if $activeRouteStore.resource === "nodes"}
+2 -2
View File
@@ -62,7 +62,7 @@ test("edit seed bookmarks", async ({ page }) => {
Location: route
.request()
.url()
.replace("seed.example.tld", "127.0.0.1"),
.replace("seed.example.tld", "localhost"),
},
}),
);
@@ -73,7 +73,7 @@ test("edit seed bookmarks", async ({ page }) => {
.getByRole("button", { name: "Toggle seed selector dropdown" })
.click();
await expect(page.getByPlaceholder("seed.radicle.example")).toHaveValue(
"127.0.0.1",
"localhost",
);
await expect(
page.getByRole("button", { name: "Default seeds can't be removed" }),
+1 -1
View File
@@ -287,7 +287,7 @@ test("clone modal", async ({ page }) => {
await page.getByRole("button", { name: "Git" }).click();
await expect(
page.getByText(
`http://127.0.0.1/${sourceBrowsingRid.replace("rad:", "")}.git`,
`http://localhost/${sourceBrowsingRid.replace("rad:", "")}.git`,
),
).toBeVisible();
});
@@ -35,8 +35,8 @@ test("navigation between node and repo pages", async ({ page }) => {
await expectBackAndForwardNavigationWorks("/nodes/localhost", page);
await expectUrlPersistsReload(page);
await page.getByRole("link", { name: "Local Node" }).click();
await expect(page).toHaveURL("/nodes/127.0.0.1");
await page.getByRole("link", { name: "Radicle logo localhost" }).click();
await expect(page).toHaveURL("/nodes/localhost");
});
test.describe("repo page navigation", () => {
@@ -46,7 +46,12 @@ test.describe("repo page navigation", () => {
const repoHistoryURL = `${sourceBrowsingUrl}/history/${aliceMainHead}`;
await page.goto(repoHistoryURL);
await page.getByText("Add README.md").click();
await page
.getByRole("link", {
name: "Verify that crate::DoubleColon::should_work()",
exact: true,
})
.click();
await expect(page).toHaveURL(
`${sourceBrowsingUrl}/commits/${aliceMainHead}`,
);
+3
View File
@@ -5,6 +5,9 @@ import { expect } from "@tests/support/fixtures.js";
export const expectUrlPersistsReload = async (page: Page) => {
const url = page.url();
await page.reload();
await page
.getByRole("progressbar", { name: "App loading" })
.waitFor({ state: "hidden" });
await expect(page).toHaveURL(url);
};