Skip to content

Commit 4054e6a

Browse files
author
rocketraccoon
committed
docs: review fixes
1 parent 8774bbe commit 4054e6a

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

docs/command-line/index.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Admonition from "@theme/Admonition";
2+
import Version from "../_partials/specs/version.mdx";
23

34
# CLI {#cli}
45

@@ -21,7 +22,7 @@ Main command to run tests.
2122
-s, --set <set> run tests only in the specified set
2223
-r, --require <module> require module
2324
--grep <grep> run only tests matching the pattern
24-
--tag <tag> run only tests matching the pattern
25+
--tag <tag> run only tests with specified tags
2526
--reporter <name> test reporters
2627
--update-refs update screenshot references or gather them if they do not exist ("assertView" command)
2728
--inspect [inspect] nodejs inspector on [=[host:]port]
@@ -139,18 +140,20 @@ testplane --grep "test with nested path"
139140
140141
#### Tag {#testplane-tag}
141142
143+
<Version version="8.37.0" />
144+
142145
Run only tests, which matches the tag pattern.
143146
144147
##### Example {#testplane-tag-example}
145148
146-
You can assign tags to a test using the `{tag: string | string[]}` parameter.
149+
You can assign tags to a test using the second parameter of `describe` ot `it` (see example below).
147150
You can also add tags dynamically during test execution with the [addTag][add-tag] command,
148-
but tests tagged this way cannot be filtered at launch.
151+
but you can not use dynamic tags to filter tests at launch.
149152
150153
```ts
151154
describe("test", {tag: "all"}, () => {
152155
describe("with", {tag: "desktop"}, () => {
153-
describe("nested path", {tag: "smoke"}, () => {
156+
describe("nested path", {tag: ["smoke", "slow"]}, () => {
154157
await browser.addTag("some");
155158
...
156159
});

docs/commands/browser/addTag.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ await browser.addTag("one");
1515
await browser.addTag(["first", "second"]);
1616
```
1717

18-
Also, the tag object now has the following methods: to add a tag, get a list of tags, and check if a tag exists.
18+
Also, the test object now has methods to add a tag, get a list of tags, and check if a tag exists.
1919
You can use it in your plugin where you have access to test objects.
2020

2121
```typescript
@@ -46,7 +46,7 @@ Each object has a `title` and a `dynamic` field, which indicates that the tag wa
4646
<tr>
4747
<td>tag</td>
4848
<td>`string | string[]`</td>
49-
<td>Required parameter. A single tag string or an array of tag strings to add.</td>
49+
<td>Required parameter. Name of tag or tags.</td>
5050
</tr>
5151
</tbody>
5252
</table>

i18n/ru/docusaurus-plugin-content-docs/current/command-line/index.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Admonition from "@theme/Admonition";
2+
import Version from "../_partials/specs/version.mdx";
23

34
# CLI {#cli}
45

@@ -21,7 +22,7 @@ import Admonition from "@theme/Admonition";
2122
-s, --set <set> run tests only in the specified set
2223
-r, --require <module> require module
2324
--grep <grep> run only tests matching the pattern
24-
--tag <tag> run only tests matching the pattern
25+
--tag <tag> run only tests with specified tags
2526
--reporter <name> test reporters
2627
--update-refs update screenshot references or gather them if they do not exist ("assertView" command)
2728
--inspect [inspect] nodejs inspector on [=[host:]port]
@@ -139,18 +140,20 @@ testplane --grep "test with nested path"
139140
140141
#### Tag {#testplane-tag}
141142
142-
Запуск только тестов соответствующих паттерну:
143+
<Version version="8.37.0" />
144+
145+
Запуск только тестов, соответствующих паттерну.
143146
144147
##### Example {#testplane-tag-example}
145148
146-
Вы можете назначить теги тесту с помощью параметра `{tag: string | string[]}`.
147-
Также вы можете добавлять теги динамически во время выполнения теста с помощью команды [assertTag][add-tag],
148-
однако тесты, помеченные таким образом, нельзя отфильтровать при запуске.
149+
Вы можете назначить теги тесту с помощью второго параметре `describe` или `it` (пример ниже).
150+
Также вы можете добавлять теги динамически во время выполнения теста с помощью команды [addTag][add-tag],
151+
но вы не можете использовать динамически добавленные теги для фильтрации тестов при запуске.
149152
150153
```ts
151154
describe("test", {tag: "all"}, () => {
152155
describe("with", {tag: "desktop"}, () => {
153-
describe("nested path", {tag: "smoke"}, () => {
156+
describe("nested path", {tag: ["smoke", "slow"]}, () => {
154157
await browser.addTag("some");
155158
...
156159
});

i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/addTag.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ await browser.addTag("one");
1515
await browser.addTag(["first", "second"]);
1616
```
1717

18-
Также, объект тега теперь имеет следующие методы: для добавления тега, получения списка тегов и проверки существования тега.
18+
Также, объект теста теперь имеет методы для добавления тега, получения списка тегов и проверки существования тега.
1919
Вы можете использовать это в своём плагине где у вас есть доступ к объектам тестов.
2020

2121
```typescript
@@ -46,7 +46,7 @@ function getTag(): TestTag[];
4646
<tr>
4747
<td>tag</td>
4848
<td>`string | string[]`</td>
49-
<td>Обязательный параметр. Одна строка или массив строк.</td>
49+
<td>Обязательный параметр. Название тега или тегов.</td>
5050
</tr>
5151
</tbody>
5252
</table>

0 commit comments

Comments
 (0)