Skip to content

Latest commit

 

History

History
293 lines (193 loc) · 22.9 KB

Config.mdx

File metadata and controls

293 lines (193 loc) · 22.9 KB

testplane / Config

Config

Extends

Конструкторы

new Config()

new Config(config?): Config

Parameters

config?: string | ConfigInput

Returns

Config

Defined in

src/config/index.ts:28

Свойства

Свойство Type Inherited from Defined in
antialiasingTolerance number CommonConfig.antialiasingTolerance src/config/types.ts:133
assertViewOpts AssertViewOptsConfig CommonConfig.assertViewOpts src/config/types.ts:136
automationProtocol "webdriver" | "devtools" CommonConfig.automationProtocol src/config/types.ts:97
baseUrl string CommonConfig.baseUrl src/config/types.ts:104
browsers Record<string, BrowserConfig> - src/config/types.ts:207
buildDiffOpts BuildDiffOptsConfig CommonConfig.buildDiffOpts src/config/types.ts:135
calibrate boolean CommonConfig.calibrate src/config/types.ts:127
compareOpts CompareOptsConfig CommonConfig.compareOpts src/config/types.ts:134
compositeImage boolean CommonConfig.compositeImage src/config/types.ts:128
configPath string CommonConfig.configPath src/config/index.ts:10
desiredCapabilities null | Capabilities CommonConfig.desiredCapabilities src/config/types.ts:98
devServer { args: string[]; command: null | string; cwd: null | string; env: Record<string, string>; logs: boolean; readinessProbe: ReadinessProbe; } CommonConfig.devServer src/config/types.ts:170
args string[] - src/config/types.ts:174
command null | string - src/config/types.ts:171
cwd null | string - src/config/types.ts:172
env Record<string, string> - src/config/types.ts:173
logs boolean - src/config/types.ts:175
readinessProbe ReadinessProbe - src/config/types.ts:176
expectOpts ExpectOptsConfig CommonConfig.expectOpts src/config/types.ts:137
gridUrl string CommonConfig.gridUrl src/config/types.ts:103
headers null | Record<string, string> CommonConfig.headers src/config/types.ts:142
headless null | boolean | "old" | "new" CommonConfig.headless src/config/types.ts:153
httpTimeout number CommonConfig.httpTimeout src/config/types.ts:109
isolation boolean CommonConfig.isolation src/config/types.ts:154
key null | string CommonConfig.key src/config/types.ts:149
lastFailed { input: string | string[]; only: boolean; output: string; } CommonConfig.lastFailed src/config/types.ts:156
input string | string[] - src/config/types.ts:158
only boolean - src/config/types.ts:157
output string - src/config/types.ts:159
meta {} CommonConfig.meta src/config/types.ts:138
openAndWaitOpts { failOnNetworkError: boolean; ignoreNetworkErrorsPatterns: (string | RegExp)[]; timeout: number; waitNetworkIdle: boolean; waitNetworkIdleTimeout: number; } CommonConfig.openAndWaitOpts src/config/types.ts:162
failOnNetworkError boolean - src/config/types.ts:166
ignoreNetworkErrorsPatterns (string | RegExp)[] - src/config/types.ts:167
timeout? number - src/config/types.ts:163
waitNetworkIdle boolean - src/config/types.ts:164
waitNetworkIdleTimeout number - src/config/types.ts:165
orientation null | "landscape" | "portrait" CommonConfig.orientation src/config/types.ts:140
pageLoadTimeout null | number CommonConfig.pageLoadTimeout src/config/types.ts:111
plugins Record<string, Record<string, unknown>> - src/config/types.ts:208
prepareEnvironment? () => null | void - src/config/types.ts:210
region null | string CommonConfig.region src/config/types.ts:150
resetCursor boolean CommonConfig.resetCursor src/config/types.ts:141
retry number CommonConfig.retry src/config/types.ts:107
saveHistoryMode "all" | "none" | "onlyFailed" CommonConfig.saveHistoryMode src/config/types.ts:117
screenshotDelay number CommonConfig.screenshotDelay src/config/types.ts:131
screenshotMode "auto" | "fullpage" | "viewport" CommonConfig.screenshotMode src/config/types.ts:130
screenshotPath null | string CommonConfig.screenshotPath src/config/types.ts:125
sessionEnvFlags Record< | "isW3C" | "isAndroid" | "isMobile" | "isIOS" | "isSauce" | "isSeleniumStandalone" | "isChrome", boolean> CommonConfig.sessionEnvFlags src/config/types.ts:99
sessionQuitTimeout null | number CommonConfig.sessionQuitTimeout src/config/types.ts:113
sessionRequestTimeout null | number CommonConfig.sessionRequestTimeout src/config/types.ts:112
sessionsPerBrowser number CommonConfig.sessionsPerBrowser src/config/types.ts:105
sets Record<string, SetsConfigParsed> - src/config/types.ts:209
strictSSL null | boolean CommonConfig.strictSSL src/config/types.ts:147
strictTestsOrder boolean CommonConfig.strictTestsOrder src/config/types.ts:129
system SystemConfig CommonConfig.system src/config/types.ts:152
takeScreenshotOnFails { assertViewFail: boolean; testFail: boolean; } CommonConfig.takeScreenshotOnFails src/config/types.ts:118
assertViewFail boolean - src/config/types.ts:120
testFail boolean - src/config/types.ts:119
takeScreenshotOnFailsMode "fullpage" | "viewport" CommonConfig.takeScreenshotOnFailsMode src/config/types.ts:123
takeScreenshotOnFailsTimeout null | number CommonConfig.takeScreenshotOnFailsTimeout src/config/types.ts:122
testTimeout null | number CommonConfig.testTimeout src/config/types.ts:114
testsPerSession number CommonConfig.testsPerSession src/config/types.ts:106
tolerance number CommonConfig.tolerance src/config/types.ts:132
transformRequest (req: RequestOptions) => RequestOptions CommonConfig.transformRequest src/config/types.ts:144
transformResponse (res: Response, req: RequestOptions) => Response CommonConfig.transformResponse src/config/types.ts:145
urlHttpTimeout null | number CommonConfig.urlHttpTimeout src/config/types.ts:110
user null | string CommonConfig.user src/config/types.ts:148
waitInterval number CommonConfig.waitInterval src/config/types.ts:116
waitTimeout number CommonConfig.waitTimeout src/config/types.ts:115
windowSize null | string | { height: number; width: number; } CommonConfig.windowSize src/config/types.ts:139

