Skip to content

Commit 247b18a

Browse files
jeremymanningclaude
andcommitted
Skip mode/skip-button tests on mobile viewports where they are hidden
The .modes-wrapper (containing mode buttons and skip button) is intentionally hidden via CSS at <=480px to save screen space. Skip these tests on mobile-chrome and mobile-safari projects since the UI elements are not accessible on those viewports by design. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df92512 commit 247b18a

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

tests/visual/modes.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ test.describe('Question Modes (US3)', () => {
2525
await page.waitForSelector('#quiz-panel:not([hidden])', { timeout: LOAD_TIMEOUT });
2626
});
2727

28-
test('mode menu renders with all expected buttons', async ({ page }) => {
28+
test('mode menu renders with all expected buttons', async ({ page }, testInfo) => {
29+
// Mode buttons are hidden on mobile viewports (<=480px) to save space
30+
const isMobile = testInfo.project.name.startsWith('mobile');
31+
test.skip(isMobile, 'Mode buttons hidden on mobile viewports');
32+
2933
const wrapper = page.locator('.modes-wrapper');
3034
await expect(wrapper).toBeVisible();
3135

tests/visual/skip-and-share.spec.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ async function selectDomain(page) {
1515
}
1616

1717
test.describe('Skip button and share image', () => {
18-
test('Skip button appears and works', async ({ page }) => {
18+
test('Skip button appears and works', async ({ page }, testInfo) => {
19+
// Skip button is inside .modes-wrapper, hidden on mobile (<=480px)
20+
test.skip(testInfo.project.name.startsWith('mobile'), 'Skip button hidden on mobile viewports');
21+
1922
await page.goto(BASE);
2023
await page.waitForSelector('#landing', { state: 'visible', timeout: 10000 });
2124

@@ -47,7 +50,10 @@ test.describe('Skip button and share image', () => {
4750
console.log('Question after skip:', questionAfter.slice(0, 60));
4851
});
4952

50-
test('Skip records response with is_skipped and yellow dot', async ({ page }) => {
53+
test('Skip records response with is_skipped and yellow dot', async ({ page }, testInfo) => {
54+
// Skip button is inside .modes-wrapper, hidden on mobile (<=480px)
55+
test.skip(testInfo.project.name.startsWith('mobile'), 'Skip button hidden on mobile viewports');
56+
5157
await page.goto(BASE);
5258
await page.waitForSelector('#landing', { state: 'visible', timeout: 10000 });
5359

0 commit comments

Comments
 (0)