fix(table): 统一筛选交互并补齐移动视口覆盖
This commit is contained in:
@@ -128,13 +128,17 @@ test('targets and run directories reject ambiguous or unsafe values', () => {
|
||||
});
|
||||
|
||||
test('mobile retains UA, touch and DPR while using the requested CSS viewport', () => {
|
||||
assert.equal(projectViewports.length, 8);
|
||||
assert.equal(projectViewports.length, 9);
|
||||
const mobile = contextOptions('mobile');
|
||||
assert.deepEqual(mobile.viewport, { width: 360, height: 800 });
|
||||
assert.equal(mobile.deviceScaleFactor, 2.75);
|
||||
assert.equal(mobile.hasTouch, true);
|
||||
assert.equal(mobile.isMobile, true);
|
||||
assert.match(mobile.userAgent, /Mobile/);
|
||||
assert.deepEqual(contextOptions('mobile-393'), {
|
||||
...mobile,
|
||||
viewport: { width: 393, height: 851 },
|
||||
});
|
||||
assert.equal(contextOptions('tablet').hasTouch, false);
|
||||
});
|
||||
|
||||
@@ -163,8 +167,15 @@ test('config isolates HTML, JUnit and traces and supports extended projects', ()
|
||||
PW_WORKERS: '1',
|
||||
PW_TARGET: 'local-dev',
|
||||
});
|
||||
assert.equal(base.projects.length, 2);
|
||||
assert.equal(ci.projects.length, 8);
|
||||
assert.deepEqual(
|
||||
base.projects.map(({ name }) => name),
|
||||
['chrome-desktop', 'chrome-mobile', 'chrome-mobile-393'],
|
||||
);
|
||||
assert.deepEqual(
|
||||
base.projects.find(({ name }) => name === 'chrome-mobile').use.viewport,
|
||||
{ width: 360, height: 800 },
|
||||
);
|
||||
assert.equal(ci.projects.length, 9);
|
||||
assert.equal(base.use.headless, false);
|
||||
assert.equal(ci.use.headless, true);
|
||||
assert.ok(
|
||||
|
||||
Reference in New Issue
Block a user