Skip to content

Commit 73245fe

Browse files
committed
Update inline JSON example in tests documentation
- Replace JSON code block with JsonYamlTabs component for better integration - Simplify JSON structure by removing quotes around keys
1 parent 0f0685c commit 73245fe

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

docs/get-started/tests/index.mdx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,34 +63,32 @@ Test specs in standalone JSON or YAML files use the following basic structure:
6363
6464
Here's an example test for performing a Google search and saving a screenshot of the results:
6565

66-
```json
67-
{
68-
"tests": [
66+
<JsonYamlTabs object={{
67+
tests: [
6968
{
70-
"steps": [
69+
steps: [
7170
{
72-
"goTo": "https://www.google.com"
71+
goTo: "https://www.google.com"
7372
},
7473
{
75-
"find": {
76-
"selector": "[title=Search]",
77-
"click": true
74+
find: {
75+
selector: "[title=Search]",
76+
click: true
7877
}
7978
},
8079
{
81-
"type": ["American Shorthair kittens", "$ENTER$"]
80+
type: ["American Shorthair kittens", "$ENTER$"]
8281
},
8382
{
84-
"wait": 5000
83+
wait: 5000
8584
},
8685
{
87-
"screenshot": "search-results.png"
86+
screenshot: "search-results.png"
8887
}
8988
]
9089
}
9190
]
92-
}
93-
```
91+
}}></JsonYamlTabs>
9492

9593
### Inline JSON or YAML
9694

0 commit comments

Comments
 (0)