Commit Graph
8 Commits
Author SHA1 Message Date
Claude 0f3a75f2b2 fix(e2e): fix category-management navigation race and grid card click race
Two separate root causes:

1. category-management.e2e.ts: openWorkspaceSection('Live TV') was not
   awaited — pickSidebarCategory ran before the route settled on the live
   section, so it read VOD categories from the stale sidebar (e.g. 'Action'
   instead of a live category). The manage-categories dialog opens for the
   live section, so searching for a VOD name found nothing.
   Fix: add waitForURL(/\/workspace\/xtreams\/[^/]+\/live/) after both
   openWorkspaceSection('Live TV') calls.

2. recent.e2e.ts / favorites.e2e.ts: waitForFirstGridListCardTitle read
   the first card's title, but clickGridListCardByTitle then did a fresh
   DOM search by that title. Between those two calls the grid could
   re-sort/paginate, making the card unfindable.
   Fix: new clickFirstGridListCard helper atomically reads the title and
   clicks the same card reference, replacing the two-step pattern.

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-04-01 06:07:26 +00:00
Claude df0c7f79d1 fix(e2e): wait for category-item list to render before interacting with manage-categories dialog
The dialog's 'Select All' button appears as soon as isLoading() flips,
but Angular still needs a change-detection cycle to paint the @for loop.
On slower CI runners (especially after a refreshSource cycle) the
.category-item rows were not yet in the DOM when toggleManagedCategory
tried to locate them, causing a spurious 5 s timeout.

Fix: add an explicit `toBeVisible` guard on the first .category-item
inside openManageCategoriesDialog, and raise the per-row timeout in
toggleManagedCategory from 5 s to 15 s.

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-04-01 05:32:53 +00:00
Claude ffa5b59a5c fix(e2e): fix category-management filter scoping and recent grid pagination
- category-management: replace filter({ has: dialog.locator(...) }) with
  filter({ hasText }) on the .category-item row. Playwright cannot scope an
  absolute locator (created via dialog.locator()) to each candidate element
  when used inside filter({ has: }), so the query always returned empty.
  Using hasText on the whole row correctly retries until Angular's @for loop
  re-renders filteredCategories() after the search field is populated.

- recent.e2e.ts Xtream test: same pagination fix as favorites — derive
  movieTitle and seriesTitle from waitForFirstGridListCardTitle() instead of
  pickDistinctTitles(fixture.items)[0], which may be on page 2 of the
  date-sorted grid and never visible.

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-04-01 05:08:30 +00:00
Claude 78a2dd3766 fix(e2e): fix category-management race condition and favorites grid pagination
- toggleManagedCategory: replace manual count-loop with Playwright filter so
  the locator retries internally until Angular re-renders the filtered list
  after the search field is populated (previously called .count() before the
  @for loop had reacted to the updated searchTerm signal)

- favorites Xtream test: pick movie/series titles from the first displayed
  grid card instead of vodFixture.items[0]. The grid sorts by date-desc and
  paginates at 25 items; the first API item may land on page 2 making
  clickGridListCardByTitle time out with "element not found". Reading the
  title from the DOM after navigation ensures we always target a visible card.

- electron-test-fixtures: export waitForFirstGridListCardTitle helper

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-03-31 21:58:40 +00:00
Claude 3f08aba550 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
2026-03-31 07:25:47 +00:00
Claude ef344f4ee8 fix(e2e): resolve 4 remaining test failures in electron e2e suite
- Fix getVisibleSourceTitles: use .playlist-title selector instead of
  .mdc-list-item__primary-text which no longer matches playlist-item component
- Fix category-management test: re-navigate to sources page after
  refreshSource since refresh navigates away from sources
- Fix recent.e2e test: remove switchUnifiedCollectionContent calls after
  clearRecentItems since the content toggle disappears when all items cleared
- Fix stalker mock server: generate numeric episode IDs ("1","2",...) in
  season.series array so toSeriesNumbers() can parse them; previously used
  non-numeric IDs like "30000-s1-e1" which parsed to NaN, producing empty
  episode arrays and causing playFirstSeriesEpisode to time out

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-03-30 18:35:17 +00:00
Claude fc878e7c09 fix(e2e): update electron e2e fixtures for new unified add-playlist dialog
Replace menuitem selectors with mat-button-toggle[value] selectors in
all four playlist import helpers (file, url, xtream, stalker) and rename
openAddPlaylistMenu to openAddPlaylistDialog to reflect that clicking
"Add playlist" now opens a dialog directly instead of a dropdown menu.

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-03-30 17:52:12 +00:00
Claude 464d2eda01 fix(e2e): use mat-button-toggle value selectors for playlist type selection
mat-button-toggle elements inside a group render their internal buttons
with role="radio", not role="button", so getByRole('button') selectors
fail. Switch to attribute selectors targeting the value attribute instead.

https://claude.ai/code/session_01VU6ZZTG7YrhKhKBQvBfmpp
2026-03-30 06:48:49 +00:00