-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.d.ts
62 lines (50 loc) · 1.85 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/// <reference types="protractor" />
import * as puppeteer from 'puppeteer-core';
import * as lighthouse from 'lighthouse';
declare module 'protractor-puppeteer-plugin' {
export function setup(): Promise<void>;
export const name: string;
}
declare module 'protractor' {
export class ProtractorBrowser {
public readonly puppeteer: typeof puppeteer;
public readonly har: {
start(): Promise<void>,
stop(reportName?: string): Promise<void>
};
public readonly cdp: {
readonly target: puppeteer.Target,
readonly client: puppeteer.CDPSession,
readonly page: puppeteer.Page,
readonly browser: puppeteer.Browser
};
public readonly lighthouse: (
url: string,
params?: {
flags?: lighthouse.Flags, config?: lighthouse.Config.Json,
connection?: lighthouse.Connection, reportName?: string
}
) => Promise<lighthouse.RunnerResult>
}
export interface PluginConfig {
readonly configFile?: string;
readonly configOptions?: {
readonly connectToBrowser?: boolean;
readonly connectOptions?: puppeteer.ConnectOptions;
readonly timeout?: number;
readonly defaultArgs?: puppeteer.BrowserLaunchArgumentOptions;
readonly harDir?: string;
readonly selenoid?: {
readonly host: string,
readonly port?: number
};
readonly lighthouse?: {
readonly enabled?: boolean,
readonly flags?: lighthouse.Flags,
readonly config?: lighthouse.Config.Json
readonly reportsDir?: string
};
readonly logLevel?: 'verbose' | 'info' | 'warn' | 'error' | 'silent';
}
}
}