Skip to content

Commit ccec354

Browse files
committed
DOC: Autogenerate and update documentation
1 parent 5967783 commit ccec354

18 files changed

+1928
-1913
lines changed

docs/helpers/AI.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Use it only in development mode. It is recommended to run it only inside pause()
2222

2323
This helper should be configured in codecept.conf.{js|ts}
2424

25-
- `chunkSize`: - The maximum number of characters to send to the AI API at once. We split HTML fragments by 8000 chars to not exceed token limit. Increase this value if you use GPT-4.
25+
* `chunkSize`: - The maximum number of characters to send to the AI API at once. We split HTML fragments by 8000 chars to not exceed token limit. Increase this value if you use GPT-4.
2626

2727
### Parameters
2828

29-
- `config`
29+
* `config`  
3030

3131
### askForPageObject
3232

@@ -50,21 +50,21 @@ Asks for a page object based on the provided page name, locator, and extra promp
5050

5151
#### Parameters
5252

53-
- `pageName` **[string][1]** The name of the page to retrieve the object for.
54-
- `extraPrompt` **([string][1] | null)** An optional extra prompt for additional context or information.
55-
- `locator` **([string][1] | null)** An optional locator to find a specific element on the page.
53+
* `pageName` **[string][1]** The name of the page to retrieve the object for.
54+
* `extraPrompt` **([string][1] | null)** An optional extra prompt for additional context or information.
55+
* `locator` **([string][1] | null)** An optional locator to find a specific element on the page.
5656

57-
Returns **[Promise][2]<[Object][3]>** A promise that resolves to the requested page object.
57+
Returns **[Promise][2]<[Object][3]>** A promise that resolves to the requested page object.
5858

5959
### askGptGeneralPrompt
6060

6161
Send a general request to AI and return response.
6262

6363
#### Parameters
6464

65-
- `prompt` **[string][1]**
65+
* `prompt` **[string][1]**&#x20;
6666

67-
Returns **[Promise][2]&lt;[string][1]>** A Promise that resolves to the generated response from the GPT model.
67+
Returns **[Promise][2]<[string][1]>** A Promise that resolves to the generated response from the GPT model.
6868

6969
### askGptOnPage
7070

@@ -76,9 +76,9 @@ I.askGptOnPage('what does this page do?');
7676

7777
#### Parameters
7878

79-
- `prompt` **[string][1]** The question or prompt to ask the GPT model.
79+
* `prompt` **[string][1]** The question or prompt to ask the GPT model.
8080

81-
Returns **[Promise][2]&lt;[string][1]>** A Promise that resolves to the generated responses from the GPT model, joined by newlines.
81+
Returns **[Promise][2]<[string][1]>** A Promise that resolves to the generated responses from the GPT model, joined by newlines.
8282

8383
### askGptOnPageFragment
8484

@@ -90,10 +90,10 @@ I.askGptOnPageFragment('describe features of this screen', '.screen');
9090

9191
#### Parameters
9292

93-
- `prompt` **[string][1]** The question or prompt to ask the GPT-3.5 model.
94-
- `locator` **[string][1]** The locator or selector used to identify the HTML fragment on the page.
93+
* `prompt` **[string][1]** The question or prompt to ask the GPT-3.5 model.
94+
* `locator` **[string][1]** The locator or selector used to identify the HTML fragment on the page.
9595

96-
Returns **[Promise][2]&lt;[string][1]>** A Promise that resolves to the generated response from the GPT model.
96+
Returns **[Promise][2]<[string][1]>** A Promise that resolves to the generated response from the GPT model.
9797

9898
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
9999

docs/helpers/ApiDataFactory.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ Then configure ApiDataHelper to match factories and REST API:
7171

7272
ApiDataFactory has following config options:
7373

74-
- `endpoint`: base URL for the API to send requests to.
75-
- `cleanup` (default: true): should inserted records be deleted up after tests
76-
- `factories`: list of defined factories
77-
- `returnId` (default: false): return id instead of a complete response when creating items.
78-
- `headers`: list of headers
79-
- `REST`: configuration for REST requests
74+
* `endpoint`: base URL for the API to send requests to.
75+
* `cleanup` (default: true): should inserted records be deleted up after tests
76+
* `factories`: list of defined factories
77+
* `returnId` (default: false): return id instead of a complete response when creating items.
78+
* `headers`: list of headers
79+
* `REST`: configuration for REST requests
8080

