Skip to content

Commit 3a50551

Browse files
committed
docs(pilot): update setup instructions.
1 parent e5588b1 commit 3a50551

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/api/pilot.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,24 @@ Detox Pilot exposes a simple API that integrates seamlessly with your Detox test
2525

2626
For a more detailed guide on integrating Wix Pilot in your tests, refer to the \[Detox Pilot Guide].
2727

28+
## Installation
29+
30+
To get started with Detox Pilot, you'll need to install the `@wix-pilot/core` and `@wix-pilot/detox` packages.
31+
32+
```bash
33+
# using npm
34+
npm install @wix-pilot/core @wix-pilot/detox --save-dev
35+
36+
# or using yarn
37+
yarn add @wix-pilot/core @wix-pilot/detox --dev
38+
```
39+
2840
## Methods
2941

3042
- [`pilot.init()`](#pilotinitprompthandler-detox)
3143
- [`pilot.perform()`](#pilotperformsteps)
3244
- [`pilot.autopilot()`](#pilotautopilotgoal)
45+
- [`pilot.extendAPICatalog()`](#pilotextendapicatalog)
3346

3447
## `pilot.init(promptHandler, detox)`
3548

@@ -48,7 +61,7 @@ const OpenAIPromptHandler = require('./OpenAIPromptHandler');
4861

4962
beforeAll(() => {
5063
const promptHandler = new OpenAIPromptHandler('YOUR_OPENAI_API_KEY');
51-
pilot.init(promptHandler, detox);
64+
pilot.init(promptHandler);
5265
});
5366
```
5467

@@ -91,6 +104,27 @@ Automatically generates a series of steps to achieve the given goal.
91104
await pilot.autoPilot('Log in and navigate to the profile page');
92105
```
93106

107+
## `pilot.extendAPICatalog()`
108+
109+
Extends the API catalog with custom testing operations.
110+
111+
**Example:**
112+
113+
```javascript
114+
pilot.extendAPICatalog([
115+
{
116+
title: 'Custom Actions',
117+
items: [
118+
{
119+
signature: 'customAction(arg1, arg2)',
120+
description: 'Performs a custom action with the given arguments.',
121+
example: 'customAction("value1", "value2")',
122+
},
123+
],
124+
},
125+
], customAction);
126+
```
127+
94128
## `PromptHandler` Interface
95129

96130
The `PromptHandler` interface defines how Pilot communicates with the LLM service.

0 commit comments

Comments
 (0)