Skip to content

Commit

Permalink
test: test auto docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabir-Ivan committed Aug 15, 2024
1 parent b5b4ada commit a25476a
Show file tree
Hide file tree
Showing 132 changed files with 44,402 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ npm-debug.log*
*storybook.log
storybook-static
tmp
.testplane
!exports
30 changes: 30 additions & 0 deletions clone-testplane.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');

const LOCAL = process.env.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
fs.symlinkSync(LOCAL_REPO_DIR, tempDir, 'dir');
console.log(`Linked 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}`);
}
81 changes: 81 additions & 0 deletions docs/api-reference/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# testplane

## Classes

| Class | Description |
| ------ | ------ |
| [AbortOnReconnectError](classes/AbortOnReconnectError.mdx) | - |
| [AssertViewError](classes/AssertViewError.mdx) | - |
| [CancelledError](classes/CancelledError.mdx) | - |
| [ClientBridgeError](classes/ClientBridgeError.mdx) | - |
| [Config](classes/Config.mdx) | - |
| [CoreError](classes/CoreError.mdx) | - |
| [HeightViewportError](classes/HeightViewportError.mdx) | Height of the element is larger than viewport |
| [ImageDiffError](classes/ImageDiffError.mdx) | - |
| [NoRefImageError](classes/NoRefImageError.mdx) | - |
| [OffsetViewportError](classes/OffsetViewportError.mdx) | Position of an element is outside of a viewport left, top or right bounds |
| [Suite](classes/Suite.mdx) | - |
| [Test](classes/Test.mdx) | - |
| [TestCollection](classes/TestCollection.mdx) | - |
| [Testplane](classes/Testplane.mdx) | - |
| [TestplaneInternalError](classes/TestplaneInternalError.mdx) | - |

## Interfaces

| Interface | Description |
| ------ | ------ |
| [AfterFileReadData](interfaces/AfterFileReadData.mdx) | - |
| [AssertViewOpts](interfaces/AssertViewOpts.mdx) | - |
| [AssertViewOptsConfig](interfaces/AssertViewOptsConfig.mdx) | - |
| [AssertViewResultDiff](interfaces/AssertViewResultDiff.mdx) | - |
| [AssertViewResultNoRefImage](interfaces/AssertViewResultNoRefImage.mdx) | - |
| [AssertViewResultSuccess](interfaces/AssertViewResultSuccess.mdx) | - |
| [BeforeFileReadData](interfaces/BeforeFileReadData.mdx) | - |
| [BrowserHistory](interfaces/BrowserHistory.mdx) | - |
| [BrowserInfo](interfaces/BrowserInfo.mdx) | - |
| [BuildDiffOptsConfig](interfaces/BuildDiffOptsConfig.mdx) | - |
| [CommandHistory](interfaces/CommandHistory.mdx) | - |
| [CommonConfig](interfaces/CommonConfig.mdx) | - |
| [CompareOptsConfig](interfaces/CompareOptsConfig.mdx) | - |
| [DiffOptions](interfaces/DiffOptions.mdx) | - |
| [ErrorDetails](interfaces/ErrorDetails.mdx) | - |
| [ExecutionThreadToolCtx](interfaces/ExecutionThreadToolCtx.mdx) | - |
| [ExpectOptsConfig](interfaces/ExpectOptsConfig.mdx) | - |
| [GlobalHelper](interfaces/GlobalHelper.mdx) | - |
| [HermioneCtx](interfaces/HermioneCtx.mdx) | - |
| [ImageBase64](interfaces/ImageBase64.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) | - |
| [RootSuite](interfaces/RootSuite.mdx) | - |
| [RunOpts](interfaces/RunOpts.mdx) | - |
| [SetsConfig](interfaces/SetsConfig.mdx) | - |
| [SystemConfig](interfaces/SystemConfig.mdx) | - |
| [TestError](interfaces/TestError.mdx) | - |
| [TestFunctionCtx](interfaces/TestFunctionCtx.mdx) | - |
| [TestResult](interfaces/TestResult.mdx) | - |
| [TestResultWithRetries](interfaces/TestResultWithRetries.mdx) | - |
| [TestplaneCtx](interfaces/TestplaneCtx.mdx) | - |
| [WdioBrowser](interfaces/WdioBrowser.mdx) | - |

## Type Aliases

| Type alias | Description |
| ------ | ------ |
| [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) | - |
| [MasterEventHandler](type-aliases/MasterEventHandler.mdx) | - |
| [SyncSessionEventCallback](type-aliases/SyncSessionEventCallback.mdx) | - |
| [WorkerEventHandler](type-aliases/WorkerEventHandler.mdx) | - |

## Variables

| Variable | Description |
| ------ | ------ |
| [Key](variables/Key.mdx) | - |
66 changes: 66 additions & 0 deletions docs/api-reference/classes/AbortOnReconnectError.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[testplane](../README.mdx) / AbortOnReconnectError

# Class: AbortOnReconnectError

## Extends

- `Error`

## Constructors

### new AbortOnReconnectError()

```ts
new AbortOnReconnectError(): AbortOnReconnectError
```

#### Returns

[`AbortOnReconnectError`](AbortOnReconnectError.mdx)

#### Overrides

`Error.constructor`

#### Defined in

testplane-docs/.testplane/src/errors/abort-on-reconnect-error.ts:2

## Properties

