Skip to content

Commit 58ee073

Browse files
Merge pull request #129 from gemini-testing/TESTPLANE-1002
docs(selectivity): add 'reason' to 'mapDependencyRelativePath' function
2 parents 26433d4 + 1d82bdd commit 58ee073

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/reference/config/browsers.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,12 @@ The section has the following parameters:
10751075
</tr>
10761076
<tr>
10771077
<td>`mapDependencyRelativePath`</td>
1078-
<td>`null | (dependency: { scope: "browser" | "testplane", relativePath: string }) => string | boolean | void`</td>
1078+
<td>`null | (dependency: { scope: "browser" | "testplane", reason: "browser-css-import" | "browser-js-coverage" | "testplane-js-import" | "testplane-assert-view-reference", relativePath: string }) => string | boolean | void`</td>
10791079
<td>`null`</td>
10801080
<td>
1081-
Callback, which accepts test dependency path in POSIX style and maps it to another path.
1081+
Callback, which accepts test dependency info and maps its path to another path.
1082+
The dependency object contains `scope` (`"browser"` or `"testplane"`), `relativePath` in POSIX style, and `reason`
1083+
one of `"browser-css-import"`, `"browser-js-coverage"`, `"testplane-js-import"`, or `"testplane-assert-view-reference"`, indicating how the dependency was collected.
10821084
Return a mapped `string` path to remap, `true` to keep the original path unchanged,
10831085
or a falsy value (`false`, `undefined`, `void`) to filter the dependency out completely.
10841086
</td>

i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,12 @@ export = {
10781078
</tr>
10791079
<tr>
10801080
<td>`mapDependencyRelativePath`</td>
1081-
<td>`null | (dependency: { scope: "browser" | "testplane", relativePath: string }) => string | boolean | void`</td>
1081+
<td>`null | (dependency: { scope: "browser" | "testplane", reason: "browser-css-import" | "browser-js-coverage" | "testplane-js-import" | "testplane-assert-view-reference", relativePath: string }) => string | boolean | void`</td>
10821082
<td>`null`</td>
10831083
<td>
1084-
Коллбэк, который принимает путь зависимости теста в стиле POSIX и преобразует его в другой путь.
1084+
Коллбэк, который принимает информацию о зависимости теста и преобразует её путь в другой.
1085+
Объект зависимости содержит `scope` (`"browser"` или `"testplane"`), `relativePath` в стиле POSIX и `reason`
1086+
одно из значений: `"browser-css-import"`, `"browser-js-coverage"`, `"testplane-js-import"` или `"testplane-assert-view-reference"`, указывающее на способ сбора зависимости.
10851087
Верните строку `string` для переназначения пути, `true` для сохранения исходного пути без изменений,
10861088
или falsy-значение (`false`, `undefined`, `void`) для полного исключения зависимости.
10871089
</td>

0 commit comments

Comments
 (0)