feat: click off sidebar on small windows closes it
This commit is contained in:
parent
62b0efac04
commit
1206e211d5
2 changed files with 13 additions and 1 deletions
|
|
@ -99,3 +99,15 @@ test('contact list scrolls (independently) to current contact in center of view'
|
|||
// roughly centered is fine, not that fussy about headers and whatnot
|
||||
expect(Math.abs(linkPos - (await page.evaluate('window.innerHeight/2') as number))).toBeLessThan(200);
|
||||
});
|
||||
|
||||
test('clicking off contact list when expanded closes it', async ({ page }) => {
|
||||
await page.setViewportSize({
|
||||
width: 640,
|
||||
height: 1000,
|
||||
});
|
||||
// TODO aria-label
|
||||
await page.locator('#sidebar-show-hide').click();
|
||||
await expect(page.getByRole('button', { name: /add contact/i })).toBeVisible();
|
||||
await page.mouse.click(600, 500);
|
||||
await expect(page.getByRole('button', { name: /add contact/i })).not.toBeVisible();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue