mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -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);
|
||||
}
|
||||
|
||||
@@ -413,8 +413,9 @@ The Electron window hides the native title bar on all desktop platforms
|
||||
layout. Off macOS nothing is published and the defaults apply. The phone
|
||||
layout, which puts the rail in a row above the header, ignores the
|
||||
inset. `window-controls.e2e.ts` ("macOS traffic lights") checks the rail
|
||||
alignment, the first header control (switcher, then a detail page's Back)
|
||||
and the content top at default and minimum zoom.
|
||||
alignment, the first header control (the switcher on the first page,
|
||||
which has no history fallback yet, then a detail page's Back) and the
|
||||
content top at default and minimum zoom.
|
||||
2. Windows and Linux use renderer-drawn window controls
|
||||
(`app-window-controls`, `libs/ui/components/src/lib/window-controls/`).
|
||||
`frame` is intentionally left untouched so native resize borders and
|
||||
|
||||
Reference in new issue
Block a user