8181
See the example:
8282

@@ -121,25 +121,26 @@ For instance, to set timeout you should add:
121121

122122
By default to create a record ApiDataFactory will use endpoint and plural factory name:
123123

124-
- create: `POST {endpoint}/{resource} data`
125-
- delete: `DELETE {endpoint}/{resource}/id`
124+
* create: `POST {endpoint}/{resource} data`
125+
* delete: `DELETE {endpoint}/{resource}/id`
126126

127127
Example (`endpoint`: `http://app.com/api`):
128128

129-
- create: POST request to `http://app.com/api/users`
130-
- delete: DELETE request to `http://app.com/api/users/1`
129+
* create: POST request to `http://app.com/api/users`
130+
* delete: DELETE request to `http://app.com/api/users/1`
131131

132132
This behavior can be configured with following options:
133133

134-
- `uri`: set different resource uri. Example: `uri: account` => `http://app.com/api/account`.
135-
- `create`: override create options. Expected format: `{ method: uri }`. Example: `{ "post": "/users/create" }`
136-
- `delete`: override delete options. Expected format: `{ method: uri }`. Example: `{ "post": "/users/delete/{id}" }`
134+
* `uri`: set different resource uri. Example: `uri: account` => `http://app.com/api/account`.
135+
* `create`: override create options. Expected format: `{ method: uri }`. Example: `{ "post": "/users/create" }`
136+
* `delete`: override delete options. Expected format: `{ method: uri }`. Example: `{ "post": "/users/delete/{id}" }`
137137

138138
Requests can also be overridden with a function which returns [axois request config][4].
139139

140140
```js
141141
create: (data) => ({ method: 'post', url: '/posts', data }),
142142
delete: (id) => ({ method: 'delete', url: '/posts', data: { id } })
143+
143144
```
144145

145146
Requests can be updated on the fly by using `onRequest` function. For instance, you can pass in current session from a cookie.
@@ -189,7 +190,7 @@ By default `id` property of response is taken. This behavior can be changed by s
189190

190191
### Parameters
191192

192-
- `config`
193+
* `config` &#x20;
193194

194195
### _requestCreate
195196

@@ -198,8 +199,8 @@ Can be replaced from a in custom helper.
198199

199200
#### Parameters
200201

201-
- `factory` **any**
202-
- `data` **any**
202+
* `factory` **any**&#x20;
203+
* `data` **any**&#x20;
203204

204205
### _requestDelete
205206

@@ -208,8 +209,8 @@ Can be replaced from a custom helper.
208209

209210
#### Parameters
210211

211-
- `factory` **any**
212-
- `id` **any**
212+
* `factory` **any**&#x20;
213+
* `id` **any**&#x20;
213214

214215
### have
215216

@@ -227,11 +228,11 @@ I.have('user', { }, { age: 33, height: 55 })
227228

228229
#### Parameters
229230

230-
- `factory` **any** factory to use
231-
- `params` **any?** predefined parameters
232-
- `options` **any?** options for programmatically generate the attributes
231+
* `factory` **any** factory to use
232+
* `params` **any?** predefined parameters
233+
* `options` **any?** options for programmatically generate the attributes
233234

234-
Returns **[Promise][5]&lt;any>**
235+
Returns **[Promise][5]<any>**&#x20;
235236

236237
### haveMultiple
237238

@@ -250,10 +251,10 @@ I.haveMultiple('post', 3, { author: 'davert' }, { publish_date: '01.01.1997' });
250251

251252
#### Parameters
252253

253-
- `factory` **any**
254-
- `times` **any**
255-
- `params` **any?**
256-
- `options` **any?**
254+
* `factory` **any**&#x20;
255+
* `times` **any**&#x20;
256+
* `params` **any?**&#x20;
257+
* `options` **any?**&#x20;
257258

258259
[1]: https://github.com/rosiejs/rosie
259260

0 commit comments

Comments
 (0)