From 05e8afba7411874435e7ef069d9d09146d654f5b Mon Sep 17 00:00:00 2001 From: 4gray Date: Tue, 29 Sep 2026 20:50:11 +0200 Subject: [PATCH] test(e2e): assert the empty sidebar with web-first checks After deselecting every live category, the test polled readVisibleSidebarCategoryNames() until it returned []. The poll could hang when a row was removed mid-read (fixed generally in #1728). Assert the empty state directly instead: no visible category rows via toHaveCount(0), and the "No categories available" empty state in the context panel. Co-Authored-By: Claude Opus 5.5 --- .../src/category-management.e2e.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/electron-backend-e2e/src/category-management.e2e.ts b/apps/electron-backend-e2e/src/category-management.e2e.ts index eea9a1df4..560dc1f33 100644 --- a/apps/electron-backend-e2e/src/category-management.e2e.ts +++ b/apps/electron-backend-e2e/src/category-management.e2e.ts @@ -448,11 +448,16 @@ test.describe('Electron Xtream Category Management', () => { state: 'detached', }); - await expect - .poll(() => readVisibleSidebarCategoryNames(app.mainWindow), { - timeout: 15000, - }) - .toEqual([]); + await expect( + app.mainWindow.locator( + 'app-workspace-context-panel .category-item:visible' + ) + ).toHaveCount(0, { timeout: 15000 }); + await expect( + app.mainWindow.locator( + 'app-workspace-context-panel .category-empty-state' + ) + ).toContainText('No categories available'); await expect( app.mainWindow.getByRole('button', {