diff --git a/.gitignore b/.gitignore index 436246d..5ec4d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ npm-debug.log* *storybook.log storybook-static tmp +.testplane +!exports diff --git a/README.md b/README.md index 35c2da3..c1264a0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,49 @@ nvm use npm ci ``` +### Generate testplane API specification + +#### Clone testplane repo +```shell +npm run clone-testplane +``` +Env variables: +- `USE_LOCAL` - `true` means copy local testplane repo, `false` - clone remote, default: `false` +- `LOCAL_REPO_DIR` - path to local repo (used when `USE_LOCAL` is `true`) +- `REPO_PATH` - remote repo url (used when `USE_LOCAL` is `false`) + +This command clones testplane to .testplane + +#### Generate Russian localization template +```shell +npm run docs:generate:template +``` + +It will generate a Russian localization template at `./exports` that can be edited. There is a problem that it does not seem to accept config args, it looks like it is not gonna work with docusaurus plugin. Now the only way seems to be this: +```shell +npm run docs:generate:ru +``` +English Docs are autogenerated using [`docusaurus-plugin-typedoc`](https://typedoc-plugin-markdown.org/plugins/docusaurus). + +#### About API specification generator + +API specification docs are generated using [TypeDoc](https://typedoc.org/) with 3 plugins: + - [`typedoc-plugin-rename-defaults`](https://github.com/felipecrs/typedoc-plugin-rename-defaults) renames default exports back to their original names + - [`typedoc-plugin-localization`](https://github.com/IgniteUI/typedoc-plugin-localization) adds Russian localization + - [`typedoc-plugin-markdown`](https://typedoc-plugin-markdown.org/docs) enables markdown generation + +Notes: +- The docs are generated for all types, classes and interfaces exported from `testplane/src/index.ts` +- To remove type/class/interface from docs, write @internal in the description like this: + ```ts + /** + * @internal + */ + export type SomeInternalType = { + id: number + } + ``` + ### Run local dev server ```shell diff --git a/clone-testplane.js b/clone-testplane.js new file mode 100644 index 0000000..3f6828d --- /dev/null +++ b/clone-testplane.js @@ -0,0 +1,30 @@ +const { execSync } = require('child_process'); +const fs = require('fs'); +const path = require('path'); + +const LOCAL = process.env.USE_LOCAL ?? false; +const LOCAL_REPO_DIR = process.env.LOCAL_REPO_DIR; +const REPO_PATH = process.env.REPO_PATH ?? "https://github.com/gemini-testing/testplane"; + +const tempDir = path.join(__dirname, '.testplane'); + +if (fs.existsSync(tempDir)) { + fs.rmSync(tempDir, { recursive: true }); +} + +if (LOCAL) { + // Create a symlink to the local repo + execSync(`cp -r ${LOCAL_REPO_DIR}/. ${tempDir}`); + console.log(`Copied local testplane repo from ${LOCAL_REPO_DIR} to ${tempDir}`); +} else { + fs.mkdirSync(tempDir); + + // Clone repo to temp + execSync(`git clone ${REPO_PATH} ${tempDir}`); + process.chdir(tempDir); + + // Run npm ci to install dependencies + execSync('npm ci', { stdio: 'inherit' }); + + console.log(`Cloned remote testplane repo to ${tempDir}`); +} \ No newline at end of file diff --git a/docs/api/README.mdx b/docs/api/README.mdx new file mode 100644 index 0000000..d5b93d9 --- /dev/null +++ b/docs/api/README.mdx @@ -0,0 +1,45 @@ +# testplane + +## Классы + +- [Config](classes/Config.mdx) +- [Suite](classes/Suite.mdx) +- [Test](classes/Test.mdx) +- [TestCollection](classes/TestCollection.mdx) +- [Testplane](classes/Testplane.mdx) + +## Интерфейсы + +- [AssertViewOpts](interfaces/AssertViewOpts.mdx) +- [AssertViewOptsConfig](interfaces/AssertViewOptsConfig.mdx) +- [BrowserHistory](interfaces/BrowserHistory.mdx) +- [BrowserInfo](interfaces/BrowserInfo.mdx) +- [BuildDiffOptsConfig](interfaces/BuildDiffOptsConfig.mdx) +- [CommonConfig](interfaces/CommonConfig.mdx) +- [CompareOptsConfig](interfaces/CompareOptsConfig.mdx) +- [ExpectOptsConfig](interfaces/ExpectOptsConfig.mdx) +- [GlobalHelper](interfaces/GlobalHelper.mdx) +- [HermioneCtx](interfaces/HermioneCtx.mdx) +- [ImageInfo](interfaces/ImageInfo.mdx) +- [ImageSize](interfaces/ImageSize.mdx) +- [InterceptData](interfaces/InterceptData.mdx) +- [MochaOpts](interfaces/MochaOpts.mdx) +- [ReadTestsOpts](interfaces/ReadTestsOpts.mdx) +- [RefImageInfo](interfaces/RefImageInfo.mdx) +- [RunOpts](interfaces/RunOpts.mdx) +- [RuntimeConfig](interfaces/RuntimeConfig.mdx) +- [SetsConfig](interfaces/SetsConfig.mdx) +- [SetsConfigParsed](interfaces/SetsConfigParsed.mdx) +- [SystemConfig](interfaces/SystemConfig.mdx) +- [TestError](interfaces/TestError.mdx) +- [TestFunctionCtx](interfaces/TestFunctionCtx.mdx) +- [TestResult](interfaces/TestResult.mdx) +- [TestplaneCtx](interfaces/TestplaneCtx.mdx) + +## Type Aliases + +- [AssertViewResult](type-aliases/AssertViewResult.mdx) +- [AsyncSessionEventCallback](type-aliases/AsyncSessionEventCallback.mdx) +- [ConfigInput](type-aliases/ConfigInput.mdx) +- [InterceptHandler](type-aliases/InterceptHandler.mdx) +- [InterceptedEvent](type-aliases/InterceptedEvent.mdx) diff --git a/docs/api/classes/Config.mdx b/docs/api/classes/Config.mdx new file mode 100644 index 0000000..fe084f4 --- /dev/null +++ b/docs/api/classes/Config.mdx @@ -0,0 +1,293 @@ +[testplane](../README.mdx) / Config + +# Config + +## Extends + +- [`CommonConfig`](../interfaces/CommonConfig.mdx) + +## Конструкторы + +### new Config() + +```ts +new Config(config?): Config +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/config/index.ts:28](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L28) + +## Свойства + +| Свойство | Type | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | +| `antialiasingTolerance` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`antialiasingTolerance`](../interfaces/CommonConfig.mdx#antialiasingtolerance) | [src/config/types.ts:133](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L133) | +| `assertViewOpts` | [`AssertViewOptsConfig`](../interfaces/AssertViewOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`assertViewOpts`](../interfaces/CommonConfig.mdx#assertviewopts) | [src/config/types.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L136) | +| `automationProtocol` | `"webdriver"` \| `"devtools"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`automationProtocol`](../interfaces/CommonConfig.mdx#automationprotocol) | [src/config/types.ts:97](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L97) | +| `baseUrl` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`baseUrl`](../interfaces/CommonConfig.mdx#baseurl) | [src/config/types.ts:104](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L104) | +| `browsers` | `Record`\<`string`, `BrowserConfig`\> | - | [src/config/types.ts:207](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L207) | +| `buildDiffOpts` | [`BuildDiffOptsConfig`](../interfaces/BuildDiffOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`buildDiffOpts`](../interfaces/CommonConfig.mdx#builddiffopts) | [src/config/types.ts:135](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L135) | +| `calibrate` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`calibrate`](../interfaces/CommonConfig.mdx#calibrate) | [src/config/types.ts:127](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L127) | +| `compareOpts` | [`CompareOptsConfig`](../interfaces/CompareOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`compareOpts`](../interfaces/CommonConfig.mdx#compareopts) | [src/config/types.ts:134](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L134) | +| `compositeImage` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`compositeImage`](../interfaces/CommonConfig.mdx#compositeimage) | [src/config/types.ts:128](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L128) | +| `configPath` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`configPath`](../interfaces/CommonConfig.mdx#configpath) | [src/config/index.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L10) | +| `desiredCapabilities` | `null` \| `Capabilities` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`desiredCapabilities`](../interfaces/CommonConfig.mdx#desiredcapabilities) | [src/config/types.ts:98](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L98) | +| `devServer` | \{ `args`: `string`[]; `command`: `null` \| `string`; `cwd`: `null` \| `string`; `env`: `Record`\<`string`, `string`\>; `logs`: `boolean`; `readinessProbe`: `ReadinessProbe`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`devServer`](../interfaces/CommonConfig.mdx#devserver) | [src/config/types.ts:170](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L170) | +| `args` | `string`[] | - | [src/config/types.ts:174](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L174) | +| `command` | `null` \| `string` | - | [src/config/types.ts:171](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L171) | +| `cwd` | `null` \| `string` | - | [src/config/types.ts:172](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L172) | +| `env` | `Record`\<`string`, `string`\> | - | [src/config/types.ts:173](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L173) | +| `logs` | `boolean` | - | [src/config/types.ts:175](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L175) | +| `readinessProbe` | `ReadinessProbe` | - | [src/config/types.ts:176](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L176) | +| `expectOpts` | [`ExpectOptsConfig`](../interfaces/ExpectOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`expectOpts`](../interfaces/CommonConfig.mdx#expectopts) | [src/config/types.ts:137](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L137) | +| `gridUrl` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`gridUrl`](../interfaces/CommonConfig.mdx#gridurl) | [src/config/types.ts:103](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L103) | +| `headers` | `null` \| `Record`\<`string`, `string`\> | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`headers`](../interfaces/CommonConfig.mdx#headers) | [src/config/types.ts:142](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L142) | +| `headless` | `null` \| `boolean` \| `"old"` \| `"new"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`headless`](../interfaces/CommonConfig.mdx#headless) | [src/config/types.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L153) | +| `httpTimeout` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`httpTimeout`](../interfaces/CommonConfig.mdx#httptimeout) | [src/config/types.ts:109](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L109) | +| `isolation` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`isolation`](../interfaces/CommonConfig.mdx#isolation) | [src/config/types.ts:154](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L154) | +| `key` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`key`](../interfaces/CommonConfig.mdx#key) | [src/config/types.ts:149](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L149) | +| `lastFailed` | \{ `input`: `string` \| `string`[]; `only`: `boolean`; `output`: `string`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`lastFailed`](../interfaces/CommonConfig.mdx#lastfailed) | [src/config/types.ts:156](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L156) | +| `input` | `string` \| `string`[] | - | [src/config/types.ts:158](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L158) | +| `only` | `boolean` | - | [src/config/types.ts:157](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L157) | +| `output` | `string` | - | [src/config/types.ts:159](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L159) | +| `meta` | \{\} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`meta`](../interfaces/CommonConfig.mdx#meta) | [src/config/types.ts:138](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L138) | +| `openAndWaitOpts` | \{ `failOnNetworkError`: `boolean`; `ignoreNetworkErrorsPatterns`: (`string` \| `RegExp`)[]; `timeout`: `number`; `waitNetworkIdle`: `boolean`; `waitNetworkIdleTimeout`: `number`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`openAndWaitOpts`](../interfaces/CommonConfig.mdx#openandwaitopts) | [src/config/types.ts:162](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L162) | +| `failOnNetworkError` | `boolean` | - | [src/config/types.ts:166](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L166) | +| `ignoreNetworkErrorsPatterns` | (`string` \| `RegExp`)[] | - | [src/config/types.ts:167](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L167) | +| `timeout?` | `number` | - | [src/config/types.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L163) | +| `waitNetworkIdle` | `boolean` | - | [src/config/types.ts:164](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L164) | +| `waitNetworkIdleTimeout` | `number` | - | [src/config/types.ts:165](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L165) | +| `orientation` | `null` \| `"landscape"` \| `"portrait"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`orientation`](../interfaces/CommonConfig.mdx#orientation) | [src/config/types.ts:140](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L140) | +| `pageLoadTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`pageLoadTimeout`](../interfaces/CommonConfig.mdx#pageloadtimeout) | [src/config/types.ts:111](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L111) | +| `plugins` | `Record`\<`string`, `Record`\<`string`, `unknown`\>\> | - | [src/config/types.ts:208](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L208) | +| `prepareEnvironment?` | () => `null` \| `void` | - | [src/config/types.ts:210](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L210) | +| `region` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`region`](../interfaces/CommonConfig.mdx#region) | [src/config/types.ts:150](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L150) | +| `resetCursor` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`resetCursor`](../interfaces/CommonConfig.mdx#resetcursor) | [src/config/types.ts:141](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L141) | +| `retry` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`retry`](../interfaces/CommonConfig.mdx#retry) | [src/config/types.ts:107](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L107) | +| `saveHistoryMode` | `"all"` \| `"none"` \| `"onlyFailed"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`saveHistoryMode`](../interfaces/CommonConfig.mdx#savehistorymode) | [src/config/types.ts:117](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L117) | +| `screenshotDelay` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotDelay`](../interfaces/CommonConfig.mdx#screenshotdelay) | [src/config/types.ts:131](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L131) | +| `screenshotMode` | `"auto"` \| `"fullpage"` \| `"viewport"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotMode`](../interfaces/CommonConfig.mdx#screenshotmode) | [src/config/types.ts:130](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L130) | +| `screenshotPath` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotPath`](../interfaces/CommonConfig.mdx#screenshotpath) | [src/config/types.ts:125](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L125) | +| `sessionEnvFlags` | `Record`\< \| `"isW3C"` \| `"isAndroid"` \| `"isMobile"` \| `"isIOS"` \| `"isSauce"` \| `"isSeleniumStandalone"` \| `"isChrome"`, `boolean`\> | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionEnvFlags`](../interfaces/CommonConfig.mdx#sessionenvflags) | [src/config/types.ts:99](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L99) | +| `sessionQuitTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionQuitTimeout`](../interfaces/CommonConfig.mdx#sessionquittimeout) | [src/config/types.ts:113](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L113) | +| `sessionRequestTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionRequestTimeout`](../interfaces/CommonConfig.mdx#sessionrequesttimeout) | [src/config/types.ts:112](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L112) | +| `sessionsPerBrowser` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionsPerBrowser`](../interfaces/CommonConfig.mdx#sessionsperbrowser) | [src/config/types.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L105) | +| `sets` | `Record`\<`string`, [`SetsConfigParsed`](../interfaces/SetsConfigParsed.mdx)\> | - | [src/config/types.ts:209](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L209) | +| `strictSSL` | `null` \| `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`strictSSL`](../interfaces/CommonConfig.mdx#strictssl) | [src/config/types.ts:147](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L147) | +| `strictTestsOrder` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`strictTestsOrder`](../interfaces/CommonConfig.mdx#stricttestsorder) | [src/config/types.ts:129](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L129) | +| `system` | [`SystemConfig`](../interfaces/SystemConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`system`](../interfaces/CommonConfig.mdx#system) | [src/config/types.ts:152](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L152) | +| `takeScreenshotOnFails` | \{ `assertViewFail`: `boolean`; `testFail`: `boolean`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFails`](../interfaces/CommonConfig.mdx#takescreenshotonfails) | [src/config/types.ts:118](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L118) | +| `assertViewFail` | `boolean` | - | [src/config/types.ts:120](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L120) | +| `testFail` | `boolean` | - | [src/config/types.ts:119](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L119) | +| `takeScreenshotOnFailsMode` | `"fullpage"` \| `"viewport"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFailsMode`](../interfaces/CommonConfig.mdx#takescreenshotonfailsmode) | [src/config/types.ts:123](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L123) | +| `takeScreenshotOnFailsTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFailsTimeout`](../interfaces/CommonConfig.mdx#takescreenshotonfailstimeout) | [src/config/types.ts:122](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L122) | +| `testTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`testTimeout`](../interfaces/CommonConfig.mdx#testtimeout) | [src/config/types.ts:114](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L114) | +| `testsPerSession` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`testsPerSession`](../interfaces/CommonConfig.mdx#testspersession) | [src/config/types.ts:106](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L106) | +| `tolerance` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`tolerance`](../interfaces/CommonConfig.mdx#tolerance) | [src/config/types.ts:132](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L132) | +| `transformRequest` | (`req`: `RequestOptions`) => `RequestOptions` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`transformRequest`](../interfaces/CommonConfig.mdx#transformrequest) | [src/config/types.ts:144](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L144) | +| `transformResponse` | (`res`: `Response`, `req`: `RequestOptions`) => `Response` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`transformResponse`](../interfaces/CommonConfig.mdx#transformresponse) | [src/config/types.ts:145](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L145) | +| `urlHttpTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`urlHttpTimeout`](../interfaces/CommonConfig.mdx#urlhttptimeout) | [src/config/types.ts:110](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L110) | +| `user` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`user`](../interfaces/CommonConfig.mdx#user) | [src/config/types.ts:148](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L148) | +| `waitInterval` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`waitInterval`](../interfaces/CommonConfig.mdx#waitinterval) | [src/config/types.ts:116](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L116) | +| `waitTimeout` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`waitTimeout`](../interfaces/CommonConfig.mdx#waittimeout) | [src/config/types.ts:115](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L115) | +| `windowSize` | `null` \| `string` \| \{ `height`: `number`; `width`: `number`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`windowSize`](../interfaces/CommonConfig.mdx#windowsize) | [src/config/types.ts:139](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L139) | + +## Методы + +### forBrowser() + +```ts +forBrowser(id): BrowserConfig +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`BrowserConfig` + +#### Defined in + +[src/config/index.ts:82](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L82) + +*** + +### getBrowserIds() + +```ts +getBrowserIds(): string[] +``` + +#### Returns + +`string`[] + +#### Defined in + +[src/config/index.ts:86](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L86) + +*** + +### mergeWith() + +```ts +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`](Config.mdx) + +#### Returns + +`void` + +#### Defined in + +[src/config/index.ts:100](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L100) + +*** + +### prepareBrowser() + +```ts +prepareBrowser(browser): null | void +``` + +#### Parameters + +• **browser**: `Browser` + +#### Returns + +`null` \| `void` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`prepareBrowser`](../interfaces/CommonConfig.mdx#preparebrowser) + +#### Defined in + +[src/config/types.ts:124](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L124) + +*** + +### screenshotsDir() + +```ts +screenshotsDir(test): string +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +#### Returns + +`string` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotsDir`](../interfaces/CommonConfig.mdx#screenshotsdir) + +#### Defined in + +[src/config/types.ts:126](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L126) + +*** + +### serialize() + +```ts +serialize(): Omit +``` + +#### Returns + +`Omit`\<[`Config`](Config.mdx), `"system"`\> + +#### Defined in + +[src/config/index.ts:90](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L90) + +*** + +### shouldRetry() + +```ts +shouldRetry(testInfo): null | boolean +``` + +#### Parameters + +• **testInfo** + +• **testInfo.ctx**: [`Test`](Test.mdx) + +• **testInfo.retriesLeft**: `number` + +#### Returns + +`null` \| `boolean` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`shouldRetry`](../interfaces/CommonConfig.mdx#shouldretry) + +#### Defined in + +[src/config/types.ts:108](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L108) + +*** + +### create() + +```ts +static create(config?): Config +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/config/index.ts:12](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L12) + +*** + +### read() + +```ts +static read(configPath): unknown +``` + +#### Parameters + +• **configPath**: `string` + +#### Returns + +`unknown` + +#### Defined in + +[src/config/index.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L16) diff --git a/docs/api/classes/Suite.mdx b/docs/api/classes/Suite.mdx new file mode 100644 index 0000000..e65df1f --- /dev/null +++ b/docs/api/classes/Suite.mdx @@ -0,0 +1,723 @@ +[testplane](../README.mdx) / Suite + +# Suite + +## Extends + +- `ConfigurableTestObject` + +## Конструкторы + +### new Suite() + +```ts +new Suite(__namedParameters): Suite +``` + +#### Parameters + +• **\_\_namedParameters**: `SuiteOpts` = `...` + +#### Returns + +[`Suite`](Suite.mdx) + +#### Overrides + +`ConfigurableTestObject.constructor` + +#### Defined in + +[src/test-reader/test-object/suite.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L20) + +## Свойства + +| Свойство | Modifier | Type | Default value | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `parent` | `public` | `null` \| [`Suite`](Suite.mdx) | `null` | `ConfigurableTestObject.parent` | [src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) | + +## Accessors + +### afterEachHooks + +```ts +get afterEachHooks(): Hook[] +``` + +#### Returns + +`Hook`[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:95](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L95) + +*** + +### beforeEachHooks + +```ts +get beforeEachHooks(): Hook[] +``` + +#### Returns + +`Hook`[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:91](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L91) + +*** + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.browserId` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +`ConfigurableTestObject.browserVersion` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.disabled` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.file` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.hasBrowserVersionOverwritten` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.id` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.pending` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### root + +```ts +get root(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/test-reader/test-object/suite.ts:79](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L79) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.silentSkip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.skipReason` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### suites + +```ts +get suites(): Suite[] +``` + +#### Returns + +[`Suite`](Suite.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:83](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L83) + +*** + +### tests + +```ts +get tests(): Test[] +``` + +#### Returns + +[`Test`](Test.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:87](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L87) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +`ConfigurableTestObject.timeout` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.title` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Методы + +### addAfterEachHook() + +```ts +addAfterEachHook(hook): this +``` + +#### Parameters + +• **hook**: `Hook` + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L41) + +*** + +### addBeforeEachHook() + +```ts +addBeforeEachHook(hook): this +``` + +#### Parameters + +• **hook**: `Hook` + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:37](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L37) + +*** + +### addSuite() + +```ts +addSuite(suite): this +``` + +#### Parameters + +• **suite**: [`Suite`](Suite.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:29](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L29) + +*** + +### addTest() + +```ts +addTest(test): this +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:33](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L33) + +*** + +### afterEach() + +```ts +afterEach(fn): this +``` + +#### Parameters + +• **fn**: `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:49](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L49) + +*** + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +`ConfigurableTestObject.assign` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### beforeEach() + +```ts +beforeEach(fn): this +``` + +#### Parameters + +• **fn**: `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L45) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.disable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### eachTest() + +```ts +eachTest(cb): void +``` + +#### Parameters + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-reader/test-object/suite.ts:60](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L60) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.enable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### filterTests() + +```ts +filterTests(cb): this +``` + +#### Parameters + +• **cb** + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:70](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L70) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.fullTitle` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### getTests() + +```ts +getTests(): Test[] +``` + +#### Returns + +[`Test`](Test.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:65](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L65) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.skip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +`ConfigurableTestObject.titlePath` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) + +*** + +### create() + +```ts +static create(this, opts): T +``` + +#### Type Parameters + +• **T** *extends* [`Suite`](Suite.mdx) + +#### Parameters + +• **this** + +• **opts**: `SuiteOpts` + +#### Returns + +`T` + +#### Defined in + +[src/test-reader/test-object/suite.ts:15](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L15) diff --git a/docs/api/classes/Test.mdx b/docs/api/classes/Test.mdx new file mode 100644 index 0000000..47241ab --- /dev/null +++ b/docs/api/classes/Test.mdx @@ -0,0 +1,489 @@ +[testplane](../README.mdx) / Test + +# Test + +## Extends + +- `ConfigurableTestObject` + +## Extended by + +- [`TestResult`](../interfaces/TestResult.mdx) + +## Конструкторы + +### new Test() + +```ts +new Test(__namedParameters): Test +``` + +#### Parameters + +• **\_\_namedParameters**: `TestOpts` + +#### Returns + +[`Test`](Test.mdx) + +#### Overrides + +`ConfigurableTestObject.constructor` + +#### Defined in + +[src/test-reader/test-object/test.ts:17](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L17) + +## Свойства + +| Свойство | Modifier | Type | Default value | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `err?` | `public` | `Error` | `undefined` | - | [src/test-reader/test-object/test.ts:11](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L11) | +| `fn` | `public` | `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> | `undefined` | - | [src/test-reader/test-object/test.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L10) | +| `parent` | `public` | `null` \| [`Suite`](Suite.mdx) | `null` | `ConfigurableTestObject.parent` | [src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) | + +## Accessors + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.browserId` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +`ConfigurableTestObject.browserVersion` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.disabled` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.file` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.hasBrowserVersionOverwritten` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.id` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.pending` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.silentSkip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.skipReason` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +`ConfigurableTestObject.timeout` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.title` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Методы + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +`ConfigurableTestObject.assign` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### clone() + +```ts +clone(): Test +``` + +#### Returns + +[`Test`](Test.mdx) + +#### Defined in + +[src/test-reader/test-object/test.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L23) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.disable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.enable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.fullTitle` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.skip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +`ConfigurableTestObject.titlePath` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) + +*** + +### create() + +```ts +static create(this, opts): T +``` + +#### Type Parameters + +• **T** *extends* [`Test`](Test.mdx) + +#### Parameters + +• **this** + +• **opts**: `TestOpts` + +#### Returns + +`T` + +#### Defined in + +[src/test-reader/test-object/test.ts:13](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L13) diff --git a/docs/api/classes/TestCollection.mdx b/docs/api/classes/TestCollection.mdx new file mode 100644 index 0000000..c101e87 --- /dev/null +++ b/docs/api/classes/TestCollection.mdx @@ -0,0 +1,345 @@ +[testplane](../README.mdx) / TestCollection + +# TestCollection + +## Конструкторы + +### new TestCollection() + +```ts +new TestCollection(specs): TestCollection +``` + +#### Parameters + +• **specs**: `Record`\<`string`, [`Test`](Test.mdx)[]\> + +#### Returns + +[`TestCollection`](TestCollection.mdx) + +#### Defined in + +[src/test-collection.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L20) + +## Методы + +### disableAll() + +```ts +disableAll(browserId?): this +``` + +#### Parameters + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:122](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L122) + +*** + +### disableTest() + +```ts +disableTest(fullTitle, browserId?): this +``` + +#### Parameters + +• **fullTitle**: `string` + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L136) + +*** + +### eachRootSuite() + +```ts +eachRootSuite(cb): void +``` + +#### Parameters + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-collection.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L30) + +*** + +### eachTest() + +#### eachTest(callback) + +```ts +eachTest(callback): void +``` + +##### Parameters + +• **callback**: `TestsCallback`\<`void`\> + +##### Returns + +`void` + +##### Defined in + +[src/test-collection.ts:87](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L87) + +#### eachTest(browserId, callback) + +```ts +eachTest(browserId, callback): void +``` + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **callback**: `TestsCallback`\<`void`\> + +##### Returns + +`void` + +##### Defined in + +[src/test-collection.ts:88](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L88) + +*** + +### eachTestByVersions() + +```ts +eachTestByVersions(browserId, cb): void +``` + +#### Parameters + +• **browserId**: `string` + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-collection.ts:102](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L102) + +*** + +### enableAll() + +```ts +enableAll(browserId?): this +``` + +#### Parameters + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L153) + +*** + +### enableTest() + +```ts +enableTest(fullTitle, browserId?): this +``` + +#### Parameters + +• **fullTitle**: `string` + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L163) + +*** + +### getBrowsers() + +```ts +getBrowsers(): string[] +``` + +#### Returns + +`string`[] + +#### Defined in + +[src/test-collection.ts:43](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L43) + +*** + +### getRootSuite() + +```ts +getRootSuite(browserId): null | RootSuite +``` + +#### Parameters + +• **browserId**: `string` + +#### Returns + +`null` \| `RootSuite` + +#### Defined in + +[src/test-collection.ts:25](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L25) + +*** + +### mapTests() + +#### mapTests(cb) + +```ts +mapTests(cb): T[] +``` + +##### Type Parameters + +• **T** + +##### Parameters + +• **cb**: `TestsCallback`\<`T`\> + +##### Returns + +`T`[] + +##### Defined in + +[src/test-collection.ts:47](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L47) + +#### mapTests(browserId, cb) + +```ts +mapTests(browserId, cb): T[] +``` + +##### Type Parameters + +• **T** + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **cb**: `TestsCallback`\<`T`\> + +##### Returns + +`T`[] + +##### Defined in + +[src/test-collection.ts:48](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L48) + +*** + +### sortTests() + +#### sortTests(callback) + +```ts +sortTests(callback): this +``` + +##### Parameters + +• **callback**: `SortTestsCallback` + +##### Returns + +`this` + +##### Defined in + +[src/test-collection.ts:63](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L63) + +#### sortTests(browserId, callback) + +```ts +sortTests(browserId, callback): this +``` + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **callback**: `SortTestsCallback` + +##### Returns + +`this` + +##### Defined in + +[src/test-collection.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L64) + +*** + +### create() + +```ts +static create(this, specs): T +``` + +#### Type Parameters + +• **T** *extends* [`TestCollection`](TestCollection.mdx) + +#### Parameters + +• **this** + +• **specs**: `Record`\<`string`, [`Test`](Test.mdx)[]\> + +#### Returns + +`T` + +#### Defined in + +[src/test-collection.ts:13](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L13) diff --git a/docs/api/classes/Testplane.mdx b/docs/api/classes/Testplane.mdx new file mode 100644 index 0000000..ed155cd --- /dev/null +++ b/docs/api/classes/Testplane.mdx @@ -0,0 +1,615 @@ +[testplane](../README.mdx) / Testplane + +# Testplane + +## Extends + +- `BaseTestplane` + +## Конструкторы + +### new Testplane() + +```ts +new Testplane(config?): Testplane +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Testplane`](Testplane.mdx) + +#### Defined in + +[src/testplane.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L64) + +## Свойства + +| Свойство | Type | Defined in | +| ------ | ------ | ------ | +| `on` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:54](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L54) | +| `once` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:55](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L55) | +| `prependListener` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:56](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L56) | + +## Accessors + +### config + +```ts +get config(): Config +``` + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/base-testplane.ts:52](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L52) + +*** + +### errors + +```ts +get errors(): { + AbortOnReconnectError: typeof AbortOnReconnectError; + AssertViewError: typeof AssertViewError; + CancelledError: typeof CancelledError; + ClientBridgeError: typeof ClientBridgeError; + CoreError: typeof CoreError; + HeightViewportError: typeof HeightViewportError; + ImageDiffError: typeof ImageDiffError; + NoRefImageError: typeof NoRefImageError; + OffsetViewportError: typeof OffsetViewportError; + TestplaneInternalError: typeof TestplaneInternalError; +} +``` + +#### Returns + +```ts +{ + AbortOnReconnectError: typeof AbortOnReconnectError; + AssertViewError: typeof AssertViewError; + CancelledError: typeof CancelledError; + ClientBridgeError: typeof ClientBridgeError; + CoreError: typeof CoreError; + HeightViewportError: typeof HeightViewportError; + ImageDiffError: typeof ImageDiffError; + NoRefImageError: typeof NoRefImageError; + OffsetViewportError: typeof OffsetViewportError; + TestplaneInternalError: typeof TestplaneInternalError; +} +``` + +##### AbortOnReconnectError + +```ts +AbortOnReconnectError: typeof AbortOnReconnectError; +``` + +##### AssertViewError + +```ts +AssertViewError: typeof AssertViewError; +``` + +##### CancelledError + +```ts +CancelledError: typeof CancelledError; +``` + +##### ClientBridgeError + +```ts +ClientBridgeError: typeof ClientBridgeError; +``` + +##### CoreError + +```ts +CoreError: typeof CoreError; +``` + +##### HeightViewportError + +```ts +HeightViewportError: typeof HeightViewportError; +``` + +##### ImageDiffError + +```ts +ImageDiffError: typeof ImageDiffError; +``` + +##### NoRefImageError + +```ts +NoRefImageError: typeof NoRefImageError; +``` + +##### OffsetViewportError + +```ts +OffsetViewportError: typeof OffsetViewportError; +``` + +##### TestplaneInternalError + +```ts +TestplaneInternalError: typeof TestplaneInternalError; +``` + +#### Defined in + +[src/base-testplane.ts:60](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L60) + +*** + +### events + +```ts +get events(): { + AFTER_FILE_READ: MasterEvents.AFTER_FILE_READ; + AFTER_TESTS_READ: MasterEvents.AFTER_TESTS_READ; + BEFORE_FILE_READ: MasterEvents.BEFORE_FILE_READ; + BEGIN: "begin"; + CLI: "cli"; + END: "end"; + ERROR: "err"; + EXIT: "exit"; + INFO: "info"; + INIT: MasterEvents.INIT; + NEW_BROWSER: "newBrowser"; + NEW_WORKER_PROCESS: "newWorkerProcess"; + RETRY: "retry"; + RUNNER_END: "endRunner"; + RUNNER_START: "startRunner"; + SESSION_END: "endSession"; + SESSION_START: "startSession"; + SUITE_BEGIN: "beginSuite"; + SUITE_END: "endSuite"; + TEST_BEGIN: "beginTest"; + TEST_END: "endTest"; + TEST_FAIL: "failTest"; + TEST_PASS: "passTest"; + TEST_PENDING: "pendingTest"; + UPDATE_REFERENCE: "updateReference"; + WARNING: "warning"; +} +``` + +#### Returns + +```ts +{ + AFTER_FILE_READ: MasterEvents.AFTER_FILE_READ; + AFTER_TESTS_READ: MasterEvents.AFTER_TESTS_READ; + BEFORE_FILE_READ: MasterEvents.BEFORE_FILE_READ; + BEGIN: "begin"; + CLI: "cli"; + END: "end"; + ERROR: "err"; + EXIT: "exit"; + INFO: "info"; + INIT: MasterEvents.INIT; + NEW_BROWSER: "newBrowser"; + NEW_WORKER_PROCESS: "newWorkerProcess"; + RETRY: "retry"; + RUNNER_END: "endRunner"; + RUNNER_START: "startRunner"; + SESSION_END: "endSession"; + SESSION_START: "startSession"; + SUITE_BEGIN: "beginSuite"; + SUITE_END: "endSuite"; + TEST_BEGIN: "beginTest"; + TEST_END: "endTest"; + TEST_FAIL: "failTest"; + TEST_PASS: "passTest"; + TEST_PENDING: "pendingTest"; + UPDATE_REFERENCE: "updateReference"; + WARNING: "warning"; +} +``` + +##### AFTER\_FILE\_READ + +```ts +readonly AFTER_FILE_READ: "afterFileRead" = MasterEvents.AFTER_FILE_READ; +``` + +##### AFTER\_TESTS\_READ + +```ts +readonly AFTER_TESTS_READ: "afterTestsRead" = MasterEvents.AFTER_TESTS_READ; +``` + +##### BEFORE\_FILE\_READ + +```ts +readonly BEFORE_FILE_READ: "beforeFileRead" = MasterEvents.BEFORE_FILE_READ; +``` + +##### BEGIN + +```ts +readonly BEGIN: "begin" = "begin"; +``` + +##### CLI + +```ts +readonly CLI: "cli" = "cli"; +``` + +##### END + +```ts +readonly END: "end" = "end"; +``` + +##### ERROR + +```ts +readonly ERROR: "err" = "err"; +``` + +##### EXIT + +```ts +readonly EXIT: "exit" = "exit"; +``` + +##### INFO + +```ts +readonly INFO: "info" = "info"; +``` + +##### INIT + +```ts +readonly INIT: "init" = MasterEvents.INIT; +``` + +##### NEW\_BROWSER + +```ts +readonly NEW_BROWSER: "newBrowser" = "newBrowser"; +``` + +##### NEW\_WORKER\_PROCESS + +```ts +readonly NEW_WORKER_PROCESS: "newWorkerProcess" = "newWorkerProcess"; +``` + +##### RETRY + +```ts +readonly RETRY: "retry" = "retry"; +``` + +##### RUNNER\_END + +```ts +readonly RUNNER_END: "endRunner" = "endRunner"; +``` + +##### RUNNER\_START + +```ts +readonly RUNNER_START: "startRunner" = "startRunner"; +``` + +##### SESSION\_END + +```ts +readonly SESSION_END: "endSession" = "endSession"; +``` + +##### SESSION\_START + +```ts +readonly SESSION_START: "startSession" = "startSession"; +``` + +##### SUITE\_BEGIN + +```ts +readonly SUITE_BEGIN: "beginSuite" = "beginSuite"; +``` + +##### SUITE\_END + +```ts +readonly SUITE_END: "endSuite" = "endSuite"; +``` + +##### TEST\_BEGIN + +```ts +readonly TEST_BEGIN: "beginTest" = "beginTest"; +``` + +##### TEST\_END + +```ts +readonly TEST_END: "endTest" = "endTest"; +``` + +##### TEST\_FAIL + +```ts +readonly TEST_FAIL: "failTest" = "failTest"; +``` + +##### TEST\_PASS + +```ts +readonly TEST_PASS: "passTest" = "passTest"; +``` + +##### TEST\_PENDING + +```ts +readonly TEST_PENDING: "pendingTest" = "pendingTest"; +``` + +##### UPDATE\_REFERENCE + +```ts +readonly UPDATE_REFERENCE: "updateReference" = "updateReference"; +``` + +##### WARNING + +```ts +readonly WARNING: "warning" = "warning"; +``` + +#### Defined in + +[src/base-testplane.ts:56](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L56) + +## Методы + +### addTestToRun() + +```ts +addTestToRun(test, browserId): boolean +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +• **browserId**: `string` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:149](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L149) + +*** + +### emitAndWait() + +```ts +emitAndWait(event, ...args): Promise +``` + +#### Parameters + +• **event**: `string` \| `symbol` + +• ...**args**: `unknown`[] + +#### Returns + +`Promise`\<`unknown`[]\> + +#### Defined in + +[src/events/async-emitter/index.ts:5](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/events/async-emitter/index.ts#L5) + +*** + +### extendCli() + +```ts +extendCli(parser): void +``` + +#### Parameters + +• **parser**: `Command` + +#### Returns + +`void` + +#### Defined in + +[src/testplane.ts:72](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L72) + +*** + +### halt() + +```ts +halt(err, timeout): void +``` + +#### Parameters + +• **err**: `Error` + +• **timeout**: `number` = `60000` + +#### Returns + +`void` + +#### Defined in + +[src/testplane.ts:204](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L204) + +*** + +### intercept() + +```ts +intercept(event, handler): this +``` + +#### Parameters + +• **event**: [`InterceptedEvent`](../type-aliases/InterceptedEvent.mdx) + +• **handler**: [`InterceptHandler`](../type-aliases/InterceptHandler.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/base-testplane.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L64) + +*** + +### isFailed() + +```ts +isFailed(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:184](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L184) + +*** + +### isWorker() + +```ts +isWorker(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:200](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L200) + +*** + +### readTests() + +```ts +readTests(testPaths, __namedParameters): Promise +``` + +#### Parameters + +• **testPaths**: `string`[] + +• **\_\_namedParameters**: `Partial`\<[`ReadTestsOpts`](../interfaces/ReadTestsOpts.mdx)\> = `{}` + +#### Returns + +`Promise`\<[`TestCollection`](TestCollection.mdx)\> + +#### Defined in + +[src/testplane.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L153) + +*** + +### run() + +```ts +run(testPaths, __namedParameters): Promise +``` + +#### Parameters + +• **testPaths**: `string`[] \| [`TestCollection`](TestCollection.mdx) + +• **\_\_namedParameters**: `Partial`\<[`RunOpts`](../interfaces/RunOpts.mdx)\> = `{}` + +#### Returns + +`Promise`\<`boolean`\> + +#### Defined in + +[src/testplane.ts:86](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L86) + +*** + +### create() + +#### create(this, config) + +```ts +static create(this, config?): T +``` + +##### Type Parameters + +• **T** *extends* `BaseTestplane` + +##### Parameters + +• **this**: `ConstructorWithOptionalConfig`\<`T`\> + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +##### Returns + +`T` + +##### Defined in + +[src/base-testplane.ts:24](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L24) + +#### create(this, config) + +```ts +static create(this, config): T +``` + +##### Type Parameters + +• **T** *extends* `BaseTestplane` + +##### Parameters + +• **this**: `ConstructorWithStringParam`\<`T`\> + +• **config**: `string` + +##### Returns + +`T` + +##### Defined in + +[src/base-testplane.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L26) diff --git a/docs/api/interfaces/AssertViewOpts.mdx b/docs/api/interfaces/AssertViewOpts.mdx new file mode 100644 index 0000000..b5a1907 --- /dev/null +++ b/docs/api/interfaces/AssertViewOpts.mdx @@ -0,0 +1,261 @@ +[testplane](../README.mdx) / AssertViewOpts + +# AssertViewOpts + +## Extends + +- `Partial`\<[`AssertViewOptsConfig`](AssertViewOptsConfig.mdx)\> + +## Свойства + +### allowViewportOverflow? + +```ts +optional allowViewportOverflow: boolean; +``` + +Disables check that element is outside of the viewport left, top, right or bottom bounds. + +#### Remarks + +By default Testplane throws an error if element is outside the viewport bounds. +This option disables check that element is outside of the viewport left, top, right or bottom bounds. +And in this case if browser option [https://github.com/gemini-testing/testplane#compositeimage compositeImage](https://github.com/gemini-testing/testplane#compositeimage) set to `false`, then only visible part of the element will be captured. +But if [https://github.com/gemini-testing/testplane#compositeimage compositeImage](https://github.com/gemini-testing/testplane#compositeimage) set to `true` (default), then in the resulting screenshot will appear the whole element with not visible parts outside of the bottom bounds of viewport. + +#### Default Value + +`false` + +#### Inherited from + +`Partial.allowViewportOverflow` + +#### Defined in + +[src/config/types.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L45) + +*** + +### antialiasingTolerance? + +```ts +optional antialiasingTolerance: number; +``` + +Minimum difference in brightness (zero by default) between the darkest/lightest pixel (which is adjacent to the antialiasing pixel) and theirs adjacent pixels. +Overrides config https://github.com/gemini-testing/testplane#browsers browsers.https://github.com/gemini-testing/testplane#antialiasingTolerance antialiasingTolerance value. + +#### Remarks + +Read more about this option in [https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing looks-same](https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing) + +#### Default Value + +`4` + +#### Defined in + +[src/browser/commands/types.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L26) + +*** + +### captureElementFromTop? + +```ts +optional captureElementFromTop: boolean; +``` + +Ability to set capture element from the top area or from current position. + +#### Remarks + +In the first case viewport will be scrolled to the top of the element. + +#### Default Value + +`true` + +#### Inherited from + +`Partial.captureElementFromTop` + +#### Defined in + +[src/config/types.ts:33](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L33) + +*** + +### compositeImage? + +```ts +optional compositeImage: boolean; +``` + +Allows testing of regions which bottom bounds are outside of a viewport height. +Overrides config https://github.com/gemini-testing/testplane#browsers browsers.https://github.com/gemini-testing/testplane#compositeImage compositeImage value. + +#### Remarks + +In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. + +#### Default Value + +`true` + +#### Defined in + +[src/browser/commands/types.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L36) + +*** + +### disableAnimation? + +```ts +optional disableAnimation: boolean; +``` + +Ability to disable animations and transitions while making a screenshot + +#### Remarks + +Usefull when you capture screenshot of a page, having animations and transitions. +Iframe animations are only disabled when using webdriver protocol. + +#### Default Value + +`true` + +#### Defined in + +[src/browser/commands/types.ts:67](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L67) + +*** + +### ignoreDiffPixelCount? + +```ts +optional ignoreDiffPixelCount: number | `${number}%`; +``` + +Ability to ignore a small amount of different pixels to classify screenshots as being "identical" + +#### Examples + +```ts +5 +``` + +```ts +'1.5%' +``` + +#### Remarks + +Useful when you encounter a few pixels difference that cannot be eliminated using the tolerance and antialiasingTolerance settings. + +#### Note + +This should be considered a last resort and only used in small number of cases where necessary. + +#### Default Value + +`0` + +#### Defined in + +[src/browser/commands/types.ts:82](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L82) + +*** + +### ignoreElements? + +```ts +optional ignoreElements: string | string[]; +``` + +DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images. + +#### Default Value + +`[]` + +#### Inherited from + +`Partial.ignoreElements` + +#### Defined in + +[src/config/types.ts:24](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L24) + +*** + +### screenshotDelay? + +```ts +optional screenshotDelay: number; +``` + +Allows to specify a delay (in milliseconds) before making any screenshot. +Overrides config https://github.com/gemini-testing/testplane#browsers browsers.https://github.com/gemini-testing/testplane#screenshotDelay screenshotDelay value. + +#### Remarks + +This is useful when the page has elements which are animated or if you do not want to screen a scrollbar. + +#### Default Value + +`0` + +#### Defined in + +[src/browser/commands/types.ts:46](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L46) + +*** + +### selectorToScroll? + +```ts +optional selectorToScroll: string; +``` + +Ability to set DOM-node selector which should be scroll when the captured element does not completely fit on the screen. + +#### Remarks + +Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot. +That happens because we scroll the page using `window` selector, which scroll only the background of the modal, and the modal itself remains in place. +Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true` (default). + +#### Default Value + +`undefined` + +#### Defined in + +[src/browser/commands/types.ts:57](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L57) + +*** + +### tolerance? + +```ts +optional tolerance: number; +``` + +Maximum allowed difference between colors. +Overrides config https://github.com/gemini-testing/testplane#browsers browsers.https://github.com/gemini-testing/testplane#tolerance tolerance value. + +#### Remarks + +Indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode. +Increasing global default is not recommended, prefer changing tolerance for particular suites or states instead. +By default it's 2.3 which should be enough for the most cases. + +#### Default Value + +`2.3` + +#### Defined in + +[src/browser/commands/types.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L16) diff --git a/docs/api/interfaces/GlobalHelper.mdx b/docs/api/interfaces/GlobalHelper.mdx new file mode 100644 index 0000000..46606db --- /dev/null +++ b/docs/api/interfaces/GlobalHelper.mdx @@ -0,0 +1,83 @@ +[testplane](../README.mdx) / GlobalHelper + +# GlobalHelper + +## Свойства + +### also + +```ts +also: AlsoController; +``` + +#### Defined in + +[src/types/index.ts:165](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L165) + +*** + +### browser() + +```ts +browser: (browserName) => BrowserVersionController; +``` + +#### Parameters + +• **browserName**: `string` + +#### Returns + +`BrowserVersionController` + +#### Defined in + +[src/types/index.ts:166](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L166) + +*** + +### config + +```ts +config: ConfigController; +``` + +#### Defined in + +[src/types/index.ts:167](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L167) + +*** + +### ctx + +```ts +ctx: TestplaneCtx; +``` + +#### Defined in + +[src/types/index.ts:162](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L162) + +*** + +### only + +```ts +only: OnlyController; +``` + +#### Defined in + +[src/types/index.ts:164](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L164) + +*** + +### skip + +```ts +skip: SkipController; +``` + +#### Defined in + +[src/types/index.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L163) diff --git a/docs/api/interfaces/HermioneCtx.mdx b/docs/api/interfaces/HermioneCtx.mdx new file mode 100644 index 0000000..c714621 --- /dev/null +++ b/docs/api/interfaces/HermioneCtx.mdx @@ -0,0 +1,15 @@ +[testplane](../README.mdx) / HermioneCtx + +# ~~HermioneCtx~~ + +## Deprecated + +Use `TestplaneCtx` instead + +## Extends + +- `Record`\<`string`, `unknown`\> + +## Extended by + +- [`TestplaneCtx`](TestplaneCtx.mdx) diff --git a/docs/api/interfaces/TestError.mdx b/docs/api/interfaces/TestError.mdx new file mode 100644 index 0000000..18b61f8 --- /dev/null +++ b/docs/api/interfaces/TestError.mdx @@ -0,0 +1,79 @@ +[testplane](../README.mdx) / TestError + +# TestError + +## Extends + +- `Error` + +## Свойства + +### details + +```ts +details: ErrorDetails; +``` + +#### Defined in + +[src/types/index.ts:59](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L59) + +*** + +### message + +```ts +message: string; +``` + +#### Inherited from + +`Error.message` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### name + +```ts +name: string; +``` + +#### Inherited from + +`Error.name` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### screenshot? + +```ts +optional screenshot: ImageBase64; +``` + +#### Defined in + +[src/types/index.ts:58](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L58) + +*** + +### stack? + +```ts +optional stack: string; +``` + +#### Inherited from + +`Error.stack` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1078 diff --git a/docs/api/interfaces/TestFunctionCtx.mdx b/docs/api/interfaces/TestFunctionCtx.mdx new file mode 100644 index 0000000..7924199 --- /dev/null +++ b/docs/api/interfaces/TestFunctionCtx.mdx @@ -0,0 +1,27 @@ +[testplane](../README.mdx) / TestFunctionCtx + +# TestFunctionCtx + +## Свойства + +### browser + +```ts +browser: Browser; +``` + +#### Defined in + +[src/test-reader/test-object/types.ts:22](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/types.ts#L22) + +*** + +### currentTest + +```ts +currentTest: Test; +``` + +#### Defined in + +[src/test-reader/test-object/types.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/types.ts#L23) diff --git a/docs/api/interfaces/TestResult.mdx b/docs/api/interfaces/TestResult.mdx new file mode 100644 index 0000000..82c7bce --- /dev/null +++ b/docs/api/interfaces/TestResult.mdx @@ -0,0 +1,595 @@ +[testplane](../README.mdx) / TestResult + +# TestResult + +## Extends + +- [`Test`](../classes/Test.mdx) + +## Свойства + +### assertViewResults + +```ts +assertViewResults: AssertViewResult[]; +``` + +#### Defined in + +[src/types/index.ts:135](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L135) + +*** + +### description? + +```ts +optional description: string; +``` + +#### Defined in + +[src/types/index.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L136) + +*** + +### duration + +```ts +duration: number; +``` + +#### Defined in + +[src/types/index.ts:137](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L137) + +*** + +### err? + +```ts +optional err: TestError; +``` + +#### Overrides + +[`Test`](../classes/Test.mdx).[`err`](../classes/Test.mdx#err) + +#### Defined in + +[src/types/index.ts:138](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L138) + +*** + +### fn + +```ts +fn: TestFunction; +``` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`fn`](../classes/Test.mdx#fn) + +#### Defined in + +[src/test-reader/test-object/test.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L10) + +*** + +### ~~hermioneCtx~~ + +```ts +hermioneCtx: ExecutionThreadToolCtx; +``` + +#### Deprecated + +Use `testplaneCtx` instead + +#### Defined in + +[src/types/index.ts:143](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L143) + +*** + +### history + +```ts +history: CommandHistory; +``` + +#### Defined in + +[src/types/index.ts:144](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L144) + +*** + +### meta + +```ts +meta: {}; +``` + +#### Index Signature + + \[`name`: `string`\]: `unknown` + +#### Defined in + +[src/types/index.ts:145](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L145) + +*** + +### parent + +```ts +parent: null | Suite = null; +``` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`parent`](../classes/Test.mdx#parent) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) + +*** + +### sessionId + +```ts +sessionId: string; +``` + +#### Defined in + +[src/types/index.ts:146](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L146) + +*** + +### startTime + +```ts +startTime: number; +``` + +#### Defined in + +[src/types/index.ts:147](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L147) + +*** + +### testplaneCtx + +```ts +testplaneCtx: ExecutionThreadToolCtx; +``` + +#### Defined in + +[src/types/index.ts:139](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L139) + +## Accessors + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`browserId`](../classes/Test.mdx#browserid) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`browserVersion`](../classes/Test.mdx#browserversion) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`disabled`](../classes/Test.mdx#disabled) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`file`](../classes/Test.mdx#file) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`hasBrowserVersionOverwritten`](../classes/Test.mdx#hasbrowserversionoverwritten) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`id`](../classes/Test.mdx#id) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`pending`](../classes/Test.mdx#pending) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`silentSkip`](../classes/Test.mdx#silentskip) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`skipReason`](../classes/Test.mdx#skipreason) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`timeout`](../classes/Test.mdx#timeout) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`title`](../classes/Test.mdx#title) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Методы + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`assign`](../classes/Test.mdx#assign) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### clone() + +```ts +clone(): Test +``` + +#### Returns + +[`Test`](../classes/Test.mdx) + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`clone`](../classes/Test.mdx#clone) + +#### Defined in + +[src/test-reader/test-object/test.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L23) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`disable`](../classes/Test.mdx#disable) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`enable`](../classes/Test.mdx#enable) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`fullTitle`](../classes/Test.mdx#fulltitle) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`skip`](../classes/Test.mdx#skip) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`titlePath`](../classes/Test.mdx#titlepath) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) diff --git a/docs/api/interfaces/TestplaneCtx.mdx b/docs/api/interfaces/TestplaneCtx.mdx new file mode 100644 index 0000000..d63452a --- /dev/null +++ b/docs/api/interfaces/TestplaneCtx.mdx @@ -0,0 +1,11 @@ +[testplane](../README.mdx) / TestplaneCtx + +# ~~TestplaneCtx~~ + +## Deprecated + +Use `TestplaneCtx` instead + +## Extends + +- [`HermioneCtx`](HermioneCtx.mdx) diff --git a/docs/api/type-aliases/ConfigInput.mdx b/docs/api/type-aliases/ConfigInput.mdx new file mode 100644 index 0000000..0cdeeab --- /dev/null +++ b/docs/api/type-aliases/ConfigInput.mdx @@ -0,0 +1,50 @@ +[testplane](../README.mdx) / ConfigInput + +# ConfigInput + +```ts +type ConfigInput: Partial & { + browsers: Record & { + desiredCapabilities: WebdriverIO.Capabilities; + }>; + plugins: Record; + prepareEnvironment: () => void | null; + sets: Record; +}; +``` + +## Type declaration + +### browsers + +```ts +browsers: Record & { + desiredCapabilities: WebdriverIO.Capabilities; +}>; +``` + +### plugins? + +```ts +optional plugins: Record; +``` + +### prepareEnvironment()? + +```ts +optional prepareEnvironment: () => void | null; +``` + +#### Returns + +`void` \| `null` + +### sets? + +```ts +optional sets: Record; +``` + +## Defined in + +[src/config/types.ts:193](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L193) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 9bbe141..681b90f 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -78,6 +78,7 @@ const config: Config = { label: "Docs", }, { to: "/blog", label: "Blog", position: "left" }, + { to: "/docs/v8/api", label: "API reference", position: "left" }, { type: "docsVersionDropdown", position: "right", @@ -192,6 +193,22 @@ const config: Config = { trackHash: true, }, ], + // [ + // 'docusaurus-plugin-typedoc', + // { + // id: "ru", + // lang: "ru", + // out: "docs/api" + // }, + // ], + [ + 'docusaurus-plugin-typedoc', + { + id: "en", + lang: "en", + out: "i18n/en/docusaurus-plugin-content-docs/current/api" + }, + ], ], }; diff --git a/exports/globalFunctions.json b/exports/globalFunctions.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/exports/globalFunctions.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/exports/src/browser/commands/AssertViewOpts.json b/exports/src/browser/commands/AssertViewOpts.json new file mode 100644 index 0000000..1f489e7 --- /dev/null +++ b/exports/src/browser/commands/AssertViewOpts.json @@ -0,0 +1,508 @@ +{ + "AssertViewOpts": { + "properties": { + "tolerance": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "Indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode.\nIncreasing global default is not recommended, prefer changing tolerance for particular suites or states instead.\nBy default it's 2.3 which should be enough for the most cases." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`2.3`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Maximum allowed difference between colors.\nOverrides config " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#browsers browsers" + }, + { + "kind": "text", + "text": "." + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#tolerance tolerance" + }, + { + "kind": "text", + "text": " value." + } + ] + } + }, + "antialiasingTolerance": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "Read more about this option in " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing looks-same" + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`4`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Minimum difference in brightness (zero by default) between the darkest/lightest pixel (which is adjacent to the antialiasing pixel) and theirs adjacent pixels.\nOverrides config " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#browsers browsers" + }, + { + "kind": "text", + "text": "." + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#antialiasingTolerance antialiasingTolerance" + }, + { + "kind": "text", + "text": " value." + } + ] + } + }, + "compositeImage": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`true`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Allows testing of regions which bottom bounds are outside of a viewport height.\nOverrides config " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#browsers browsers" + }, + { + "kind": "text", + "text": "." + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#compositeImage compositeImage" + }, + { + "kind": "text", + "text": " value." + } + ] + } + }, + "screenshotDelay": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "This is useful when the page has elements which are animated or if you do not want to screen a scrollbar." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`0`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Allows to specify a delay (in milliseconds) before making any screenshot.\nOverrides config " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#browsers browsers" + }, + { + "kind": "text", + "text": "." + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#screenshotDelay screenshotDelay" + }, + { + "kind": "text", + "text": " value." + } + ] + } + }, + "selectorToScroll": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot.\nThat happens because we scroll the page using " + }, + { + "kind": "code", + "text": "`window`" + }, + { + "kind": "text", + "text": " selector, which scroll only the background of the modal, and the modal itself remains in place.\nDefault value is " + }, + { + "kind": "code", + "text": "`undefined`" + }, + { + "kind": "text", + "text": " (it means scroll relative to " + }, + { + "kind": "code", + "text": "`window`" + }, + { + "kind": "text", + "text": "). Works only when " + }, + { + "kind": "code", + "text": "`compositeImage`" + }, + { + "kind": "text", + "text": " is " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": " (default)." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`undefined`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Ability to set DOM-node selector which should be scroll when the captured element does not completely fit on the screen." + } + ] + } + }, + "disableAnimation": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "Usefull when you capture screenshot of a page, having animations and transitions.\nIframe animations are only disabled when using webdriver protocol." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`true`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Ability to disable animations and transitions while making a screenshot" + } + ] + } + }, + "ignoreDiffPixelCount": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\n5\n```" + } + ] + }, + { + "skipRendering": false, + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\n'1.5%'\n```" + } + ] + }, + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "Useful when you encounter a few pixels difference that cannot be eliminated using the tolerance and antialiasingTolerance settings." + } + ] + }, + { + "skipRendering": false, + "tag": "@note", + "content": [ + { + "kind": "text", + "text": "This should be considered a last resort and only used in small number of cases where necessary." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`0`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Ability to ignore a small amount of different pixels to classify screenshots as being \"identical\"" + } + ] + } + }, + "ignoreElements": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`[]`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images." + } + ] + } + }, + "captureElementFromTop": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "In the first case viewport will be scrolled to the top of the element." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`true`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Ability to set capture element from the top area or from current position." + } + ] + } + }, + "allowViewportOverflow": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@remarks", + "content": [ + { + "kind": "text", + "text": "By default Testplane throws an error if element is outside the viewport bounds.\nThis option disables check that element is outside of the viewport left, top, right or bottom bounds.\nAnd in this case if browser option " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#compositeimage compositeImage" + }, + { + "kind": "text", + "text": " set to " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": ", then only visible part of the element will be captured.\nBut if " + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/gemini-testing/testplane#compositeimage compositeImage" + }, + { + "kind": "text", + "text": " set to " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": " (default), then in the resulting screenshot will appear the whole element with not visible parts outside of the bottom bounds of viewport." + } + ] + }, + { + "skipRendering": false, + "tag": "@defaultValue", + "content": [ + { + "kind": "code", + "text": "`false`" + } + ] + } + ], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "Disables check that element is outside of the viewport left, top, right or bottom bounds." + } + ] + } + } + }, + "methods": {} + } +} \ No newline at end of file diff --git a/exports/src/config/Config.json b/exports/src/config/Config.json new file mode 100644 index 0000000..0247c4e --- /dev/null +++ b/exports/src/config/Config.json @@ -0,0 +1,20 @@ +{ + "Config": { + "properties": {}, + "methods": { + "mergeWith": { + "comment": { + "blockTags": [], + "modifierTags": {}, + "summary": [ + { + "kind": "text", + "text": "This method is used in subrocesses to merge a created config\nin a subrocess with a config from the main process" + } + ] + } + } + }, + "accessors": {} + } +} \ No newline at end of file diff --git a/exports/src/types/HermioneCtx.json b/exports/src/types/HermioneCtx.json new file mode 100644 index 0000000..fcffe30 --- /dev/null +++ b/exports/src/types/HermioneCtx.json @@ -0,0 +1,30 @@ +{ + "HermioneCtx": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@deprecated", + "content": [ + { + "kind": "text", + "text": "Use " + }, + { + "kind": "code", + "text": "`TestplaneCtx`" + }, + { + "kind": "text", + "text": " instead" + } + ] + } + ], + "modifierTags": {}, + "summary": [] + }, + "properties": {}, + "methods": {} + } +} \ No newline at end of file diff --git a/exports/src/types/TestResult.json b/exports/src/types/TestResult.json new file mode 100644 index 0000000..2b01cfd --- /dev/null +++ b/exports/src/types/TestResult.json @@ -0,0 +1,33 @@ +{ + "TestResult": { + "properties": { + "hermioneCtx": { + "comment": { + "blockTags": [ + { + "skipRendering": false, + "tag": "@deprecated", + "content": [ + { + "kind": "text", + "text": "Use " + }, + { + "kind": "code", + "text": "`testplaneCtx`" + }, + { + "kind": "text", + "text": " instead" + } + ] + } + ], + "modifierTags": {}, + "summary": [] + } + } + }, + "methods": {} + } +} \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json index 4ab9139..1f6ea09 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current.json +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -18,5 +18,9 @@ "sidebar.mainSidebar.category.Plugins": { "message": "Plugins", "description": "The label for category Plugins in sidebar mainSidebar" + }, + "sidebar.mainSidebar.category.API Reference": { + "message": "API Reference", + "description": "The label for category API Reference in sidebar mainSidebar" } } diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Config.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Config.mdx new file mode 100644 index 0000000..8cd6c74 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Config.mdx @@ -0,0 +1,291 @@ +# Config + +## Extends + +- [`CommonConfig`](../interfaces/CommonConfig.mdx) + +## Constructors + +### new Config() + +```ts +new Config(config?): Config +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/config/index.ts:28](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L28) + +## Properties + +| Property | Type | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | +| `antialiasingTolerance` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`antialiasingTolerance`](../interfaces/CommonConfig.mdx#antialiasingtolerance) | [src/config/types.ts:133](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L133) | +| `assertViewOpts` | [`AssertViewOptsConfig`](../interfaces/AssertViewOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`assertViewOpts`](../interfaces/CommonConfig.mdx#assertviewopts) | [src/config/types.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L136) | +| `automationProtocol` | `"webdriver"` \| `"devtools"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`automationProtocol`](../interfaces/CommonConfig.mdx#automationprotocol) | [src/config/types.ts:97](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L97) | +| `baseUrl` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`baseUrl`](../interfaces/CommonConfig.mdx#baseurl) | [src/config/types.ts:104](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L104) | +| `browsers` | `Record`\<`string`, `BrowserConfig`\> | - | [src/config/types.ts:207](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L207) | +| `buildDiffOpts` | [`BuildDiffOptsConfig`](../interfaces/BuildDiffOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`buildDiffOpts`](../interfaces/CommonConfig.mdx#builddiffopts) | [src/config/types.ts:135](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L135) | +| `calibrate` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`calibrate`](../interfaces/CommonConfig.mdx#calibrate) | [src/config/types.ts:127](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L127) | +| `compareOpts` | [`CompareOptsConfig`](../interfaces/CompareOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`compareOpts`](../interfaces/CommonConfig.mdx#compareopts) | [src/config/types.ts:134](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L134) | +| `compositeImage` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`compositeImage`](../interfaces/CommonConfig.mdx#compositeimage) | [src/config/types.ts:128](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L128) | +| `configPath` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`configPath`](../interfaces/CommonConfig.mdx#configpath) | [src/config/index.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L10) | +| `desiredCapabilities` | `null` \| `Capabilities` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`desiredCapabilities`](../interfaces/CommonConfig.mdx#desiredcapabilities) | [src/config/types.ts:98](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L98) | +| `devServer` | \{ `args`: `string`[]; `command`: `null` \| `string`; `cwd`: `null` \| `string`; `env`: `Record`\<`string`, `string`\>; `logs`: `boolean`; `readinessProbe`: `ReadinessProbe`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`devServer`](../interfaces/CommonConfig.mdx#devserver) | [src/config/types.ts:170](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L170) | +| `args` | `string`[] | - | [src/config/types.ts:174](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L174) | +| `command` | `null` \| `string` | - | [src/config/types.ts:171](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L171) | +| `cwd` | `null` \| `string` | - | [src/config/types.ts:172](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L172) | +| `env` | `Record`\<`string`, `string`\> | - | [src/config/types.ts:173](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L173) | +| `logs` | `boolean` | - | [src/config/types.ts:175](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L175) | +| `readinessProbe` | `ReadinessProbe` | - | [src/config/types.ts:176](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L176) | +| `expectOpts` | [`ExpectOptsConfig`](../interfaces/ExpectOptsConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`expectOpts`](../interfaces/CommonConfig.mdx#expectopts) | [src/config/types.ts:137](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L137) | +| `gridUrl` | `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`gridUrl`](../interfaces/CommonConfig.mdx#gridurl) | [src/config/types.ts:103](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L103) | +| `headers` | `null` \| `Record`\<`string`, `string`\> | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`headers`](../interfaces/CommonConfig.mdx#headers) | [src/config/types.ts:142](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L142) | +| `headless` | `null` \| `boolean` \| `"old"` \| `"new"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`headless`](../interfaces/CommonConfig.mdx#headless) | [src/config/types.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L153) | +| `httpTimeout` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`httpTimeout`](../interfaces/CommonConfig.mdx#httptimeout) | [src/config/types.ts:109](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L109) | +| `isolation` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`isolation`](../interfaces/CommonConfig.mdx#isolation) | [src/config/types.ts:154](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L154) | +| `key` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`key`](../interfaces/CommonConfig.mdx#key) | [src/config/types.ts:149](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L149) | +| `lastFailed` | \{ `input`: `string` \| `string`[]; `only`: `boolean`; `output`: `string`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`lastFailed`](../interfaces/CommonConfig.mdx#lastfailed) | [src/config/types.ts:156](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L156) | +| `input` | `string` \| `string`[] | - | [src/config/types.ts:158](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L158) | +| `only` | `boolean` | - | [src/config/types.ts:157](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L157) | +| `output` | `string` | - | [src/config/types.ts:159](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L159) | +| `meta` | \{\} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`meta`](../interfaces/CommonConfig.mdx#meta) | [src/config/types.ts:138](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L138) | +| `openAndWaitOpts` | \{ `failOnNetworkError`: `boolean`; `ignoreNetworkErrorsPatterns`: (`string` \| `RegExp`)[]; `timeout`: `number`; `waitNetworkIdle`: `boolean`; `waitNetworkIdleTimeout`: `number`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`openAndWaitOpts`](../interfaces/CommonConfig.mdx#openandwaitopts) | [src/config/types.ts:162](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L162) | +| `failOnNetworkError` | `boolean` | - | [src/config/types.ts:166](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L166) | +| `ignoreNetworkErrorsPatterns` | (`string` \| `RegExp`)[] | - | [src/config/types.ts:167](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L167) | +| `timeout?` | `number` | - | [src/config/types.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L163) | +| `waitNetworkIdle` | `boolean` | - | [src/config/types.ts:164](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L164) | +| `waitNetworkIdleTimeout` | `number` | - | [src/config/types.ts:165](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L165) | +| `orientation` | `null` \| `"landscape"` \| `"portrait"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`orientation`](../interfaces/CommonConfig.mdx#orientation) | [src/config/types.ts:140](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L140) | +| `pageLoadTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`pageLoadTimeout`](../interfaces/CommonConfig.mdx#pageloadtimeout) | [src/config/types.ts:111](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L111) | +| `plugins` | `Record`\<`string`, `Record`\<`string`, `unknown`\>\> | - | [src/config/types.ts:208](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L208) | +| `prepareEnvironment?` | () => `null` \| `void` | - | [src/config/types.ts:210](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L210) | +| `region` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`region`](../interfaces/CommonConfig.mdx#region) | [src/config/types.ts:150](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L150) | +| `resetCursor` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`resetCursor`](../interfaces/CommonConfig.mdx#resetcursor) | [src/config/types.ts:141](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L141) | +| `retry` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`retry`](../interfaces/CommonConfig.mdx#retry) | [src/config/types.ts:107](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L107) | +| `saveHistoryMode` | `"all"` \| `"none"` \| `"onlyFailed"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`saveHistoryMode`](../interfaces/CommonConfig.mdx#savehistorymode) | [src/config/types.ts:117](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L117) | +| `screenshotDelay` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotDelay`](../interfaces/CommonConfig.mdx#screenshotdelay) | [src/config/types.ts:131](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L131) | +| `screenshotMode` | `"auto"` \| `"fullpage"` \| `"viewport"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotMode`](../interfaces/CommonConfig.mdx#screenshotmode) | [src/config/types.ts:130](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L130) | +| `screenshotPath` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotPath`](../interfaces/CommonConfig.mdx#screenshotpath) | [src/config/types.ts:125](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L125) | +| `sessionEnvFlags` | `Record`\< \| `"isW3C"` \| `"isAndroid"` \| `"isMobile"` \| `"isIOS"` \| `"isSauce"` \| `"isSeleniumStandalone"` \| `"isChrome"`, `boolean`\> | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionEnvFlags`](../interfaces/CommonConfig.mdx#sessionenvflags) | [src/config/types.ts:99](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L99) | +| `sessionQuitTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionQuitTimeout`](../interfaces/CommonConfig.mdx#sessionquittimeout) | [src/config/types.ts:113](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L113) | +| `sessionRequestTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionRequestTimeout`](../interfaces/CommonConfig.mdx#sessionrequesttimeout) | [src/config/types.ts:112](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L112) | +| `sessionsPerBrowser` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`sessionsPerBrowser`](../interfaces/CommonConfig.mdx#sessionsperbrowser) | [src/config/types.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L105) | +| `sets` | `Record`\<`string`, [`SetsConfigParsed`](../interfaces/SetsConfigParsed.mdx)\> | - | [src/config/types.ts:209](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L209) | +| `strictSSL` | `null` \| `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`strictSSL`](../interfaces/CommonConfig.mdx#strictssl) | [src/config/types.ts:147](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L147) | +| `strictTestsOrder` | `boolean` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`strictTestsOrder`](../interfaces/CommonConfig.mdx#stricttestsorder) | [src/config/types.ts:129](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L129) | +| `system` | [`SystemConfig`](../interfaces/SystemConfig.mdx) | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`system`](../interfaces/CommonConfig.mdx#system) | [src/config/types.ts:152](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L152) | +| `takeScreenshotOnFails` | \{ `assertViewFail`: `boolean`; `testFail`: `boolean`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFails`](../interfaces/CommonConfig.mdx#takescreenshotonfails) | [src/config/types.ts:118](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L118) | +| `assertViewFail` | `boolean` | - | [src/config/types.ts:120](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L120) | +| `testFail` | `boolean` | - | [src/config/types.ts:119](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L119) | +| `takeScreenshotOnFailsMode` | `"fullpage"` \| `"viewport"` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFailsMode`](../interfaces/CommonConfig.mdx#takescreenshotonfailsmode) | [src/config/types.ts:123](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L123) | +| `takeScreenshotOnFailsTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`takeScreenshotOnFailsTimeout`](../interfaces/CommonConfig.mdx#takescreenshotonfailstimeout) | [src/config/types.ts:122](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L122) | +| `testTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`testTimeout`](../interfaces/CommonConfig.mdx#testtimeout) | [src/config/types.ts:114](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L114) | +| `testsPerSession` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`testsPerSession`](../interfaces/CommonConfig.mdx#testspersession) | [src/config/types.ts:106](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L106) | +| `tolerance` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`tolerance`](../interfaces/CommonConfig.mdx#tolerance) | [src/config/types.ts:132](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L132) | +| `transformRequest` | (`req`: `RequestOptions`) => `RequestOptions` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`transformRequest`](../interfaces/CommonConfig.mdx#transformrequest) | [src/config/types.ts:144](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L144) | +| `transformResponse` | (`res`: `Response`, `req`: `RequestOptions`) => `Response` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`transformResponse`](../interfaces/CommonConfig.mdx#transformresponse) | [src/config/types.ts:145](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L145) | +| `urlHttpTimeout` | `null` \| `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`urlHttpTimeout`](../interfaces/CommonConfig.mdx#urlhttptimeout) | [src/config/types.ts:110](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L110) | +| `user` | `null` \| `string` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`user`](../interfaces/CommonConfig.mdx#user) | [src/config/types.ts:148](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L148) | +| `waitInterval` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`waitInterval`](../interfaces/CommonConfig.mdx#waitinterval) | [src/config/types.ts:116](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L116) | +| `waitTimeout` | `number` | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`waitTimeout`](../interfaces/CommonConfig.mdx#waittimeout) | [src/config/types.ts:115](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L115) | +| `windowSize` | `null` \| `string` \| \{ `height`: `number`; `width`: `number`; \} | [`CommonConfig`](../interfaces/CommonConfig.mdx).[`windowSize`](../interfaces/CommonConfig.mdx#windowsize) | [src/config/types.ts:139](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L139) | + +## Methods + +### forBrowser() + +```ts +forBrowser(id): BrowserConfig +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`BrowserConfig` + +#### Defined in + +[src/config/index.ts:82](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L82) + +*** + +### getBrowserIds() + +```ts +getBrowserIds(): string[] +``` + +#### Returns + +`string`[] + +#### Defined in + +[src/config/index.ts:86](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L86) + +*** + +### mergeWith() + +```ts +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`](Config.mdx) + +#### Returns + +`void` + +#### Defined in + +[src/config/index.ts:100](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L100) + +*** + +### prepareBrowser() + +```ts +prepareBrowser(browser): null | void +``` + +#### Parameters + +• **browser**: `Browser` + +#### Returns + +`null` \| `void` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`prepareBrowser`](../interfaces/CommonConfig.mdx#preparebrowser) + +#### Defined in + +[src/config/types.ts:124](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L124) + +*** + +### screenshotsDir() + +```ts +screenshotsDir(test): string +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +#### Returns + +`string` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`screenshotsDir`](../interfaces/CommonConfig.mdx#screenshotsdir) + +#### Defined in + +[src/config/types.ts:126](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L126) + +*** + +### serialize() + +```ts +serialize(): Omit +``` + +#### Returns + +`Omit`\<[`Config`](Config.mdx), `"system"`\> + +#### Defined in + +[src/config/index.ts:90](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L90) + +*** + +### shouldRetry() + +```ts +shouldRetry(testInfo): null | boolean +``` + +#### Parameters + +• **testInfo** + +• **testInfo.ctx**: [`Test`](Test.mdx) + +• **testInfo.retriesLeft**: `number` + +#### Returns + +`null` \| `boolean` + +#### Inherited from + +[`CommonConfig`](../interfaces/CommonConfig.mdx).[`shouldRetry`](../interfaces/CommonConfig.mdx#shouldretry) + +#### Defined in + +[src/config/types.ts:108](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L108) + +*** + +### create() + +```ts +static create(config?): Config +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/config/index.ts:12](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L12) + +*** + +### read() + +```ts +static read(configPath): unknown +``` + +#### Parameters + +• **configPath**: `string` + +#### Returns + +`unknown` + +#### Defined in + +[src/config/index.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/index.ts#L16) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Suite.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Suite.mdx new file mode 100644 index 0000000..afe343d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Suite.mdx @@ -0,0 +1,721 @@ +# Suite + +## Extends + +- `ConfigurableTestObject` + +## Constructors + +### new Suite() + +```ts +new Suite(__namedParameters): Suite +``` + +#### Parameters + +• **\_\_namedParameters**: `SuiteOpts` = `...` + +#### Returns + +[`Suite`](Suite.mdx) + +#### Overrides + +`ConfigurableTestObject.constructor` + +#### Defined in + +[src/test-reader/test-object/suite.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L20) + +## Properties + +| Property | Modifier | Type | Default value | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `parent` | `public` | `null` \| [`Suite`](Suite.mdx) | `null` | `ConfigurableTestObject.parent` | [src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) | + +## Accessors + +### afterEachHooks + +```ts +get afterEachHooks(): Hook[] +``` + +#### Returns + +`Hook`[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:95](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L95) + +*** + +### beforeEachHooks + +```ts +get beforeEachHooks(): Hook[] +``` + +#### Returns + +`Hook`[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:91](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L91) + +*** + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.browserId` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +`ConfigurableTestObject.browserVersion` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.disabled` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.file` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.hasBrowserVersionOverwritten` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.id` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.pending` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### root + +```ts +get root(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/test-reader/test-object/suite.ts:79](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L79) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.silentSkip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.skipReason` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### suites + +```ts +get suites(): Suite[] +``` + +#### Returns + +[`Suite`](Suite.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:83](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L83) + +*** + +### tests + +```ts +get tests(): Test[] +``` + +#### Returns + +[`Test`](Test.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:87](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L87) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +`ConfigurableTestObject.timeout` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.title` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Methods + +### addAfterEachHook() + +```ts +addAfterEachHook(hook): this +``` + +#### Parameters + +• **hook**: `Hook` + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L41) + +*** + +### addBeforeEachHook() + +```ts +addBeforeEachHook(hook): this +``` + +#### Parameters + +• **hook**: `Hook` + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:37](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L37) + +*** + +### addSuite() + +```ts +addSuite(suite): this +``` + +#### Parameters + +• **suite**: [`Suite`](Suite.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:29](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L29) + +*** + +### addTest() + +```ts +addTest(test): this +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:33](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L33) + +*** + +### afterEach() + +```ts +afterEach(fn): this +``` + +#### Parameters + +• **fn**: `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:49](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L49) + +*** + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +`ConfigurableTestObject.assign` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### beforeEach() + +```ts +beforeEach(fn): this +``` + +#### Parameters + +• **fn**: `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L45) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.disable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### eachTest() + +```ts +eachTest(cb): void +``` + +#### Parameters + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-reader/test-object/suite.ts:60](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L60) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.enable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### filterTests() + +```ts +filterTests(cb): this +``` + +#### Parameters + +• **cb** + +#### Returns + +`this` + +#### Defined in + +[src/test-reader/test-object/suite.ts:70](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L70) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.fullTitle` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### getTests() + +```ts +getTests(): Test[] +``` + +#### Returns + +[`Test`](Test.mdx)[] + +#### Defined in + +[src/test-reader/test-object/suite.ts:65](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L65) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.skip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +`ConfigurableTestObject.titlePath` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) + +*** + +### create() + +```ts +static create(this, opts): T +``` + +#### Type Parameters + +• **T** *extends* [`Suite`](Suite.mdx) + +#### Parameters + +• **this** + +• **opts**: `SuiteOpts` + +#### Returns + +`T` + +#### Defined in + +[src/test-reader/test-object/suite.ts:15](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/suite.ts#L15) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Test.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Test.mdx new file mode 100644 index 0000000..344325e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Test.mdx @@ -0,0 +1,487 @@ +# Test + +## Extends + +- `ConfigurableTestObject` + +## Extended by + +- [`TestResult`](../interfaces/TestResult.mdx) + +## Constructors + +### new Test() + +```ts +new Test(__namedParameters): Test +``` + +#### Parameters + +• **\_\_namedParameters**: `TestOpts` + +#### Returns + +[`Test`](Test.mdx) + +#### Overrides + +`ConfigurableTestObject.constructor` + +#### Defined in + +[src/test-reader/test-object/test.ts:17](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L17) + +## Properties + +| Property | Modifier | Type | Default value | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `err?` | `public` | `Error` | `undefined` | - | [src/test-reader/test-object/test.ts:11](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L11) | +| `fn` | `public` | `TestFunction`\<[`TestFunctionCtx`](../interfaces/TestFunctionCtx.mdx)\> | `undefined` | - | [src/test-reader/test-object/test.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L10) | +| `parent` | `public` | `null` \| [`Suite`](Suite.mdx) | `null` | `ConfigurableTestObject.parent` | [src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) | + +## Accessors + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.browserId` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +`ConfigurableTestObject.browserVersion` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.disabled` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.file` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.hasBrowserVersionOverwritten` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.id` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.pending` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +`ConfigurableTestObject.silentSkip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.skipReason` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +`ConfigurableTestObject.timeout` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.title` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Methods + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +`ConfigurableTestObject.assign` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### clone() + +```ts +clone(): Test +``` + +#### Returns + +[`Test`](Test.mdx) + +#### Defined in + +[src/test-reader/test-object/test.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L23) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.disable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.enable` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +`ConfigurableTestObject.fullTitle` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +`ConfigurableTestObject.skip` + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +`ConfigurableTestObject.titlePath` + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) + +*** + +### create() + +```ts +static create(this, opts): T +``` + +#### Type Parameters + +• **T** *extends* [`Test`](Test.mdx) + +#### Parameters + +• **this** + +• **opts**: `TestOpts` + +#### Returns + +`T` + +#### Defined in + +[src/test-reader/test-object/test.ts:13](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L13) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/classes/TestCollection.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/TestCollection.mdx new file mode 100644 index 0000000..c21f920 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/TestCollection.mdx @@ -0,0 +1,343 @@ +# TestCollection + +## Constructors + +### new TestCollection() + +```ts +new TestCollection(specs): TestCollection +``` + +#### Parameters + +• **specs**: `Record`\<`string`, [`Test`](Test.mdx)[]\> + +#### Returns + +[`TestCollection`](TestCollection.mdx) + +#### Defined in + +[src/test-collection.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L20) + +## Methods + +### disableAll() + +```ts +disableAll(browserId?): this +``` + +#### Parameters + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:122](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L122) + +*** + +### disableTest() + +```ts +disableTest(fullTitle, browserId?): this +``` + +#### Parameters + +• **fullTitle**: `string` + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L136) + +*** + +### eachRootSuite() + +```ts +eachRootSuite(cb): void +``` + +#### Parameters + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-collection.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L30) + +*** + +### eachTest() + +#### eachTest(callback) + +```ts +eachTest(callback): void +``` + +##### Parameters + +• **callback**: `TestsCallback`\<`void`\> + +##### Returns + +`void` + +##### Defined in + +[src/test-collection.ts:87](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L87) + +#### eachTest(browserId, callback) + +```ts +eachTest(browserId, callback): void +``` + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **callback**: `TestsCallback`\<`void`\> + +##### Returns + +`void` + +##### Defined in + +[src/test-collection.ts:88](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L88) + +*** + +### eachTestByVersions() + +```ts +eachTestByVersions(browserId, cb): void +``` + +#### Parameters + +• **browserId**: `string` + +• **cb** + +#### Returns + +`void` + +#### Defined in + +[src/test-collection.ts:102](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L102) + +*** + +### enableAll() + +```ts +enableAll(browserId?): this +``` + +#### Parameters + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L153) + +*** + +### enableTest() + +```ts +enableTest(fullTitle, browserId?): this +``` + +#### Parameters + +• **fullTitle**: `string` + +• **browserId?**: `string` + +#### Returns + +`this` + +#### Defined in + +[src/test-collection.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L163) + +*** + +### getBrowsers() + +```ts +getBrowsers(): string[] +``` + +#### Returns + +`string`[] + +#### Defined in + +[src/test-collection.ts:43](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L43) + +*** + +### getRootSuite() + +```ts +getRootSuite(browserId): null | RootSuite +``` + +#### Parameters + +• **browserId**: `string` + +#### Returns + +`null` \| `RootSuite` + +#### Defined in + +[src/test-collection.ts:25](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L25) + +*** + +### mapTests() + +#### mapTests(cb) + +```ts +mapTests(cb): T[] +``` + +##### Type Parameters + +• **T** + +##### Parameters + +• **cb**: `TestsCallback`\<`T`\> + +##### Returns + +`T`[] + +##### Defined in + +[src/test-collection.ts:47](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L47) + +#### mapTests(browserId, cb) + +```ts +mapTests(browserId, cb): T[] +``` + +##### Type Parameters + +• **T** + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **cb**: `TestsCallback`\<`T`\> + +##### Returns + +`T`[] + +##### Defined in + +[src/test-collection.ts:48](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L48) + +*** + +### sortTests() + +#### sortTests(callback) + +```ts +sortTests(callback): this +``` + +##### Parameters + +• **callback**: `SortTestsCallback` + +##### Returns + +`this` + +##### Defined in + +[src/test-collection.ts:63](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L63) + +#### sortTests(browserId, callback) + +```ts +sortTests(browserId, callback): this +``` + +##### Parameters + +• **browserId**: `undefined` \| `string` + +• **callback**: `SortTestsCallback` + +##### Returns + +`this` + +##### Defined in + +[src/test-collection.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L64) + +*** + +### create() + +```ts +static create(this, specs): T +``` + +#### Type Parameters + +• **T** *extends* [`TestCollection`](TestCollection.mdx) + +#### Parameters + +• **this** + +• **specs**: `Record`\<`string`, [`Test`](Test.mdx)[]\> + +#### Returns + +`T` + +#### Defined in + +[src/test-collection.ts:13](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-collection.ts#L13) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Testplane.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Testplane.mdx new file mode 100644 index 0000000..8b36e42 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/classes/Testplane.mdx @@ -0,0 +1,613 @@ +# Testplane + +## Extends + +- `BaseTestplane` + +## Constructors + +### new Testplane() + +```ts +new Testplane(config?): Testplane +``` + +#### Parameters + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +#### Returns + +[`Testplane`](Testplane.mdx) + +#### Defined in + +[src/testplane.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L64) + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| `on` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:54](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L54) | +| `once` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:55](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L55) | +| `prependListener` | `MasterEventHandler`\<[`Testplane`](Testplane.mdx)\> | [src/testplane.ts:56](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L56) | + +## Accessors + +### config + +```ts +get config(): Config +``` + +#### Returns + +[`Config`](Config.mdx) + +#### Defined in + +[src/base-testplane.ts:52](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L52) + +*** + +### errors + +```ts +get errors(): { + AbortOnReconnectError: typeof AbortOnReconnectError; + AssertViewError: typeof AssertViewError; + CancelledError: typeof CancelledError; + ClientBridgeError: typeof ClientBridgeError; + CoreError: typeof CoreError; + HeightViewportError: typeof HeightViewportError; + ImageDiffError: typeof ImageDiffError; + NoRefImageError: typeof NoRefImageError; + OffsetViewportError: typeof OffsetViewportError; + TestplaneInternalError: typeof TestplaneInternalError; +} +``` + +#### Returns + +```ts +{ + AbortOnReconnectError: typeof AbortOnReconnectError; + AssertViewError: typeof AssertViewError; + CancelledError: typeof CancelledError; + ClientBridgeError: typeof ClientBridgeError; + CoreError: typeof CoreError; + HeightViewportError: typeof HeightViewportError; + ImageDiffError: typeof ImageDiffError; + NoRefImageError: typeof NoRefImageError; + OffsetViewportError: typeof OffsetViewportError; + TestplaneInternalError: typeof TestplaneInternalError; +} +``` + +##### AbortOnReconnectError + +```ts +AbortOnReconnectError: typeof AbortOnReconnectError; +``` + +##### AssertViewError + +```ts +AssertViewError: typeof AssertViewError; +``` + +##### CancelledError + +```ts +CancelledError: typeof CancelledError; +``` + +##### ClientBridgeError + +```ts +ClientBridgeError: typeof ClientBridgeError; +``` + +##### CoreError + +```ts +CoreError: typeof CoreError; +``` + +##### HeightViewportError + +```ts +HeightViewportError: typeof HeightViewportError; +``` + +##### ImageDiffError + +```ts +ImageDiffError: typeof ImageDiffError; +``` + +##### NoRefImageError + +```ts +NoRefImageError: typeof NoRefImageError; +``` + +##### OffsetViewportError + +```ts +OffsetViewportError: typeof OffsetViewportError; +``` + +##### TestplaneInternalError + +```ts +TestplaneInternalError: typeof TestplaneInternalError; +``` + +#### Defined in + +[src/base-testplane.ts:60](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L60) + +*** + +### events + +```ts +get events(): { + AFTER_FILE_READ: MasterEvents.AFTER_FILE_READ; + AFTER_TESTS_READ: MasterEvents.AFTER_TESTS_READ; + BEFORE_FILE_READ: MasterEvents.BEFORE_FILE_READ; + BEGIN: "begin"; + CLI: "cli"; + END: "end"; + ERROR: "err"; + EXIT: "exit"; + INFO: "info"; + INIT: MasterEvents.INIT; + NEW_BROWSER: "newBrowser"; + NEW_WORKER_PROCESS: "newWorkerProcess"; + RETRY: "retry"; + RUNNER_END: "endRunner"; + RUNNER_START: "startRunner"; + SESSION_END: "endSession"; + SESSION_START: "startSession"; + SUITE_BEGIN: "beginSuite"; + SUITE_END: "endSuite"; + TEST_BEGIN: "beginTest"; + TEST_END: "endTest"; + TEST_FAIL: "failTest"; + TEST_PASS: "passTest"; + TEST_PENDING: "pendingTest"; + UPDATE_REFERENCE: "updateReference"; + WARNING: "warning"; +} +``` + +#### Returns + +```ts +{ + AFTER_FILE_READ: MasterEvents.AFTER_FILE_READ; + AFTER_TESTS_READ: MasterEvents.AFTER_TESTS_READ; + BEFORE_FILE_READ: MasterEvents.BEFORE_FILE_READ; + BEGIN: "begin"; + CLI: "cli"; + END: "end"; + ERROR: "err"; + EXIT: "exit"; + INFO: "info"; + INIT: MasterEvents.INIT; + NEW_BROWSER: "newBrowser"; + NEW_WORKER_PROCESS: "newWorkerProcess"; + RETRY: "retry"; + RUNNER_END: "endRunner"; + RUNNER_START: "startRunner"; + SESSION_END: "endSession"; + SESSION_START: "startSession"; + SUITE_BEGIN: "beginSuite"; + SUITE_END: "endSuite"; + TEST_BEGIN: "beginTest"; + TEST_END: "endTest"; + TEST_FAIL: "failTest"; + TEST_PASS: "passTest"; + TEST_PENDING: "pendingTest"; + UPDATE_REFERENCE: "updateReference"; + WARNING: "warning"; +} +``` + +##### AFTER\_FILE\_READ + +```ts +readonly AFTER_FILE_READ: "afterFileRead" = MasterEvents.AFTER_FILE_READ; +``` + +##### AFTER\_TESTS\_READ + +```ts +readonly AFTER_TESTS_READ: "afterTestsRead" = MasterEvents.AFTER_TESTS_READ; +``` + +##### BEFORE\_FILE\_READ + +```ts +readonly BEFORE_FILE_READ: "beforeFileRead" = MasterEvents.BEFORE_FILE_READ; +``` + +##### BEGIN + +```ts +readonly BEGIN: "begin" = "begin"; +``` + +##### CLI + +```ts +readonly CLI: "cli" = "cli"; +``` + +##### END + +```ts +readonly END: "end" = "end"; +``` + +##### ERROR + +```ts +readonly ERROR: "err" = "err"; +``` + +##### EXIT + +```ts +readonly EXIT: "exit" = "exit"; +``` + +##### INFO + +```ts +readonly INFO: "info" = "info"; +``` + +##### INIT + +```ts +readonly INIT: "init" = MasterEvents.INIT; +``` + +##### NEW\_BROWSER + +```ts +readonly NEW_BROWSER: "newBrowser" = "newBrowser"; +``` + +##### NEW\_WORKER\_PROCESS + +```ts +readonly NEW_WORKER_PROCESS: "newWorkerProcess" = "newWorkerProcess"; +``` + +##### RETRY + +```ts +readonly RETRY: "retry" = "retry"; +``` + +##### RUNNER\_END + +```ts +readonly RUNNER_END: "endRunner" = "endRunner"; +``` + +##### RUNNER\_START + +```ts +readonly RUNNER_START: "startRunner" = "startRunner"; +``` + +##### SESSION\_END + +```ts +readonly SESSION_END: "endSession" = "endSession"; +``` + +##### SESSION\_START + +```ts +readonly SESSION_START: "startSession" = "startSession"; +``` + +##### SUITE\_BEGIN + +```ts +readonly SUITE_BEGIN: "beginSuite" = "beginSuite"; +``` + +##### SUITE\_END + +```ts +readonly SUITE_END: "endSuite" = "endSuite"; +``` + +##### TEST\_BEGIN + +```ts +readonly TEST_BEGIN: "beginTest" = "beginTest"; +``` + +##### TEST\_END + +```ts +readonly TEST_END: "endTest" = "endTest"; +``` + +##### TEST\_FAIL + +```ts +readonly TEST_FAIL: "failTest" = "failTest"; +``` + +##### TEST\_PASS + +```ts +readonly TEST_PASS: "passTest" = "passTest"; +``` + +##### TEST\_PENDING + +```ts +readonly TEST_PENDING: "pendingTest" = "pendingTest"; +``` + +##### UPDATE\_REFERENCE + +```ts +readonly UPDATE_REFERENCE: "updateReference" = "updateReference"; +``` + +##### WARNING + +```ts +readonly WARNING: "warning" = "warning"; +``` + +#### Defined in + +[src/base-testplane.ts:56](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L56) + +## Methods + +### addTestToRun() + +```ts +addTestToRun(test, browserId): boolean +``` + +#### Parameters + +• **test**: [`Test`](Test.mdx) + +• **browserId**: `string` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:149](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L149) + +*** + +### emitAndWait() + +```ts +emitAndWait(event, ...args): Promise +``` + +#### Parameters + +• **event**: `string` \| `symbol` + +• ...**args**: `unknown`[] + +#### Returns + +`Promise`\<`unknown`[]\> + +#### Defined in + +[src/events/async-emitter/index.ts:5](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/events/async-emitter/index.ts#L5) + +*** + +### extendCli() + +```ts +extendCli(parser): void +``` + +#### Parameters + +• **parser**: `Command` + +#### Returns + +`void` + +#### Defined in + +[src/testplane.ts:72](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L72) + +*** + +### halt() + +```ts +halt(err, timeout): void +``` + +#### Parameters + +• **err**: `Error` + +• **timeout**: `number` = `60000` + +#### Returns + +`void` + +#### Defined in + +[src/testplane.ts:204](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L204) + +*** + +### intercept() + +```ts +intercept(event, handler): this +``` + +#### Parameters + +• **event**: [`InterceptedEvent`](../type-aliases/InterceptedEvent.mdx) + +• **handler**: [`InterceptHandler`](../type-aliases/InterceptHandler.mdx) + +#### Returns + +`this` + +#### Defined in + +[src/base-testplane.ts:64](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L64) + +*** + +### isFailed() + +```ts +isFailed(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:184](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L184) + +*** + +### isWorker() + +```ts +isWorker(): boolean +``` + +#### Returns + +`boolean` + +#### Defined in + +[src/testplane.ts:200](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L200) + +*** + +### readTests() + +```ts +readTests(testPaths, __namedParameters): Promise +``` + +#### Parameters + +• **testPaths**: `string`[] + +• **\_\_namedParameters**: `Partial`\<[`ReadTestsOpts`](../interfaces/ReadTestsOpts.mdx)\> = `{}` + +#### Returns + +`Promise`\<[`TestCollection`](TestCollection.mdx)\> + +#### Defined in + +[src/testplane.ts:153](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L153) + +*** + +### run() + +```ts +run(testPaths, __namedParameters): Promise +``` + +#### Parameters + +• **testPaths**: `string`[] \| [`TestCollection`](TestCollection.mdx) + +• **\_\_namedParameters**: `Partial`\<[`RunOpts`](../interfaces/RunOpts.mdx)\> = `{}` + +#### Returns + +`Promise`\<`boolean`\> + +#### Defined in + +[src/testplane.ts:86](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/testplane.ts#L86) + +*** + +### create() + +#### create(this, config) + +```ts +static create(this, config?): T +``` + +##### Type Parameters + +• **T** *extends* `BaseTestplane` + +##### Parameters + +• **this**: `ConstructorWithOptionalConfig`\<`T`\> + +• **config?**: `string` \| [`ConfigInput`](../type-aliases/ConfigInput.mdx) + +##### Returns + +`T` + +##### Defined in + +[src/base-testplane.ts:24](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L24) + +#### create(this, config) + +```ts +static create(this, config): T +``` + +##### Type Parameters + +• **T** *extends* `BaseTestplane` + +##### Parameters + +• **this**: `ConstructorWithStringParam`\<`T`\> + +• **config**: `string` + +##### Returns + +`T` + +##### Defined in + +[src/base-testplane.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/base-testplane.ts#L26) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/index.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/index.mdx new file mode 100644 index 0000000..1621d20 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/index.mdx @@ -0,0 +1,45 @@ +# testplane + +## Classes + +- [Config](classes/Config.mdx) +- [Suite](classes/Suite.mdx) +- [Test](classes/Test.mdx) +- [TestCollection](classes/TestCollection.mdx) +- [Testplane](classes/Testplane.mdx) + +## Interfaces + +- [AssertViewOpts](interfaces/AssertViewOpts.mdx) +- [AssertViewOptsConfig](interfaces/AssertViewOptsConfig.mdx) +- [BrowserHistory](interfaces/BrowserHistory.mdx) +- [BrowserInfo](interfaces/BrowserInfo.mdx) +- [BuildDiffOptsConfig](interfaces/BuildDiffOptsConfig.mdx) +- [CommonConfig](interfaces/CommonConfig.mdx) +- [CompareOptsConfig](interfaces/CompareOptsConfig.mdx) +- [ExpectOptsConfig](interfaces/ExpectOptsConfig.mdx) +- [GlobalHelper](interfaces/GlobalHelper.mdx) +- [HermioneCtx](interfaces/HermioneCtx.mdx) +- [ImageInfo](interfaces/ImageInfo.mdx) +- [ImageSize](interfaces/ImageSize.mdx) +- [InterceptData](interfaces/InterceptData.mdx) +- [MochaOpts](interfaces/MochaOpts.mdx) +- [ReadTestsOpts](interfaces/ReadTestsOpts.mdx) +- [RefImageInfo](interfaces/RefImageInfo.mdx) +- [RunOpts](interfaces/RunOpts.mdx) +- [RuntimeConfig](interfaces/RuntimeConfig.mdx) +- [SetsConfig](interfaces/SetsConfig.mdx) +- [SetsConfigParsed](interfaces/SetsConfigParsed.mdx) +- [SystemConfig](interfaces/SystemConfig.mdx) +- [TestError](interfaces/TestError.mdx) +- [TestFunctionCtx](interfaces/TestFunctionCtx.mdx) +- [TestResult](interfaces/TestResult.mdx) +- [TestplaneCtx](interfaces/TestplaneCtx.mdx) + +## Type Aliases + +- [AssertViewResult](type-aliases/AssertViewResult.mdx) +- [AsyncSessionEventCallback](type-aliases/AsyncSessionEventCallback.mdx) +- [ConfigInput](type-aliases/ConfigInput.mdx) +- [InterceptHandler](type-aliases/InterceptHandler.mdx) +- [InterceptedEvent](type-aliases/InterceptedEvent.mdx) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/AssertViewOpts.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/AssertViewOpts.mdx new file mode 100644 index 0000000..a8d0cf2 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/AssertViewOpts.mdx @@ -0,0 +1,259 @@ +# AssertViewOpts + +## Extends + +- `Partial`\<[`AssertViewOptsConfig`](AssertViewOptsConfig.mdx)\> + +## Properties + +### allowViewportOverflow? + +```ts +optional allowViewportOverflow: boolean; +``` + +Disables check that element is outside of the viewport left, top, right or bottom bounds. + +#### Remarks + +By default Testplane throws an error if element is outside the viewport bounds. +This option disables check that element is outside of the viewport left, top, right or bottom bounds. +And in this case if browser option [compositeImage](https://github.com/gemini-testing/testplane#compositeimage) set to `false`, then only visible part of the element will be captured. +But if [compositeImage](https://github.com/gemini-testing/testplane#compositeimage) set to `true` (default), then in the resulting screenshot will appear the whole element with not visible parts outside of the bottom bounds of viewport. + +#### Default Value + +`false` + +#### Inherited from + +`Partial.allowViewportOverflow` + +#### Defined in + +[src/config/types.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L45) + +*** + +### antialiasingTolerance? + +```ts +optional antialiasingTolerance: number; +``` + +Minimum difference in brightness (zero by default) between the darkest/lightest pixel (which is adjacent to the antialiasing pixel) and theirs adjacent pixels. +Overrides config [browsers](https://github.com/gemini-testing/testplane#browsers).[antialiasingTolerance](https://github.com/gemini-testing/testplane#antialiasingTolerance) value. + +#### Remarks + +Read more about this option in [looks-same](https://github.com/gemini-testing/looks-same#comparing-images-with-ignoring-antialiasing) + +#### Default Value + +`4` + +#### Defined in + +[src/browser/commands/types.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L26) + +*** + +### captureElementFromTop? + +```ts +optional captureElementFromTop: boolean; +``` + +Ability to set capture element from the top area or from current position. + +#### Remarks + +In the first case viewport will be scrolled to the top of the element. + +#### Default Value + +`true` + +#### Inherited from + +`Partial.captureElementFromTop` + +#### Defined in + +[src/config/types.ts:33](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L33) + +*** + +### compositeImage? + +```ts +optional compositeImage: boolean; +``` + +Allows testing of regions which bottom bounds are outside of a viewport height. +Overrides config [browsers](https://github.com/gemini-testing/testplane#browsers).[compositeImage](https://github.com/gemini-testing/testplane#compositeImage) value. + +#### Remarks + +In the resulting screenshot the area which fits the viewport bounds will be joined with the area which is outside of the viewport height. + +#### Default Value + +`true` + +#### Defined in + +[src/browser/commands/types.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L36) + +*** + +### disableAnimation? + +```ts +optional disableAnimation: boolean; +``` + +Ability to disable animations and transitions while making a screenshot + +#### Remarks + +Usefull when you capture screenshot of a page, having animations and transitions. +Iframe animations are only disabled when using webdriver protocol. + +#### Default Value + +`true` + +#### Defined in + +[src/browser/commands/types.ts:67](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L67) + +*** + +### ignoreDiffPixelCount? + +```ts +optional ignoreDiffPixelCount: number | `${number}%`; +``` + +Ability to ignore a small amount of different pixels to classify screenshots as being "identical" + +#### Examples + +```ts +5 +``` + +```ts +'1.5%' +``` + +#### Remarks + +Useful when you encounter a few pixels difference that cannot be eliminated using the tolerance and antialiasingTolerance settings. + +#### Note + +This should be considered a last resort and only used in small number of cases where necessary. + +#### Default Value + +`0` + +#### Defined in + +[src/browser/commands/types.ts:82](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L82) + +*** + +### ignoreElements? + +```ts +optional ignoreElements: string | string[]; +``` + +DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images. + +#### Default Value + +`[]` + +#### Inherited from + +`Partial.ignoreElements` + +#### Defined in + +[src/config/types.ts:24](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L24) + +*** + +### screenshotDelay? + +```ts +optional screenshotDelay: number; +``` + +Allows to specify a delay (in milliseconds) before making any screenshot. +Overrides config [browsers](https://github.com/gemini-testing/testplane#browsers).[screenshotDelay](https://github.com/gemini-testing/testplane#screenshotDelay) value. + +#### Remarks + +This is useful when the page has elements which are animated or if you do not want to screen a scrollbar. + +#### Default Value + +`0` + +#### Defined in + +[src/browser/commands/types.ts:46](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L46) + +*** + +### selectorToScroll? + +```ts +optional selectorToScroll: string; +``` + +Ability to set DOM-node selector which should be scroll when the captured element does not completely fit on the screen. + +#### Remarks + +Useful when you capture the modal (popup). In this case a duplicate of the modal appears on the screenshot. +That happens because we scroll the page using `window` selector, which scroll only the background of the modal, and the modal itself remains in place. +Default value is `undefined` (it means scroll relative to `window`). Works only when `compositeImage` is `true` (default). + +#### Default Value + +`undefined` + +#### Defined in + +[src/browser/commands/types.ts:57](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L57) + +*** + +### tolerance? + +```ts +optional tolerance: number; +``` + +Maximum allowed difference between colors. +Overrides config [browsers](https://github.com/gemini-testing/testplane#browsers).[tolerance](https://github.com/gemini-testing/testplane#tolerance) value. + +#### Remarks + +Indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode. +Increasing global default is not recommended, prefer changing tolerance for particular suites or states instead. +By default it's 2.3 which should be enough for the most cases. + +#### Default Value + +`2.3` + +#### Defined in + +[src/browser/commands/types.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/browser/commands/types.ts#L16) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/GlobalHelper.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/GlobalHelper.mdx new file mode 100644 index 0000000..18719dd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/GlobalHelper.mdx @@ -0,0 +1,81 @@ +# GlobalHelper + +## Properties + +### also + +```ts +also: AlsoController; +``` + +#### Defined in + +[src/types/index.ts:165](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L165) + +*** + +### browser() + +```ts +browser: (browserName) => BrowserVersionController; +``` + +#### Parameters + +• **browserName**: `string` + +#### Returns + +`BrowserVersionController` + +#### Defined in + +[src/types/index.ts:166](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L166) + +*** + +### config + +```ts +config: ConfigController; +``` + +#### Defined in + +[src/types/index.ts:167](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L167) + +*** + +### ctx + +```ts +ctx: TestplaneCtx; +``` + +#### Defined in + +[src/types/index.ts:162](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L162) + +*** + +### only + +```ts +only: OnlyController; +``` + +#### Defined in + +[src/types/index.ts:164](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L164) + +*** + +### skip + +```ts +skip: SkipController; +``` + +#### Defined in + +[src/types/index.ts:163](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L163) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/HermioneCtx.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/HermioneCtx.mdx new file mode 100644 index 0000000..83d94b3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/HermioneCtx.mdx @@ -0,0 +1,13 @@ +# ~~HermioneCtx~~ + +## Deprecated + +Use `TestplaneCtx` instead + +## Extends + +- `Record`\<`string`, `unknown`\> + +## Extended by + +- [`TestplaneCtx`](TestplaneCtx.mdx) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestError.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestError.mdx new file mode 100644 index 0000000..3d953ee --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestError.mdx @@ -0,0 +1,77 @@ +# TestError + +## Extends + +- `Error` + +## Properties + +### details + +```ts +details: ErrorDetails; +``` + +#### Defined in + +[src/types/index.ts:59](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L59) + +*** + +### message + +```ts +message: string; +``` + +#### Inherited from + +`Error.message` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### name + +```ts +name: string; +``` + +#### Inherited from + +`Error.name` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### screenshot? + +```ts +optional screenshot: ImageBase64; +``` + +#### Defined in + +[src/types/index.ts:58](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L58) + +*** + +### stack? + +```ts +optional stack: string; +``` + +#### Inherited from + +`Error.stack` + +#### Defined in + +../node\_modules/typescript/lib/lib.es5.d.ts:1078 diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestFunctionCtx.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestFunctionCtx.mdx new file mode 100644 index 0000000..6af51cd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestFunctionCtx.mdx @@ -0,0 +1,25 @@ +# TestFunctionCtx + +## Properties + +### browser + +```ts +browser: Browser; +``` + +#### Defined in + +[src/test-reader/test-object/types.ts:22](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/types.ts#L22) + +*** + +### currentTest + +```ts +currentTest: Test; +``` + +#### Defined in + +[src/test-reader/test-object/types.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/types.ts#L23) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestResult.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestResult.mdx new file mode 100644 index 0000000..2570fdd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestResult.mdx @@ -0,0 +1,593 @@ +# TestResult + +## Extends + +- [`Test`](../classes/Test.mdx) + +## Properties + +### assertViewResults + +```ts +assertViewResults: AssertViewResult[]; +``` + +#### Defined in + +[src/types/index.ts:135](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L135) + +*** + +### description? + +```ts +optional description: string; +``` + +#### Defined in + +[src/types/index.ts:136](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L136) + +*** + +### duration + +```ts +duration: number; +``` + +#### Defined in + +[src/types/index.ts:137](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L137) + +*** + +### err? + +```ts +optional err: TestError; +``` + +#### Overrides + +[`Test`](../classes/Test.mdx).[`err`](../classes/Test.mdx#err) + +#### Defined in + +[src/types/index.ts:138](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L138) + +*** + +### fn + +```ts +fn: TestFunction; +``` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`fn`](../classes/Test.mdx#fn) + +#### Defined in + +[src/test-reader/test-object/test.ts:10](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L10) + +*** + +### ~~hermioneCtx~~ + +```ts +hermioneCtx: ExecutionThreadToolCtx; +``` + +#### Deprecated + +Use `testplaneCtx` instead + +#### Defined in + +[src/types/index.ts:143](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L143) + +*** + +### history + +```ts +history: CommandHistory; +``` + +#### Defined in + +[src/types/index.ts:144](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L144) + +*** + +### meta + +```ts +meta: {}; +``` + +#### Index Signature + + \[`name`: `string`\]: `unknown` + +#### Defined in + +[src/types/index.ts:145](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L145) + +*** + +### parent + +```ts +parent: null | Suite = null; +``` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`parent`](../classes/Test.mdx#parent) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:6](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L6) + +*** + +### sessionId + +```ts +sessionId: string; +``` + +#### Defined in + +[src/types/index.ts:146](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L146) + +*** + +### startTime + +```ts +startTime: number; +``` + +#### Defined in + +[src/types/index.ts:147](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L147) + +*** + +### testplaneCtx + +```ts +testplaneCtx: ExecutionThreadToolCtx; +``` + +#### Defined in + +[src/types/index.ts:139](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/types/index.ts#L139) + +## Accessors + +### browserId + +```ts +get browserId(): string +``` + +```ts +set browserId(id): void +``` + +#### Parameters + +• **id**: `string` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`browserId`](../classes/Test.mdx#browserid) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:93](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L93) + +*** + +### browserVersion + +```ts +get browserVersion(): undefined | string +``` + +```ts +set browserVersion(version): void +``` + +#### Parameters + +• **version**: `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`browserVersion`](../classes/Test.mdx#browserversion) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:101](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L101) + +*** + +### disabled + +```ts +get disabled(): boolean +``` + +```ts +set disabled(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`disabled`](../classes/Test.mdx#disabled) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:69](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L69) + +*** + +### file + +```ts +get file(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`file`](../classes/Test.mdx#file) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:45](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L45) + +*** + +### hasBrowserVersionOverwritten + +```ts +get hasBrowserVersionOverwritten(): boolean +``` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`hasBrowserVersionOverwritten`](../classes/Test.mdx#hasbrowserversionoverwritten) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:105](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L105) + +*** + +### id + +```ts +get id(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`id`](../classes/Test.mdx#id) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:41](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L41) + +*** + +### pending + +```ts +get pending(): boolean +``` + +```ts +set pending(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`pending`](../classes/Test.mdx#pending) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:53](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L53) + +*** + +### silentSkip + +```ts +get silentSkip(): boolean +``` + +```ts +set silentSkip(val): void +``` + +#### Parameters + +• **val**: `boolean` + +#### Returns + +`boolean` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`silentSkip`](../classes/Test.mdx#silentskip) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:77](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L77) + +*** + +### skipReason + +```ts +get skipReason(): string +``` + +```ts +set skipReason(reason): void +``` + +#### Parameters + +• **reason**: `string` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`skipReason`](../classes/Test.mdx#skipreason) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:61](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L61) + +*** + +### timeout + +```ts +get timeout(): number +``` + +```ts +set timeout(timeout): void +``` + +#### Parameters + +• **timeout**: `number` + +#### Returns + +`number` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`timeout`](../classes/Test.mdx#timeout) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:85](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L85) + +*** + +### title + +```ts +get title(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`title`](../classes/Test.mdx#title) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:16](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L16) + +## Methods + +### assign() + +```ts +assign(src): this +``` + +#### Parameters + +• **src**: `this` + +#### Returns + +`this` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`assign`](../classes/Test.mdx#assign) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L20) + +*** + +### clone() + +```ts +clone(): Test +``` + +#### Returns + +[`Test`](../classes/Test.mdx) + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`clone`](../classes/Test.mdx#clone) + +#### Defined in + +[src/test-reader/test-object/test.ts:23](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test.ts#L23) + +*** + +### disable() + +```ts +disable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`disable`](../classes/Test.mdx#disable) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:31](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L31) + +*** + +### enable() + +```ts +enable(): void +``` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`enable`](../classes/Test.mdx#enable) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:36](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L36) + +*** + +### fullTitle() + +```ts +fullTitle(): string +``` + +#### Returns + +`string` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`fullTitle`](../classes/Test.mdx#fulltitle) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:30](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L30) + +*** + +### skip() + +```ts +skip(__namedParameters): void +``` + +#### Parameters + +• **\_\_namedParameters**: `SkipData` + +#### Returns + +`void` + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`skip`](../classes/Test.mdx#skip) + +#### Defined in + +[src/test-reader/test-object/configurable-test-object.ts:26](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/configurable-test-object.ts#L26) + +*** + +### titlePath() + +```ts +titlePath(): string[] +``` + +#### Returns + +`string`[] + +#### Inherited from + +[`Test`](../classes/Test.mdx).[`titlePath`](../classes/Test.mdx#titlepath) + +#### Defined in + +[src/test-reader/test-object/test-object.ts:20](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/test-reader/test-object/test-object.ts#L20) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestplaneCtx.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestplaneCtx.mdx new file mode 100644 index 0000000..d3b943c --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/interfaces/TestplaneCtx.mdx @@ -0,0 +1,9 @@ +# ~~TestplaneCtx~~ + +## Deprecated + +Use `TestplaneCtx` instead + +## Extends + +- [`HermioneCtx`](HermioneCtx.mdx) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/type-aliases/ConfigInput.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/type-aliases/ConfigInput.mdx new file mode 100644 index 0000000..4e64d88 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/type-aliases/ConfigInput.mdx @@ -0,0 +1,48 @@ +# ConfigInput + +```ts +type ConfigInput: Partial & { + browsers: Record & { + desiredCapabilities: WebdriverIO.Capabilities; + }>; + plugins: Record; + prepareEnvironment: () => void | null; + sets: Record; +}; +``` + +## Type declaration + +### browsers + +```ts +browsers: Record & { + desiredCapabilities: WebdriverIO.Capabilities; +}>; +``` + +### plugins? + +```ts +optional plugins: Record; +``` + +### prepareEnvironment()? + +```ts +optional prepareEnvironment: () => void | null; +``` + +#### Returns + +`void` \| `null` + +### sets? + +```ts +optional sets: Record; +``` + +## Defined in + +[src/config/types.ts:193](https://github.com/gemini-testing/testplane/blob/526dd31893cff211e94897f157309c868ebe6c97/src/config/types.ts#L193) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/typedoc-sidebar.cjs b/i18n/en/docusaurus-plugin-content-docs/current/api/typedoc-sidebar.cjs new file mode 100644 index 0000000..893c3b4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/api/typedoc-sidebar.cjs @@ -0,0 +1,4 @@ +// @ts-check +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const typedocSidebar = { items: [{"type":"category","label":"Classes","items":[{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/classes/Config","label":"Config"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/classes/Suite","label":"Suite"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/classes/Test","label":"Test"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/classes/TestCollection","label":"TestCollection"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/classes/Testplane","label":"Testplane"}]},{"type":"category","label":"Interfaces","items":[{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/AssertViewOpts","label":"AssertViewOpts"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/AssertViewOptsConfig","label":"AssertViewOptsConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/BrowserHistory","label":"BrowserHistory"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/BrowserInfo","label":"BrowserInfo"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/BuildDiffOptsConfig","label":"BuildDiffOptsConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/CommonConfig","label":"CommonConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/CompareOptsConfig","label":"CompareOptsConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/ExpectOptsConfig","label":"ExpectOptsConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/GlobalHelper","label":"GlobalHelper"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/HermioneCtx","label":"HermioneCtx"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/ImageInfo","label":"ImageInfo"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/ImageSize","label":"ImageSize"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/InterceptData","label":"InterceptData"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/MochaOpts","label":"MochaOpts"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/ReadTestsOpts","label":"ReadTestsOpts"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/RefImageInfo","label":"RefImageInfo"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/RunOpts","label":"RunOpts"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/RuntimeConfig","label":"RuntimeConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/SetsConfig","label":"SetsConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/SetsConfigParsed","label":"SetsConfigParsed"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/SystemConfig","label":"SystemConfig"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/TestError","label":"TestError"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/TestFunctionCtx","label":"TestFunctionCtx"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/TestResult","label":"TestResult"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/interfaces/TestplaneCtx","label":"TestplaneCtx"}]},{"type":"category","label":"Type Aliases","items":[{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/type-aliases/AssertViewResult","label":"AssertViewResult"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/type-aliases/AsyncSessionEventCallback","label":"AsyncSessionEventCallback"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/type-aliases/ConfigInput","label":"ConfigInput"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/type-aliases/InterceptHandler","label":"InterceptHandler"},{"type":"doc","id":"en/docusaurus-plugin-content-docs/current/api/type-aliases/InterceptedEvent","label":"InterceptedEvent"}]}]}; +module.exports = typedocSidebar.items; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 40638ff..957db00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "@svgr/webpack": "8.1.0", "autoprefixer": "10.4.19", "docusaurus-plugin-sass": "0.2.5", + "docusaurus-plugin-typedoc": "1.0.5", "eslint": "8.57.0", "eslint-config-gemini-testing": "3.0.0", "eslint-config-prettier": "9.1.0", @@ -48,6 +49,10 @@ "storybook": "8.0.5", "tailwindcss": "3.4.1", "typed.js": "2.1.0", + "typedoc": "0.26.5", + "typedoc-plugin-localization": "3.0.5", + "typedoc-plugin-markdown": "4.2.4", + "typedoc-plugin-rename-defaults": "0.7.1", "typescript": "5.4.3", "typescript-eslint": "7.4.0", "zustand": "4.5.2" @@ -5102,6 +5107,15 @@ } } }, + "node_modules/@shikijs/core": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.12.1.tgz", + "integrity": "sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.4" + } + }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", @@ -11448,6 +11462,15 @@ "sass": "^1.30.0" } }, + "node_modules/docusaurus-plugin-typedoc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-1.0.5.tgz", + "integrity": "sha512-mv8LBJYilGOOPLqaIM3vbYc34m4qwOCpb4WfP24DOPFNj2uiTerw8sg9MGvN6Jx2+J8rq9/WMnjcyz3UMqoIIQ==", + "dev": true, + "peerDependencies": { + "typedoc-plugin-markdown": ">=4.0.0" + } + }, "node_modules/docusaurus-plugin-yandex-metrica": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/docusaurus-plugin-yandex-metrica/-/docusaurus-plugin-yandex-metrica-1.2.1.tgz", @@ -17103,6 +17126,15 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -17440,6 +17472,12 @@ "yallist": "^3.0.2" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -17509,6 +17547,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, "node_modules/markdown-table": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", @@ -17920,6 +17975,12 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -22459,6 +22520,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/pupa": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", @@ -24758,6 +24828,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/shiki": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.12.1.tgz", + "integrity": "sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg==", + "dev": true, + "dependencies": { + "@shikijs/core": "1.12.1", + "@types/hast": "^3.0.4" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -26297,6 +26377,109 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typedoc": { + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.5.tgz", + "integrity": "sha512-Vn9YKdjKtDZqSk+by7beZ+xzkkr8T8CYoiasqyt4TTRFy5+UHzL/mF/o4wGBjRF+rlWQHDb0t6xCpA3JNL5phg==", + "dev": true, + "dependencies": { + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "shiki": "^1.9.1", + "yaml": "^2.4.5" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" + } + }, + "node_modules/typedoc-plugin-localization": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/typedoc-plugin-localization/-/typedoc-plugin-localization-3.0.5.tgz", + "integrity": "sha512-mvk0/DyjlFWcjxl2d0AsDeM6X8TjFE8FlbVyPDjY0mg54mHk9INp1rAbx9zZ5jtiLUVHrE8t9fb8FacmbmvqwA==", + "dev": true, + "dependencies": { + "fs-extra": "^11.2.0" + } + }, + "node_modules/typedoc-plugin-markdown": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.4.tgz", + "integrity": "sha512-9jdYqF5Sx1qxvSo7wV1mUHA2XYn3Y1DJ/ttCWW1V4lHdzDAwIA/EB9U92Ryx3GOSD73X1u8eTu8fBjoCmkURTQ==", + "dev": true, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typedoc": "0.26.x" + } + }, + "node_modules/typedoc-plugin-rename-defaults": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.7.1.tgz", + "integrity": "sha512-hgg4mAy5IumgUmPOnVVGmGywjTGtUCmRJ2jRbseqtXdlUuYKj652ODL9joUWFt5uvNu4Dr/pNILc/qsKGHJw+w==", + "dev": true, + "dependencies": { + "camelcase": "^8.0.0" + }, + "peerDependencies": { + "typedoc": ">=0.22.x <0.27.x" + } + }, + "node_modules/typedoc-plugin-rename-defaults/node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typedoc/node_modules/yaml": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", + "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/typescript": { "version": "5.4.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", @@ -26459,6 +26642,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true + }, "node_modules/ufo": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", diff --git a/package.json b/package.json index 38dc753..6ece0aa 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,12 @@ "test": "npm run lint && npm run typecheck", "typecheck": "tsc", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "clone-testplane": "node clone-testplane.js", + "docs:generate:template": "npx typedoc .testplane/src/ --generate-json exports", + "docs:generate:ru": "npx typedoc .testplane/src/ --generate-from-json ./exports --out docs/api --lang ru", + "docs:generate:en": "npx typedoc .testplane/src/ --out i18n/en/docusaurus-plugin-content-docs/current/api", + "docs:generate": "npm run docs:generate:en && npm run docs:generate:ru" }, "dependencies": { "@docusaurus/core": "3.4.0", @@ -40,6 +45,7 @@ "@svgr/webpack": "8.1.0", "autoprefixer": "10.4.19", "docusaurus-plugin-sass": "0.2.5", + "docusaurus-plugin-typedoc": "1.0.5", "eslint": "8.57.0", "eslint-config-gemini-testing": "3.0.0", "eslint-config-prettier": "9.1.0", @@ -53,6 +59,10 @@ "storybook": "8.0.5", "tailwindcss": "3.4.1", "typed.js": "2.1.0", + "typedoc": "0.26.5", + "typedoc-plugin-localization": "3.0.5", + "typedoc-plugin-markdown": "4.2.4", + "typedoc-plugin-rename-defaults": "0.7.1", "typescript": "5.4.3", "typescript-eslint": "7.4.0", "zustand": "4.5.2" diff --git a/sidebars.ts b/sidebars.ts index 508caf2..a690f58 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1,6 +1,6 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; - const sidebars: SidebarsConfig = { + apiSidebar: [{ type: "autogenerated", dirName: "api" }], mainSidebar: [ "index", { diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..bb13d84 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://typedoc-plugin-markdown.org/schema.json", + "basePath": ".testplane/", + "tsconfig": ".testplane/tsconfig.json", + "name": "testplane", + "entryPoints": [".testplane/src/index.ts"], + "exclude": [".testplane/node_modules/**"], + "plugin": ["typedoc-plugin-rename-defaults", "typedoc-plugin-localization", "typedoc-plugin-markdown"], + "readme": "none", + "useCodeBlocks": true, + "expandObjects": true, + "hidePageHeader": true, + "excludeInternal": true, + "classPropertiesFormat": "htmlTable", + "excludeProtected": true, + "fileExtension": ".mdx", + "gitRemote": "origin", + "textContentMappings": { + "title.memberPage": "{name}", + }, + + "locales": { + "ru": { + "kind_module": "Модуль", + "kind_enum": "Перечисление", + "kind_variable": "Переменная", + "kind_function": "Функция", + "kind_class": "Класс", + "kind_interface": "Интерфейс", + "kind_constructor": "Конструктор", + "kind_property": "Свойство", + "kind_method": "Метод", + + // ReflectionKind plural translations + "kind_plural_module": "Модули", + "kind_plural_enum": "Перечисления", + "kind_plural_variable": "Переменные", + "kind_plural_function": "Функции", + "kind_plural_class": "Классы", + "kind_plural_interface": "Интерфейсы", + "kind_plural_constructor": "Конструкторы", + "kind_plural_property": "Свойства", + "kind_plural_method": "Методы", + } + } +}