Make specs less flaky

This commit is contained in:
Rūdolfs Ošiņš
2026-02-26 14:57:56 -06:00
parent 5c12ab3f92
commit dd243612b8
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -64,6 +64,7 @@ test("repo description", async ({ page, peer }) => {
description: "Radicle Heartwood Protocol & Stack",
});
await page.goto(peer.ridUrl(rid));
await page.waitForLoadState("networkidle");
await expect(
page.getByText("Radicle Heartwood Protocol & Stack"),
).toBeVisible();
+1
View File
@@ -131,6 +131,7 @@ test("commit messages with double colon not converted into single colon", async
test("expand commit message", async ({ page }) => {
await page.goto(sourceBrowsingUrl);
await page.waitForLoadState("networkidle");
await page
.getByRole("link", { name: `Commits ${aliceMainCommitCount}` })
.click();
+1
View File
@@ -3,6 +3,7 @@ import { createRepo } from "@tests/support/repo";
test("navigate issue listing", async ({ page }) => {
await page.goto(cobUrl);
await page.waitForLoadState("networkidle");
await page.getByRole("link", { name: "Issues 1" }).click();
await expect(page).toHaveURL(`${cobUrl}/issues`);
+4
View File
@@ -7,6 +7,7 @@ test("navigate patch details", async ({ page }) => {
await page.getByRole("link", { name: "Add subtitle to README" }).click();
await expect(page).toHaveURL(/commits\/[a-f0-9]{40}$/);
await page.goBack();
await page.waitForLoadState("networkidle");
await page.getByRole("link", { name: "Changes" }).click();
await expect(page).toHaveURL(/patches\/[a-f0-9]{40}\?tab=changes$/);
});
@@ -77,6 +78,7 @@ test("navigate through revision diffs", async ({ page }) => {
/patches\/[a-f0-9]{40}\?diff=38c225e2a0b47ba59def211f4e4825c31d9463ec\.\.9e4feab1b2123dfa5f22bd0e4656060ec9296638$/,
);
await page.goBack();
await page.waitForLoadState("networkidle");
await secondRevision
.getByRole("button", { name: "toggle-context-menu" })
.first()
@@ -94,6 +96,7 @@ test("navigate through revision diffs", async ({ page }) => {
/patches\/[a-f0-9]{40}\?diff=88b7fd90389c1a629f91ed7bf838d4b947426622\.\.9e4feab1b2123dfa5f22bd0e4656060ec9296638$/,
);
await page.goBack();
await page.waitForLoadState("networkidle");
}
// First revision and DiffStatBadge shortcut.
{
@@ -141,6 +144,7 @@ test("commit listing ordering keeping stable on browser navigation", async ({
await expectCorrectCommitListing();
await page.getByRole("link", { name: "Rewrite subtitle to README" }).click();
await page.goBack();
await page.waitForLoadState("networkidle");
await page
.getByRole("heading", { name: "Taking another stab at the README" })
.waitFor();