From 3f08aba550206770c894c9a48955bad4128deeb7 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 07:25:47 +0000 Subject: [PATCH] fix(e2e): fix dragSourceBefore and toggleManagedCategory selectors - dragSourceBefore: replace mat-list-item with .playlist-item as the drag target; playlist-item.component has no mat-list-item element, the inner container div carries the .playlist-item class - toggleManagedCategory: match categories by name only instead of name+itemCount; after an Xtream refresh the itemCounts Map passed to the dialog may be empty (streams not yet counted), causing a false mismatch even though the category is present and uniquely named https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp --- apps/electron-backend-e2e/src/category-management.e2e.ts | 2 +- apps/electron-backend-e2e/src/electron-test-fixtures.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/electron-backend-e2e/src/category-management.e2e.ts b/apps/electron-backend-e2e/src/category-management.e2e.ts index ee5c298dd..ab0be6178 100644 --- a/apps/electron-backend-e2e/src/category-management.e2e.ts +++ b/apps/electron-backend-e2e/src/category-management.e2e.ts @@ -170,7 +170,7 @@ async function toggleManagedCategory( (await categoryRow.locator('.item-count').textContent())?.trim() ?? ''; const itemCount = Number.parseInt(countText.replace(/[()]/g, ''), 10) || 0; - if (name !== targetCategory.name || itemCount !== targetCategory.itemCount) { + if (name !== targetCategory.name) { continue; } diff --git a/apps/electron-backend-e2e/src/electron-test-fixtures.ts b/apps/electron-backend-e2e/src/electron-test-fixtures.ts index 20cd4ae23..fd3d5a592 100644 --- a/apps/electron-backend-e2e/src/electron-test-fixtures.ts +++ b/apps/electron-backend-e2e/src/electron-test-fixtures.ts @@ -707,7 +707,7 @@ export async function dragSourceBefore( targetTitle: string ): Promise { const source = sourceRowByTitle(page, sourceTitle).locator('.drag-icon'); - const target = sourceRowByTitle(page, targetTitle).locator('mat-list-item'); + const target = sourceRowByTitle(page, targetTitle).locator('.playlist-item'); await expect(source.first()).toBeVisible(); await expect(target.first()).toBeVisible();