@@ -25,11 +25,24 @@ Detox Pilot exposes a simple API that integrates seamlessly with your Detox test
25
25
26
26
For a more detailed guide on integrating Wix Pilot in your tests, refer to the \[ Detox Pilot Guide] .
27
27
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
+
28
40
## Methods
29
41
30
42
- [ ` pilot.init() ` ] ( #pilotinitprompthandler-detox )
31
43
- [ ` pilot.perform() ` ] ( #pilotperformsteps )
32
44
- [ ` pilot.autopilot() ` ] ( #pilotautopilotgoal )
45
+ - [ ` pilot.extendAPICatalog() ` ] ( #pilotextendapicatalog )
33
46
34
47
## ` pilot.init(promptHandler, detox) `
35
48
@@ -48,7 +61,7 @@ const OpenAIPromptHandler = require('./OpenAIPromptHandler');
48
61
49
62
beforeAll (() => {
50
63
const promptHandler = new OpenAIPromptHandler (' YOUR_OPENAI_API_KEY' );
51
- pilot .init (promptHandler, detox );
64
+ pilot .init (promptHandler);
52
65
});
53
66
```
54
67
@@ -91,6 +104,27 @@ Automatically generates a series of steps to achieve the given goal.
91
104
await pilot .autoPilot (' Log in and navigate to the profile page' );
92
105
```
93
106
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
+
94
128
## ` PromptHandler ` Interface
95
129
96
130
The ` PromptHandler ` interface defines how Pilot communicates with the LLM service.
0 commit comments