mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Improve error when node doesn't have any pinned repos
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user