Improve error when node doesn't have any pinned repos

This commit is contained in:
Sebastian Martinez
2024-03-25 16:34:16 +01:00
committed by Rūdolfs Ošiņš
parent ba42de1a44
commit 4e0d557a65
2 changed files with 16 additions and 2 deletions
+2 -2
View File
@@ -241,9 +241,9 @@
baseUrlToString(api.baseUrl),
)} />
{:else}
<div class="heading">Nothing to see here</div>
<div class="heading">No pinned projects</div>
<div class="label">
Your preferred seed node doesn't have any pinned projects.
The selected seed node doesn't have any pinned projects.
</div>
{/if}
</div>
+14
View File
@@ -31,6 +31,20 @@ test("private projects", async ({ page, authenticatedPeer }) => {
await expect(page).toHaveScreenshot();
});
test("empty pinned projects", async ({ page }) => {
await page.route("**/api/v1/projects?show=pinned", async route => {
await route.fulfill({
status: 200,
contentType: "application/json",
json: [],
});
});
await page.goto("/", {
waitUntil: "networkidle",
});
await expect(page).toHaveScreenshot();
});
test("node not found", async ({ page }) => {
await page.goto("/nodes/this.node.does.not.exist.xyz", {
waitUntil: "networkidle",