Skip to content

Commit

Permalink
test: add failing test for min-device-width media queries
Browse files Browse the repository at this point in the history
References microsoft#1291
  • Loading branch information
aslushnikov committed Mar 9, 2020
1 parent c8bbf88 commit 6c8b79e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/emulation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6c8b79e

Please sign in to comment.