| Property | Modifier | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ |
| `message` | `public` | `string` | - | `Error.message` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1077 |
| `name` | `public` | `string` | - | `Error.name` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
| `stack?` | `public` | `string` | - | `Error.stack` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `prepareStackTrace?` | `static` | (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` | Optional override for formatting stack traces **See** https://v8.dev/docs/stack-trace-api#customizing-stack-traces | `Error.prepareStackTrace` | testplane/node\_modules/@types/node/globals.d.ts:27 |
| `stackTraceLimit` | `static` | `number` | - | `Error.stackTraceLimit` | testplane/node\_modules/@types/node/globals.d.ts:29 |

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void
```
Create .stack property on a target object
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt`? | `Function` |
#### Returns
`void`
#### Inherited from
`Error.captureStackTrace`
#### Defined in
testplane/node\_modules/@types/node/globals.d.ts:20
72 changes: 72 additions & 0 deletions docs/api-reference/classes/AssertViewError.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[testplane](../README.mdx) / AssertViewError

# Class: AssertViewError

## Extends

- `Error`

## Constructors

### new AssertViewError()

```ts
new AssertViewError(message): AssertViewError
```

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `message` | `string` | `"image comparison failed"` |

#### Returns

[`AssertViewError`](AssertViewError.mdx)

#### Overrides

`Error.constructor`

#### Defined in

testplane-docs/.testplane/src/browser/commands/assert-view/errors/assert-view-error.ts:2

## Properties

| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| `message` | `public` | `string` | `"image comparison failed"` | - | `Error.message` | testplane-docs/.testplane/src/browser/commands/assert-view/errors/assert-view-error.ts:2 |
| `name` | `public` | `string` | `undefined` | - | `Error.name` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
| `stack?` | `public` | `string` | `undefined` | - | `Error.stack` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `prepareStackTrace?` | `static` | (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` | `undefined` | Optional override for formatting stack traces **See** https://v8.dev/docs/stack-trace-api#customizing-stack-traces | `Error.prepareStackTrace` | testplane/node\_modules/@types/node/globals.d.ts:27 |
| `stackTraceLimit` | `static` | `number` | `undefined` | - | `Error.stackTraceLimit` | testplane/node\_modules/@types/node/globals.d.ts:29 |

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void
```
Create .stack property on a target object
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt`? | `Function` |
#### Returns
`void`
#### Inherited from
`Error.captureStackTrace`
#### Defined in
testplane/node\_modules/@types/node/globals.d.ts:20
66 changes: 66 additions & 0 deletions docs/api-reference/classes/CancelledError.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[testplane](../README.mdx) / CancelledError

# Class: CancelledError

## Extends

- `Error`

## Constructors

### new CancelledError()

```ts
new CancelledError(): CancelledError
```

#### Returns

[`CancelledError`](CancelledError.mdx)

#### Overrides

`Error.constructor`

#### Defined in

testplane-docs/.testplane/src/browser-pool/cancelled-error.ts:5

## Properties

| Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| `message` | `public` | `string` | `"Browser request was cancelled"` | - | `Error.message` | - | testplane-docs/.testplane/src/browser-pool/cancelled-error.ts:3 |
| `name` | `public` | `string` | `"CancelledError"` | - | `Error.name` | - | testplane-docs/.testplane/src/browser-pool/cancelled-error.ts:2 |
| `stack?` | `public` | `string` | `undefined` | - | - | `Error.stack` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `prepareStackTrace?` | `static` | (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` | `undefined` | Optional override for formatting stack traces **See** https://v8.dev/docs/stack-trace-api#customizing-stack-traces | - | `Error.prepareStackTrace` | testplane/node\_modules/@types/node/globals.d.ts:27 |
| `stackTraceLimit` | `static` | `number` | `undefined` | - | - | `Error.stackTraceLimit` | testplane/node\_modules/@types/node/globals.d.ts:29 |

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void
```
Create .stack property on a target object
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt`? | `Function` |
#### Returns
`void`
#### Inherited from
`Error.captureStackTrace`
#### Defined in
testplane/node\_modules/@types/node/globals.d.ts:20
72 changes: 72 additions & 0 deletions docs/api-reference/classes/ClientBridgeError.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[testplane](../README.mdx) / ClientBridgeError

# Class: ClientBridgeError

## Extends

- `Error`

## Constructors

### new ClientBridgeError()

```ts
new ClientBridgeError(message): ClientBridgeError
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `message` | `string` |

#### Returns

[`ClientBridgeError`](ClientBridgeError.mdx)

#### Overrides

`Error.constructor`

#### Defined in

testplane-docs/.testplane/src/browser/client-bridge/error.ts:2

## Properties

| Property | Modifier | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ |
| `message` | `public` | `string` | - | `Error.message` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1077 |
| `name` | `public` | `string` | - | `Error.name` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
| `stack?` | `public` | `string` | - | `Error.stack` | testplane-docs/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `prepareStackTrace?` | `static` | (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` | Optional override for formatting stack traces **See** https://v8.dev/docs/stack-trace-api#customizing-stack-traces | `Error.prepareStackTrace` | testplane/node\_modules/@types/node/globals.d.ts:27 |
| `stackTraceLimit` | `static` | `number` | - | `Error.stackTraceLimit` | testplane/node\_modules/@types/node/globals.d.ts:29 |

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void
```
Create .stack property on a target object
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt`? | `Function` |
#### Returns
`void`
#### Inherited from
`Error.captureStackTrace`
#### Defined in
testplane/node\_modules/@types/node/globals.d.ts:20
Loading

0 comments on commit a25476a

Please sign in to comment.