mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 22:26:16 -08:00
test(workspace): check the header switcher before history exists
Since the header's history fallback, a list reached by navigation leads with Back. The macOS check now takes the switcher on the first page, which has nothing to go back to, and Back on a detail page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a367e149a
commit
2169191e70
2 files changed
+16
-12
No files matched your search
@@ -346,17 +346,24 @@ test.describe('macOS traffic lights', () => {
|
||||
|
||||
try {
|
||||
const page = app.mainWindow;
|
||||
await addXtreamPortal(page);
|
||||
await waitForXtreamWorkspaceReady(page);
|
||||
const lights = await trafficLights(app);
|
||||
const switcher = 'app-playlist-switcher';
|
||||
const back = 'workspace-header-back';
|
||||
|
||||
await expectHeaderClearOfLights(page, lights, switcher, '100 %');
|
||||
// The first page has no history to go back to: the switcher leads.
|
||||
await expectHeaderClearOfLights(page, lights, switcher, 'start');
|
||||
await zoomOutFully(page);
|
||||
await expectHeaderClearOfLights(page, lights, switcher, 'min zoom');
|
||||
await expectHeaderClearOfLights(
|
||||
page,
|
||||
lights,
|
||||
switcher,
|
||||
'start at min zoom'
|
||||
);
|
||||
await resetZoom(page);
|
||||
|
||||
// A detail page puts its Back first, pulled 8px toward the edge.
|
||||
await addXtreamPortal(page);
|
||||
await waitForXtreamWorkspaceReady(page);
|
||||
await page
|
||||
.getByRole('link', { name: 'Series', exact: true })
|
||||
.click();
|
||||
@@ -364,6 +371,8 @@ test.describe('macOS traffic lights', () => {
|
||||
await expect(page.getByTestId(back)).toBeVisible({
|
||||
timeout: 20_000,
|
||||
});
|
||||
await expectHeaderClearOfLights(page, lights, back, 'detail');
|
||||
await zoomOutFully(page);
|
||||
await expectHeaderClearOfLights(
|
||||
page,
|
||||
lights,
|
||||
@@ -371,12 +380,6 @@ test.describe('macOS traffic lights', () => {
|
||||
'detail at min zoom'
|
||||
);
|
||||
await resetZoom(page);
|
||||
await expectHeaderClearOfLights(
|
||||
page,
|
||||
lights,
|
||||
back,
|
||||
'detail at 100 %'
|
||||
);
|
||||
} finally {
|
||||
await closeElectronApp(app);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user