doc-detective 2.16.0-dev.0 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,127 +1,127 @@
1
- # <img src="https://github.com/doc-detective/doc-detective/blob/main/icon.png" width=50 style="vertical-align:middle;margin-bottom:7px"/> Doc Detective: The Documentation Testing Framework
2
-
3
- ![Current version](https://img.shields.io/github/package-json/v/doc-detective/doc-detective?color=orange)
4
- [![NPM Shield](https://img.shields.io/npm/v/doc-detective)](https://www.npmjs.com/package/doc-detective)
5
- [![Discord Shield](https://img.shields.io/badge/chat-on%20discord-purple)](https://discord.gg/2M7wXEThfF)
6
- [![Docs Shield](https://img.shields.io/badge/docs-doc--detective.com-blue)](https://doc-detective.com)
7
-
8
- Doc Detective is doc content testing framework that makes it easy to keep your docs accurate and up-to-date. You write tests, and Doc Detective runs them directly against your product to make sure your docs match your user experience. Whether it’s a UI-based process or a series of API calls, Doc Detective can help you find doc bugs before your users do.
9
-
10
- Doc Detective ingests test specifications and text files, parses them for testable actions, then executes those actions in a browser. The results (PASS/FAIL and context) are output as a JSON object so that other pieces of infrastructure can parse and manipulate them as needed.
11
-
12
- This project handles test parsing and web-based UI testing---it doesn't support results reporting or notifications. This framework is a part of testing infrastructures and needs to be complemented by other components.
13
-
14
- ## Components
15
-
16
- Doc Detective has multiple components to integrate with your workflows as you need it to:
17
-
18
- - Doc Detective (this repo): A standalone tool that enables testing without a separate Node project.
19
- - [Doc Detective Core](https://github.com/doc-detective/doc-detective-core): An NPM package that provides the testing functionality.
20
- - [Doc Detective Docs](https://github.com/doc-detective/doc-detective.github.io): Source files for [doc-detective.com](https://doc-detective.com).
21
-
22
- ## Install
23
-
24
- 1. Install prerequisites:
25
-
26
- - [Node.js](https://nodejs.org/) (tested on v18 and v20)
27
-
28
- 1. In a terminal, install Doc Detective globally:
29
-
30
- ```bash
31
- npm i -g doc-detective
32
- ```
33
-
34
- If you don't install Doc Detective globally, you'll be prompted to install the first time you run an `npx` command.
35
-
36
- ## (Optional) Get sample files
37
-
38
- To test a few samples, clone the repo and navigate to the `samples` directory:
39
-
40
- ```bash
41
- git clone https://github.com/doc-detective/doc-detective.git
42
- cd doc-detective/samples
43
- ```
44
-
45
- ## Run tests
46
-
47
- To run your tests, use the `runTests` command:
48
-
49
- ```bash
50
- npx doc-detective runTests
51
- ```
52
-
53
- By default, Doc Detective scans the current directory for valid tests, but you can specify your test file with the `--input` argument. For example, to run tests in a file named `doc-content-inline-tests.md`, run the following command:
54
-
55
- ```bash
56
- npx doc-detective runTests --input doc-content-inline-tests.md
57
- ```
58
-
59
- To customize your test, file type, and directory options, create a `.doc-detective.json` [config](https://doc-detective.com/reference/schemas/config.html) file. If a `.doc-detective.json` file exists in the directory when you run the comment, Doc Detective loads the config. Otherwise, you can specify a config path with the `--config` argument.
60
-
61
- ```bash
62
- npx doc-detective runTests --config .doc-detective.json
63
- ```
64
-
65
- **Note**: All paths are relative to the current working directory, regardless where the config file is located.
66
-
67
- You can override config options with command-line arguments. For example, to run tests in a file named `tests.spec.json`, even if that isn't included in your config, run the following command:
68
-
69
- ```bash
70
- npx doc-detective runTests --config .doc-detective.json --input tests.spec.json
71
- ```
72
-
73
- ## Check your test coverage
74
-
75
- You can check the test coverage of your documentation source files with the `runCoverage` command, specifying the source file or directory of source files with the `--input` argument. Doc Detective identifies potential areas of test coverage with file-format-specific regex, and supports CommonMark syntax natively. If you want to test coverage of a file with different syntax, update your the `fileTypes` object of your [config](https://doc-detective.com/reference/schemas/config.html) file accordingly.
76
-
77
- ```bash
78
- npx doc-detective runCoverage --config .doc-detective.json --input doc-content.md
79
- ```
80
-
81
- ## Concepts
82
-
83
- - [**Test specification**](https://doc-detective.com/reference/schemas/specification.html): A group of tests to run in one or more contexts. Conceptually parallel to a document.
84
- - [**Test**](https://doc-detective.com/reference/schemas/test.html): A sequence of steps to perform. Conceptually parallel to a procedure.
85
- - **Step**: A portion of a test that includes a single action. Conceptually parallel to a step in a procedure.
86
- - **Action**: The task a performed in a step. Doc Detective supports a variety of actions:
87
- - [**checkLink**](https://doc-detective.com/reference/schemas/checkLink.html): Check if a URL returns an acceptable status code from a GET request.
88
- - [**find**](https://doc-detective.com/reference/schemas/find.html): Check if an element exists with the specified selector.
89
- - [**goTo**](https://doc-detective.com/reference/schemas/goTo.html): Navigate to a specified URL.
90
- - [**httpRequest**](https://doc-detective.com/reference/schemas/httpRequest.html): Perform a generic HTTP request, for example to an API.
91
- - [**runShell**](https://doc-detective.com/reference/schemas/runShell.html): Perform a native shell command.
92
- - [**saveScreenshot**](https://doc-detective.com/reference/schemas/saveScreenshot.html): Take a screenshot in PNG format.
93
- - [**setVariables**](https://doc-detective.com/reference/schemas/setVariables.html): Load environment variables from a `.env` file.
94
- - [**startRecording**](https://doc-detective.com/reference/schemas/startRecording.html) and [**stopRecording**](https://doc-detective.com/reference/schemas/stopRecording.html): Capture a video of test execution.
95
- - [**typeKeys**](https://doc-detective.com/reference/schemas/typeKeys.html): Type keys. To type special keys, begin and end the string with `$` and use the special key’s enum. For example, to type the Escape key, enter `$ESCAPE$`.
96
- - [**wait**](https://doc-detective.com/reference/schemas/wait.html): Pause before performing the next action.
97
- - [**Context**](https://doc-detective.com/reference/schemas/context.html): An application and platforms that support the tests.
98
-
99
- ## Roadmap
100
-
101
- Future updates may include support for the following items:
102
-
103
- - Apps: iOS Safari, Android Chrome, native Windows, native macOS, native Linux
104
- - Platforms: iOS, Android
105
- - Commands: `suggestTests` stable release
106
-
107
- ## Develop
108
-
109
- To develop Doc Detective, clone the repo and install dependencies:
110
-
111
- ```bash
112
- git clone https://github.com/doc-detective/doc-detective.git
113
- cd doc-detective
114
- npm i
115
- ```
116
-
117
- To run commands, use the same `npx` commands as above.
118
-
119
- Make sure you review the [contributions guide](CONTRIBUTIONS.md) before submitting a pull request.
120
-
121
- ## Contributions
122
-
123
- Looking to help out? See our [contributions guide](CONTRIBUTIONS.md) for more info. If you can't contribute code, you can still help by reporting issues, suggesting new features, improving the documentation, or sponsoring the project.
124
-
125
- ## License
126
-
127
- This project uses the [MIT license](https://github.com/doc-detective/doc-detective/blob/master/LICENSE).
1
+ # <img src="https://github.com/doc-detective/doc-detective/blob/main/icon.png" width=50 style="vertical-align:middle;margin-bottom:7px"/> Doc Detective: The Documentation Testing Framework
2
+
3
+ ![Current version](https://img.shields.io/github/package-json/v/doc-detective/doc-detective?color=orange)
4
+ [![NPM Shield](https://img.shields.io/npm/v/doc-detective)](https://www.npmjs.com/package/doc-detective)
5
+ [![Discord Shield](https://img.shields.io/badge/chat-on%20discord-purple)](https://discord.gg/2M7wXEThfF)
6
+ [![Docs Shield](https://img.shields.io/badge/docs-doc--detective.com-blue)](https://doc-detective.com)
7
+
8
+ Doc Detective is doc content testing framework that makes it easy to keep your docs accurate and up-to-date. You write tests, and Doc Detective runs them directly against your product to make sure your docs match your user experience. Whether it’s a UI-based process or a series of API calls, Doc Detective can help you find doc bugs before your users do.
9
+
10
+ Doc Detective ingests test specifications and text files, parses them for testable actions, then executes those actions in a browser. The results (PASS/FAIL and context) are output as a JSON object so that other pieces of infrastructure can parse and manipulate them as needed.
11
+
12
+ This project handles test parsing and web-based UI testing---it doesn't support results reporting or notifications. This framework is a part of testing infrastructures and needs to be complemented by other components.
13
+
14
+ ## Components
15
+
16
+ Doc Detective has multiple components to integrate with your workflows as you need it to:
17
+
18
+ - Doc Detective (this repo): A standalone tool that enables testing without a separate Node project.
19
+ - [Doc Detective Core](https://github.com/doc-detective/doc-detective-core): An NPM package that provides the testing functionality.
20
+ - [Doc Detective Docs](https://github.com/doc-detective/doc-detective.github.io): Source files for [doc-detective.com](https://doc-detective.com).
21
+
22
+ ## Install
23
+
24
+ 1. Install prerequisites:
25
+
26
+ - [Node.js](https://nodejs.org/) (tested on v18 and v20)
27
+
28
+ 1. In a terminal, install Doc Detective globally:
29
+
30
+ ```bash
31
+ npm i -g doc-detective
32
+ ```
33
+
34
+ If you don't install Doc Detective globally, you'll be prompted to install the first time you run an `npx` command.
35
+
36
+ ## (Optional) Get sample files
37
+
38
+ To test a few samples, clone the repo and navigate to the `samples` directory:
39
+
40
+ ```bash
41
+ git clone https://github.com/doc-detective/doc-detective.git
42
+ cd doc-detective/samples
43
+ ```
44
+
45
+ ## Run tests
46
+
47
+ To run your tests, use the `runTests` command:
48
+
49
+ ```bash
50
+ npx doc-detective runTests
51
+ ```
52
+
53
+ By default, Doc Detective scans the current directory for valid tests, but you can specify your test file with the `--input` argument. For example, to run tests in a file named `doc-content-inline-tests.md`, run the following command:
54
+
55
+ ```bash
56
+ npx doc-detective runTests --input doc-content-inline-tests.md
57
+ ```
58
+
59
+ To customize your test, file type, and directory options, create a `.doc-detective.json` [config](https://doc-detective.com/reference/schemas/config.html) file. If a `.doc-detective.json` file exists in the directory when you run the comment, Doc Detective loads the config. Otherwise, you can specify a config path with the `--config` argument.
60
+
61
+ ```bash
62
+ npx doc-detective runTests --config .doc-detective.json
63
+ ```
64
+
65
+ **Note**: All paths are relative to the current working directory, regardless where the config file is located.
66
+
67
+ You can override config options with command-line arguments. For example, to run tests in a file named `tests.spec.json`, even if that isn't included in your config, run the following command:
68
+
69
+ ```bash
70
+ npx doc-detective runTests --config .doc-detective.json --input tests.spec.json
71
+ ```
72
+
73
+ ## Check your test coverage
74
+
75
+ You can check the test coverage of your documentation source files with the `runCoverage` command, specifying the source file or directory of source files with the `--input` argument. Doc Detective identifies potential areas of test coverage with file-format-specific regex, and supports CommonMark syntax natively. If you want to test coverage of a file with different syntax, update your the `fileTypes` object of your [config](https://doc-detective.com/reference/schemas/config.html) file accordingly.
76
+
77
+ ```bash
78
+ npx doc-detective runCoverage --config .doc-detective.json --input doc-content.md
79
+ ```
80
+
81
+ ## Concepts
82
+
83
+ - [**Test specification**](https://doc-detective.com/reference/schemas/specification.html): A group of tests to run in one or more contexts. Conceptually parallel to a document.
84
+ - [**Test**](https://doc-detective.com/reference/schemas/test.html): A sequence of steps to perform. Conceptually parallel to a procedure.
85
+ - **Step**: A portion of a test that includes a single action. Conceptually parallel to a step in a procedure.
86
+ - **Action**: The task a performed in a step. Doc Detective supports a variety of actions:
87
+ - [**checkLink**](https://doc-detective.com/reference/schemas/checkLink.html): Check if a URL returns an acceptable status code from a GET request.
88
+ - [**find**](https://doc-detective.com/reference/schemas/find.html): Check if an element exists with the specified selector.
89
+ - [**goTo**](https://doc-detective.com/reference/schemas/goTo.html): Navigate to a specified URL.
90
+ - [**httpRequest**](https://doc-detective.com/reference/schemas/httpRequest.html): Perform a generic HTTP request, for example to an API.
91
+ - [**runShell**](https://doc-detective.com/reference/schemas/runShell.html): Perform a native shell command.
92
+ - [**saveScreenshot**](https://doc-detective.com/reference/schemas/saveScreenshot.html): Take a screenshot in PNG format.
93
+ - [**setVariables**](https://doc-detective.com/reference/schemas/setVariables.html): Load environment variables from a `.env` file.
94
+ - [**startRecording**](https://doc-detective.com/reference/schemas/startRecording.html) and [**stopRecording**](https://doc-detective.com/reference/schemas/stopRecording.html): Capture a video of test execution.
95
+ - [**typeKeys**](https://doc-detective.com/reference/schemas/typeKeys.html): Type keys. To type special keys, begin and end the string with `$` and use the special key’s enum. For example, to type the Escape key, enter `$ESCAPE$`.
96
+ - [**wait**](https://doc-detective.com/reference/schemas/wait.html): Pause before performing the next action.
97
+ - [**Context**](https://doc-detective.com/reference/schemas/context.html): An application and platforms that support the tests.
98
+
99
+ ## Roadmap
100
+
101
+ Future updates may include support for the following items:
102
+
103
+ - Apps: iOS Safari, Android Chrome, native Windows, native macOS, native Linux
104
+ - Platforms: iOS, Android
105
+ - Commands: `suggestTests` stable release
106
+
107
+ ## Develop
108
+
109
+ To develop Doc Detective, clone the repo and install dependencies:
110
+
111
+ ```bash
112
+ git clone https://github.com/doc-detective/doc-detective.git
113
+ cd doc-detective
114
+ npm i
115
+ ```
116
+
117
+ To run commands, use the same `npx` commands as above.
118
+
119
+ Make sure you review the [contributions guide](CONTRIBUTIONS.md) before submitting a pull request.
120
+
121
+ ## Contributions
122
+
123
+ Looking to help out? See our [contributions guide](CONTRIBUTIONS.md) for more info. If you can't contribute code, you can still help by reporting issues, suggesting new features, improving the documentation, or sponsoring the project.
124
+
125
+ ## License
126
+
127
+ This project uses the [MIT license](https://github.com/doc-detective/doc-detective/blob/master/LICENSE).
package/dev/dev.spec.json CHANGED
@@ -1,62 +1,62 @@
1
- {
2
- "id": "Do all the things! - Spec",
3
- "tests": [
4
- {
5
- "id": "Do all the things! - Test",
6
- "description": "This test includes nearly every property across all actions.",
7
- "steps": [
8
- {
9
- "action": "setVariables",
10
- "path": ".env"
11
- },
12
- {
13
- "action": "runShell",
14
- "command": "echo",
15
- "args": ["$USER"]
16
- },
17
- {
18
- "action": "checkLink",
19
- "url": "https://www.duckduckgo.com"
20
- },
21
- {
22
- "action": "httpRequest",
23
- "url": "https://reqres.in/api/users",
24
- "method": "post",
25
- "requestData": {
26
- "name": "morpheus",
27
- "job": "leader"
28
- },
29
- "responseData": {
30
- "name": "morpheus",
31
- "job": "leader"
32
- },
33
- "statusCodes": [200, 201]
34
- },
35
- {
36
- "action": "goTo",
37
- "url": "https://www.google.com"
38
- },
39
- {
40
- "action": "startRecording",
41
- "path": "test.mp4"
42
- },
43
- {
44
- "action": "find",
45
- "selector": "[title=Search]",
46
- "timeout": 10000,
47
- "moveTo": true,
48
- "click": true,
49
- "typeKeys": {
50
- "keys": ["shorthair cat", "$ENTER$"]
51
- }
52
- },
53
- {
54
- "action": "wait"
55
- },
56
- {
57
- "action": "stopRecording"
58
- }
59
- ]
60
- }
61
- ]
62
- }
1
+ {
2
+ "id": "Do all the things! - Spec",
3
+ "tests": [
4
+ {
5
+ "id": "Do all the things! - Test",
6
+ "description": "This test includes nearly every property across all actions.",
7
+ "steps": [
8
+ {
9
+ "action": "setVariables",
10
+ "path": ".env"
11
+ },
12
+ {
13
+ "action": "runShell",
14
+ "command": "echo",
15
+ "args": ["$USER"]
16
+ },
17
+ {
18
+ "action": "checkLink",
19
+ "url": "https://www.duckduckgo.com"
20
+ },
21
+ {
22
+ "action": "httpRequest",
23
+ "url": "https://reqres.in/api/users",
24
+ "method": "post",
25
+ "requestData": {
26
+ "name": "morpheus",
27
+ "job": "leader"
28
+ },
29
+ "responseData": {
30
+ "name": "morpheus",
31
+ "job": "leader"
32
+ },
33
+ "statusCodes": [200, 201]
34
+ },
35
+ {
36
+ "action": "goTo",
37
+ "url": "https://www.google.com"
38
+ },
39
+ {
40
+ "action": "startRecording",
41
+ "path": "test.mp4"
42
+ },
43
+ {
44
+ "action": "find",
45
+ "selector": "[title=Search]",
46
+ "timeout": 10000,
47
+ "moveTo": true,
48
+ "click": true,
49
+ "typeKeys": {
50
+ "keys": ["shorthair cat", "$ENTER$"]
51
+ }
52
+ },
53
+ {
54
+ "action": "wait"
55
+ },
56
+ {
57
+ "action": "stopRecording"
58
+ }
59
+ ]
60
+ }
61
+ ]
62
+ }
package/dev/index.js CHANGED
@@ -1,6 +1,6 @@
1
- const { setArgs, setConfig } = require("../src/utils");
2
-
3
- // Test that arguments are parsed correctly
4
- json = {
5
- }
1
+ const { setArgs, setConfig } = require("../src/utils");
2
+
3
+ // Test that arguments are parsed correctly
4
+ json = {
5
+ }
6
6
  console.log(setConfig(json,setArgs(process.argv)))
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
- {
2
- "name": "doc-detective",
3
- "version": "2.16.0-dev.0",
4
- "description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
5
- "bin": {
6
- "doc-detective": "src/index.js"
7
- },
8
- "main": "./src/index.js",
9
- "scripts": {
10
- "mocha": "mocha",
11
- "test": "mocha test/*.test.js",
12
- "runTests": "node ./src/index.js runTests",
13
- "runCoverage": "node ./src/index.js runCoverage",
14
- "dev": "node ./dev"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/hawkeyexl/doc-detective.git"
19
- },
20
- "keywords": [
21
- "documentation",
22
- "unit",
23
- "test",
24
- "doc",
25
- "docs"
26
- ],
27
- "author": "Manny Silva",
28
- "license": "MIT",
29
- "bugs": {
30
- "url": "https://github.com/doc-detective/doc-detective/issues"
31
- },
32
- "homepage": "https://github.com/doc-detective/doc-detective#readme",
33
- "dependencies": {
34
- "@ffmpeg-installer/ffmpeg": "^1.1.0",
35
- "doc-detective-common": "^1.19.1-dev.0",
36
- "doc-detective-core": "^2.16.0-dev.0",
37
- "prompt-sync": "^4.2.0",
38
- "yargs": "^17.7.2"
39
- },
40
- "devDependencies": {
41
- "chai": "^5.1.1",
42
- "mocha": "^10.7.0"
43
- }
44
- }
1
+ {
2
+ "name": "doc-detective",
3
+ "version": "2.16.1",
4
+ "description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
5
+ "bin": {
6
+ "doc-detective": "src/index.js"
7
+ },
8
+ "main": "./src/index.js",
9
+ "scripts": {
10
+ "mocha": "mocha",
11
+ "test": "mocha test/*.test.js",
12
+ "runTests": "node ./src/index.js runTests",
13
+ "runCoverage": "node ./src/index.js runCoverage",
14
+ "dev": "node ./dev"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/hawkeyexl/doc-detective.git"
19
+ },
20
+ "keywords": [
21
+ "documentation",
22
+ "unit",
23
+ "test",
24
+ "doc",
25
+ "docs"
26
+ ],
27
+ "author": "Manny Silva",
28
+ "license": "MIT",
29
+ "bugs": {
30
+ "url": "https://github.com/doc-detective/doc-detective/issues"
31
+ },
32
+ "homepage": "https://github.com/doc-detective/doc-detective#readme",
33
+ "dependencies": {
34
+ "@ffmpeg-installer/ffmpeg": "^1.1.0",
35
+ "doc-detective-common": "^1.19.1",
36
+ "doc-detective-core": "^2.16.1",
37
+ "prompt-sync": "^4.2.0",
38
+ "yargs": "^17.7.2"
39
+ },
40
+ "devDependencies": {
41
+ "chai": "^5.1.1",
42
+ "mocha": "^10.7.0"
43
+ }
44
+ }
@@ -1,82 +1,82 @@
1
- {
2
- "envVariables": "./variables.env",
3
- "defaultCommand": "runTests",
4
- "input": ".",
5
- "output": ".",
6
- "recursive": true,
7
- "logLevel": "info",
8
- "runTests": {
9
- "detectSteps": true,
10
- "input": "./doc-content-inline-tests.md",
11
- "output": ".",
12
- "setup": "",
13
- "cleanup": "",
14
- "recursive": true,
15
- "mediaDirectory": ".",
16
- "downloadDirectory": ".",
17
- "contexts": [
18
- {
19
- "app": {
20
- "name": "chrome",
21
- "options": {
22
- "headless": false
23
- }
24
- },
25
- "platforms": ["windows", "mac", "linux"]
26
- }
27
- ]
28
- },
29
- "runCoverage": {
30
- "recursive": true,
31
- "input": ".",
32
- "output": ".",
33
- "markup": []
34
- },
35
- "fileTypes": [
36
- {
37
- "name": "Markdown",
38
- "extensions": [".md"],
39
- "testStartStatementOpen": "[comment]: # (test start",
40
- "testStartStatementClose": ")",
41
- "testIgnoreStatement": "[comment]: # (test ignore)",
42
- "testEndStatement": "[comment]: # (test end)",
43
- "stepStatementOpen": "[comment]: # (step",
44
- "stepStatementClose": ")",
45
- "markup": [
46
- {
47
- "name": "Hyperlink",
48
- "regex": ["(?<!!)\\[.+?\\]\\((.+?)\\)"],
49
- "actions": ["checkLink"]
50
- },
51
- {
52
- "name": "Navigation link",
53
- "regex": [
54
- "(?:[Cc]hose|[Oo]pen|[Cc]lick|[Nn]avigate to|[Gg]o to)\\s+(?<!!)\\[.+?\\]\\((.+?)\\)"
55
- ],
56
- "actions": ["goTo"]
57
- },
58
- {
59
- "name": "Onscreen text",
60
- "regex": ["\\*\\*(.+?)\\*\\*"],
61
- "actions": ["find"]
62
- },
63
- {
64
- "name": "Image",
65
- "regex": ["!\\[.+?\\]\\((.+?)\\)"],
66
- "actions": [
67
- {
68
- "action": "saveScreenshot",
69
- "maxVariation": 5,
70
- "overwrite": "byVariation"
71
- }
72
- ]
73
- }
74
- ]
75
- }
76
- ],
77
- "integrations": {},
78
- "telemetry": {
79
- "send": true,
80
- "userId": "Doc Detective Samples"
81
- }
82
- }
1
+ {
2
+ "envVariables": "./variables.env",
3
+ "defaultCommand": "runTests",
4
+ "input": ".",
5
+ "output": ".",
6
+ "recursive": true,
7
+ "logLevel": "info",
8
+ "runTests": {
9
+ "detectSteps": true,
10
+ "input": "./doc-content-inline-tests.md",
11
+ "output": ".",
12
+ "setup": "",
13
+ "cleanup": "",
14
+ "recursive": true,
15
+ "mediaDirectory": ".",
16
+ "downloadDirectory": ".",
17
+ "contexts": [
18
+ {
19
+ "app": {
20
+ "name": "chrome",
21
+ "options": {
22
+ "headless": false
23
+ }
24
+ },
25
+ "platforms": ["windows", "mac", "linux"]
26
+ }
27
+ ]
28
+ },
29
+ "runCoverage": {
30
+ "recursive": true,
31
+ "input": ".",
32
+ "output": ".",
33
+ "markup": []
34
+ },
35
+ "fileTypes": [
36
+ {
37
+ "name": "Markdown",
38
+ "extensions": [".md"],
39
+ "testStartStatementOpen": "[comment]: # (test start",
40
+ "testStartStatementClose": ")",
41
+ "testIgnoreStatement": "[comment]: # (test ignore)",
42
+ "testEndStatement": "[comment]: # (test end)",
43
+ "stepStatementOpen": "[comment]: # (step",
44
+ "stepStatementClose": ")",
45
+ "markup": [
46
+ {
47
+ "name": "Hyperlink",
48
+ "regex": ["(?<!!)\\[.+?\\]\\((.+?)\\)"],
49
+ "actions": ["checkLink"]
50
+ },
51
+ {
52
+ "name": "Navigation link",
53
+ "regex": [
54
+ "(?:[Cc]hose|[Oo]pen|[Cc]lick|[Nn]avigate to|[Gg]o to)\\s+(?<!!)\\[.+?\\]\\((.+?)\\)"
55
+ ],
56
+ "actions": ["goTo"]
57
+ },
58
+ {
59
+ "name": "Onscreen text",
60
+ "regex": ["\\*\\*(.+?)\\*\\*"],
61
+ "actions": ["find"]
62
+ },
63
+ {
64
+ "name": "Image",
65
+ "regex": ["!\\[.+?\\]\\((.+?)\\)"],
66
+ "actions": [
67
+ {
68
+ "action": "saveScreenshot",
69
+ "maxVariation": 5,
70
+ "overwrite": "byVariation"
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ ],
77
+ "integrations": {},
78
+ "telemetry": {
79
+ "send": true,
80
+ "userId": "Doc Detective Samples"
81
+ }
82
+ }