Skip to content

Commit 835aa82

Browse files
Sync documentation updates from Promptless agent
1 parent 71d7498 commit 835aa82

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/get-started/tests/index.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,24 @@ Doc Detective includes default markup patterns for Markdown and DITA files. Here
387387
"regex": ["\\b(?:[Pp]ress|[Ee]nter|[Tt]ype)\\b\\s+\"([^\"]+)\""],
388388
"actions": ["type"]
389389
},
390+
{
391+
"name": "httpRequestFormat",
392+
"regex": [
393+
"<codeblock[^>]*outputclass=\"http\"[^>]*>\\s*([A-Z]+)\\s+([^\\s]+)(?:\\s+HTTP\\/[\\d.]+)?\\s*(?:\\r?\\n|&#xA;)((?:[^\\s<]+:\\s+[^\\r\\n<]+(?:\\r?\\n|&#xA;))*)(?:\\s*(?:\\r?\\n|&#xA;)([\\s\\S]*?))?\\s*<\\/codeblock>"
394+
],
395+
"actions": [
396+
{
397+
"httpRequest": {
398+
"method": "$1",
399+
"url": "$2",
400+
"request": {
401+
"headers": "$3",
402+
"body": "$4"
403+
}
404+
}
405+
}
406+
]
407+
},
390408
{
391409
"name": "runCode",
392410
"regex": [
@@ -484,6 +502,11 @@ Doc Detective includes default markup patterns for Markdown and DITA files. Here
484502
- Pattern: `Type "Hello World"`, `Enter "username"`
485503
- Action: Types the specified text into the active element
486504

505+
**httpRequestFormat**: Detects HTTP request code blocks and executes the request.
506+
507+
- Pattern: `<codeblock outputclass="http">POST /api/users HTTP/1.1</codeblock>` with method, URL, headers, and optional body
508+
- Action: Executes the HTTP request with the specified parameters
509+
487510
**runCode**: Detects code blocks in supported languages and executes the code.
488511

489512
- Pattern: Code blocks with `bash`, `python`, `py`, `javascript`, or `js` outputclass (excluding those marked with `testIgnore`)

0 commit comments

Comments
 (0)