-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
84 lines (74 loc) · 1.8 KB
/
types.ts
File metadata and controls
84 lines (74 loc) · 1.8 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import type { WebDriverCommands } from '@wdio/protocols'
import type { Capabilities, Options } from '@wdio/types'
import type { SuiteStats } from '@wdio/reporter'
export interface CommandLog {
command: keyof WebDriverCommands
args: any[]
result: any
error?: Error
timestamp: number
callSource: string
screenshot?: string
}
export enum TraceType {
Standalone = 'standalone',
Testrunner = 'testrunner'
}
export interface Metadata {
type: TraceType
url: string
options: Omit<Options.WebdriverIO, 'capabilities'>
capabilities: Capabilities.W3CCapabilities
viewport: VisualViewport
}
export interface TraceLog {
mutations: TraceMutation[]
logs: string[]
consoleLogs: ConsoleLogs[]
networkRequests: NetworkRequest[]
metadata: Metadata
commands: CommandLog[]
sources: Record<string, string>
suites?: Record<string, SuiteStats>[]
}
export interface ExtendedCapabilities extends WebdriverIO.Capabilities {
'wdio:devtoolsOptions'?: ServiceOptions
}
export type LogLevel = 'trace' | 'debug' | 'log' | 'info' | 'warn' | 'error'
export interface ServiceOptions {
/**
* port to launch the application on (default: random)
*/
port?: number
/**
* hostname to launch the application on
* @default localhost
*/
hostname?: string
/**
* capabilities used to launch the devtools application
* @default
* ```ts
* {
* browserName: 'chrome',
* 'goog:chromeOptions': {
* args: ['--window-size=1200,800']
* }
* }
*/
devtoolsCapabilities?: WebdriverIO.Capabilities
}
declare namespace WebdriverIO {
interface ServiceOption extends ServiceOptions {}
interface Capabilities {}
}
declare module '@wdio/reporter' {
interface TestStats {
file?: string
line?: number
column?: number
}
interface SuiteStats {
line?: string
}
}