mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: add failing test for min-device-width media queries (#1298)
References #1291
This commit is contained in:
parent
c43de22193
commit
a61d0660a1
@ -38,6 +38,11 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
|
||||
expect(await page.evaluate(() => window.innerWidth)).toBe(123);
|
||||
expect(await page.evaluate(() => window.innerHeight)).toBe(456);
|
||||
});
|
||||
xit('should emulate *-device-width media queries', async({page, server}) => {
|
||||
expect(page.viewportSize()).toEqual({width: 1280, height: 720});
|
||||
await page.setViewportSize({width: 1800, height: 456});
|
||||
expect(await page.evaluate(() => matchMedia('(min-device-width: 1800px)').matches)).toBe(true);
|
||||
});
|
||||
it('should not have touch by default', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/mobile.html');
|
||||
expect(await page.evaluate(() => 'ontouchstart' in window)).toBe(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user