aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/tests
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 17:32:15 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 17:32:15 -0800
commit1413eca1f1dfea2fe125a5dc9bde293058cc3e03 (patch)
treeb6956145c6ecb05a1c65e4a396ccc669a15a7e89 /frontend/tests
parent9b3cff9665e7c69691963b740b653b4fcd2b467d (diff)
downloadneko-1413eca1f1dfea2fe125a5dc9bde293058cc3e03.tar.gz
neko-1413eca1f1dfea2fe125a5dc9bde293058cc3e03.tar.bz2
neko-1413eca1f1dfea2fe125a5dc9bde293058cc3e03.zip
ci: enhance workflow with E2E tests and Docker check
Diffstat (limited to 'frontend/tests')
-rw-r--r--frontend/tests/e2e.spec.ts30
1 files changed, 14 insertions, 16 deletions
diff --git a/frontend/tests/e2e.spec.ts b/frontend/tests/e2e.spec.ts
index 3f4898a..1fa10ce 100644
--- a/frontend/tests/e2e.spec.ts
+++ b/frontend/tests/e2e.spec.ts
@@ -32,34 +32,32 @@ test.describe('Neko Reader E2E', () => {
// Wait for it to appear
await expect(page.getByText(feedUrl)).toBeVisible();
+ const waitForLoader = async () => {
+ await page.waitForFunction(() => {
+ const loading = document.querySelector('.feed-items-loading') ||
+ document.body.innerText.includes('Loading...');
+ return !loading;
+ }, { timeout: 15000 });
+ };
+
// 5. Navigate to Feed
+ console.log('Step 5: Navigate to Home');
await page.goto('/v2/');
+ await expect(page).toHaveURL(/.*\/v2\/?$/);
// Default view is now the stream.
// It should NOT show "Select a feed" anymore.
// Wait for items or "No items found" or loading state
+ await waitForLoader();
await expect(
page
.locator('.feed-items')
- .or(page.locator('.feed-items-loading'))
.or(page.getByText('No items found'))
+ .or(page.locator('.feed-items-error'))
).toBeVisible({ timeout: 10000 });
// 6. Verify Tag View
- // Go to a tag URL (simulated, since we can't easily add tags via UI in this test yet without setup)
- // But we can check if the route loads without crashing
- await page.goto('/v2/tag/Tech');
- // The TagView component might show "Category: Tech" or "Tag: Tech" or just items.
- // In the current FeedItems.tsx it doesn't show a header, but it should load.
- // The TagView component might show "Category: Tech" or "Tag: Tech" or just items.
- // In the current FeedItems.tsx it doesn't show a header, but it should load.
- await expect(
- page
- .locator('.feed-items')
- .or(page.locator('.feed-items-loading'))
- .or(page.getByText('No items found'))
- ).toBeVisible({ timeout: 10000 });
-
- // 7. Logout
+ // 6. Logout
+ console.log('Step 6: Logout');
await page.click('text=Logout');
await expect(page).toHaveURL(/.*\/v2\/login/);
});