Методы

forBrowser()

forBrowser(id): BrowserConfig

Parameters

id: string

Returns

BrowserConfig

Defined in

src/config/index.ts:82


getBrowserIds()

getBrowserIds(): string[]

Returns

string[]

Defined in

src/config/index.ts:86


mergeWith()

mergeWith(config): void

This method is used in subrocesses to merge a created config in a subrocess with a config from the main process

Parameters

config: Config

Returns

void

Defined in

src/config/index.ts:100


prepareBrowser()

prepareBrowser(browser): null | void

Parameters

browser: Browser

Returns

null | void

Inherited from

CommonConfig.prepareBrowser

Defined in

src/config/types.ts:124


screenshotsDir()

screenshotsDir(test): string

Parameters

test: Test

Returns

string

Inherited from

CommonConfig.screenshotsDir

Defined in

src/config/types.ts:126


serialize()

serialize(): Omit<Config, "system">

Returns

Omit<Config, "system">

Defined in

src/config/index.ts:90


shouldRetry()

shouldRetry(testInfo): null | boolean

Parameters

testInfo

testInfo.ctx: Test

testInfo.retriesLeft: number

Returns

null | boolean

Inherited from

CommonConfig.shouldRetry

Defined in

src/config/types.ts:108


create()

static create(config?): Config

Parameters

config?: string | ConfigInput

Returns

Config

Defined in

src/config/index.ts:12


read()

static read(configPath): unknown

Parameters

configPath: string

Returns

unknown

Defined in

src/config/index.ts:16