mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
test(mobile): assert header tray reachable inline, not collapsed (#122)
Removing the dead `mobile-collapsed` tray (this PR) means the test that asserted the headerRight tray *stays collapsed* on mobile now contradicts the code and would fail when run. Flip it: with the three-dot utility toggle gone, the header-right utilities must flow inline and stay reachable on small viewports. The response-viewer eye itself remains hidden by default (showResponseViewer opt-in), so this only re-exposes the already-default-visible utilities inline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,13 +132,16 @@ describe('Tab Navigation', () => {
|
|||||||
expect(modalClass).toMatch(/active/);
|
expect(modalClass).toMatch(/active/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('header has no utility toggle and the tray stays collapsed on mobile', async () => {
|
it('header has no utility toggle and the tray is reachable inline on mobile', async () => {
|
||||||
// The three-dot header utility toggle was removed (owner decision,
|
// The three-dot header utility toggle was removed (owner decision,
|
||||||
// 2026-06-10): nothing interactive may occupy the top-left corner, and
|
// 2026-06-10) and the collapsible position:fixed headerRight tray it
|
||||||
// the headerRight tray stays collapsed (hidden) on small viewports.
|
// controlled was dropped (PR #122): with the toggle gone, leaving the
|
||||||
|
// tray collapsed made every header-right utility — including the opt-in
|
||||||
|
// response-viewer eye button — permanently unreachable on phones. The
|
||||||
|
// utilities now flow INLINE and must stay reachable on small viewports;
|
||||||
|
// nothing interactive may occupy the top-left corner.
|
||||||
await page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
document.querySelectorAll('.modal.active').forEach((modal) => modal.classList.remove('active'));
|
document.querySelectorAll('.modal.active').forEach((modal) => modal.classList.remove('active'));
|
||||||
document.getElementById('headerRight')?.classList.add('mobile-collapsed');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const toggleCount = await page.locator('#mobileHeaderUtilityToggle').count();
|
const toggleCount = await page.locator('#mobileHeaderUtilityToggle').count();
|
||||||
@@ -148,7 +151,7 @@ describe('Tab Navigation', () => {
|
|||||||
const tray = document.getElementById('headerRight');
|
const tray = document.getElementById('headerRight');
|
||||||
return tray ? getComputedStyle(tray).display !== 'none' : false;
|
return tray ? getComputedStyle(tray).display !== 'none' : false;
|
||||||
});
|
});
|
||||||
expect(trayVisible).toBe(false);
|
expect(trayVisible).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('tabs remain visible on large phone and tablet headers', async () => {
|
it('tabs remain visible on large phone and tablet headers', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user