mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: devices is a map not an array (#16729)
This commit is contained in:
parent
35af13813c
commit
b51b7e7f67
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
@ -11182,7 +11182,7 @@ type AccessibilityNode = {
|
||||
children?: AccessibilityNode[];
|
||||
}
|
||||
|
||||
export const devices: Devices & DeviceDescriptor[];
|
||||
export const devices: Devices;
|
||||
|
||||
//@ts-ignore this will be any if electron is not installed
|
||||
type ElectronType = typeof import('electron');
|
||||
|
2
utils/generate_types/overrides.d.ts
vendored
2
utils/generate_types/overrides.d.ts
vendored
@ -232,7 +232,7 @@ type AccessibilityNode = {
|
||||
children?: AccessibilityNode[];
|
||||
}
|
||||
|
||||
export const devices: Devices & DeviceDescriptor[];
|
||||
export const devices: Devices;
|
||||
|
||||
//@ts-ignore this will be any if electron is not installed
|
||||
type ElectronType = typeof import('electron');
|
||||
|
@ -775,7 +775,7 @@ playwright.chromium.launch().then(async browser => {
|
||||
const isMobileAssertion: AssertType<boolean, typeof iPhone.isMobile> = true;
|
||||
}
|
||||
{
|
||||
const agents = playwright.devices.map(x => x.userAgent);
|
||||
const agents = Object.entries(playwright.devices).map(([name, descriptor]) => descriptor.userAgent);
|
||||
const assertion: AssertType<string[], typeof agents> = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user