Skip to content

Commit 17d539e

Browse files
committed
chore: remove not needed conditions and tests
1 parent 077c54d commit 17d539e

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

test/e2e/app-header.spec.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ import { expect, test } from './test-utils'
77
*/
88
const MOBILE_VIEWPORT = { width: 375, height: 667 }
99

10-
/**
11-
* Helper: Check if current viewport is mobile
12-
*/
13-
async function isMobileViewport(page: Page): Promise<boolean> {
14-
const viewport = page.viewportSize()
15-
return viewport ? viewport.width < 640 : false
16-
}
17-
1810
/**
1911
* Helper: Verify menu is closed
2012
*/
@@ -318,48 +310,4 @@ test.describe('Mobile Header Menu', () => {
318310
}
319311
})
320312
})
321-
322-
test.describe('Logic Isolation & Reusability', () => {
323-
test('helper functions work independently - expectMenuClosed', async ({ page, goto }) => {
324-
await goto('/', { waitUntil: 'hydration' })
325-
326-
// Should not throw - menu is closed by default
327-
await expectMenuClosed(page)
328-
})
329-
330-
test('helper functions work independently - openMobileMenu', async ({ page, goto }) => {
331-
await goto('/', { waitUntil: 'hydration' })
332-
333-
const isOnMobile = await isMobileViewport(page)
334-
if (!isOnMobile) {
335-
test.skip()
336-
}
337-
338-
// Helper should open menu without throwing
339-
await openMobileMenu(page)
340-
await expectMenuOpen(page)
341-
})
342-
343-
test('helper functions work independently - closeMobileMenu', async ({ page, goto }) => {
344-
await goto('/', { waitUntil: 'hydration' })
345-
346-
// Open and then use helper to close
347-
await openMobileMenu(page)
348-
await closeMobileMenu(page)
349-
await expectMenuClosed(page)
350-
})
351-
352-
test('helpers can be combined in sequence', async ({ page, goto }) => {
353-
await goto('/', { waitUntil: 'hydration' })
354-
355-
// Test sequence: closed -> open -> closed -> open
356-
await expectMenuClosed(page)
357-
await openMobileMenu(page)
358-
await expectMenuOpen(page)
359-
await closeMobileMenu(page)
360-
await expectMenuClosed(page)
361-
await openMobileMenu(page)
362-
await expectMenuOpen(page)
363-
})
364-
})
365313
})

0 commit comments

Comments
 (0)