Skip to content

Commit 950b099

Browse files
sonic16xrocketraccoon
andauthored
fix(testplane-docs): fix docs for @testplane/testing-library
* feat(testplane-docs): fix docs for @testplane/testing-library * feat(testplane-docs): fix docs for @testplane/testing-library * feat(testplane-docs): fix docs for @testplane/testing-library * feat(testplane-docs): fix docs for @testplane/testing-library --------- Co-authored-by: rocketraccoon <[email protected]>
1 parent a4b2036 commit 950b099

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

docs/guides/how-to-add-testing-library.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ export default {
2929
};
3030
```
3131

32+
If you have problems with types, add types obviously to `tsconfig.json`
33+
34+
```json
35+
{
36+
"compilerOptions": {
37+
"types": ["testplane", "@testplane/testing-library"]
38+
}
39+
}
40+
```
41+
3242
## Usage
3343

3444
After configuring, you will be able to use the search by selectors from `testing-library`, as described in the [official documentation](https://testing-library.com/docs/queries/about/). For example, searching for an element by its text:

i18n/ru/docusaurus-plugin-content-docs/current/guides/how-to-add-testing-library.mdx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ npm i -D @testplane/testing-library
1616

1717
2. Подключите реализацию в конфиге testplane в секции `prepareBrowser`
1818

19-
```javascript
20-
// .testplane.conf.js
21-
const { setupBrowser } = require("@testplane/testing-library");
19+
```typescript
20+
// testplane.config.ts
21+
import { setupBrowser } from "@testplane/testing-library";
2222

23-
module.exports = {
23+
export default {
2424
prepareBrowser(browser) {
2525
setupBrowser(browser);
2626
},
@@ -29,6 +29,16 @@ module.exports = {
2929
};
3030
```
3131

32+
Если у вас возникнут проблемы с типами, то добавьте типы явно в `tsconfig.json`
33+
34+
```json
35+
{
36+
"compilerOptions": {
37+
"types": ["testplane", "@testplane/testing-library"]
38+
}
39+
}
40+
```
41+
3242
## Использование
3343

3444
После подключения вы сможете использовать в тестах поиск по селекторам из `testing-library`, описанные в [официальной документации](https://testing-library.com/docs/queries/about/). Например, поиск элемента по его тексту

0 commit comments

Comments
 (0)