|
|
|
|
@ -28,4 +28,27 @@ describe('local search', () => {
|
|
|
|
|
.count()
|
|
|
|
|
).toBe(0)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test('uses the same desktop breakpoint as the nav bar', async () => {
|
|
|
|
|
try {
|
|
|
|
|
for (const { width, isDesktop } of [
|
|
|
|
|
{ width: 767, isDesktop: false },
|
|
|
|
|
{ width: 768, isDesktop: true }
|
|
|
|
|
]) {
|
|
|
|
|
await page.setViewportSize({ width, height: 600 })
|
|
|
|
|
await goto('/')
|
|
|
|
|
await page.locator('.VPNavBarSearchButton').click()
|
|
|
|
|
await page.waitForSelector('input#localsearch-input')
|
|
|
|
|
|
|
|
|
|
expect(await page.locator('.VPNavBarHamburger').isVisible()).toBe(
|
|
|
|
|
!isDesktop
|
|
|
|
|
)
|
|
|
|
|
expect(await page.locator('.search-actions.before').isVisible()).toBe(
|
|
|
|
|
!isDesktop
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
await page.setViewportSize({ width: 1280, height: 720 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|