Skip to content

Commit d5c6316

Browse files
authored
docs: update docs structure (#111)
* docs: update docs structure * docs: update ru docs to match en docs restructuring * docs: remove obsolete and draft pages * docs: fix typo in testplane api ru article
1 parent 2b6b6d5 commit d5c6316

File tree

200 files changed

+3448
-2522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+3448
-2522
lines changed

blog/local-browsers.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import localBrowsersExampleUrl from "/video/blog/local-browsers/local-browsers-e
1212

1313
<!-- truncate -->
1414

15-
Раньше Testplane с протоколом автоматизации webdriver можно было запустить локально только с вручную запущенным [selenium-standalone](https://github.com/webdriverio/selenium-standalone). Теперь достаточно указать `gridUrl: "local"` в [Конфиге Testplane](/docs/v8/command-line) или запустить тесты с [CLI-опцией](/docs/v8/command-line) `--local`. В таком случае перед запуском тестов при необходимости будут загружены соответствующие браузеры и вебдрайверы к ним, которые также будут запущены для дальнейшего использования в этих тестах.
15+
Раньше Testplane с протоколом автоматизации webdriver можно было запустить локально только с вручную запущенным [selenium-standalone](https://github.com/webdriverio/selenium-standalone). Теперь достаточно указать `gridUrl: "local"` в [Конфиге Testplane](/docs/v8/reference/config/main) или запустить тесты с [CLI-опцией](/docs/v8/reference/cli) `--local`. В таком случае перед запуском тестов при необходимости будут загружены соответствующие браузеры и вебдрайверы к ним, которые также будут запущены для дальнейшего использования в этих тестах.
1616

17-
Загрузить браузеры и вебдрайверы к ним можно и отдельно, с помощью команды [install-deps](/docs/v8/command-line#install-deps).
17+
Загрузить браузеры и вебдрайверы к ним можно и отдельно, с помощью команды [install-deps](/docs/v8/reference/cli#install-deps).
1818

1919
Пример запуска тестов на локальном браузере с webdriver протоколом автоматизации:
2020

@@ -25,4 +25,4 @@ import localBrowsersExampleUrl from "/video/blog/local-browsers/local-browsers-e
2525

2626
### Как использовать?
2727

28-
Узнайте больше об этом в нашей документации [Как запустить Testplane в локальном браузере](/docs/v8/guides/local-browsers).
28+
Узнайте больше об этом в нашей документации [Как запустить Testplane в локальном браузере](/docs/v8/basic-guides/managing-browsers).

blog/storybook-testing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Also you can try it yourself in our [example project][example] on GitHub with cu
2626
[storybook]: https://storybook.js.org
2727
[testplane-storybook]: https://github.com/gemini-testing/testplane-storybook
2828
[play-function]: https://storybook.js.org/docs/writing-stories/play-function
29-
[vt-story]: ../../docs/v8/visual-testing/with-storybook
29+
[vt-story]: ../../docs/v8/basic-guides/visual-testing-with-storybook
3030
[example]: https://github.com/gemini-testing/testplane/tree/master/examples/storybook-autoscreenshots

blog/testplane-vs-playwright.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ Playwright же связывает обновления инструмента
171171
✅ Необходимо тестирование в широком спектре десктопных браузеров и мобильных устройств\
172172
✅ Требуется тестирование нативных приложений Android и iOS
173173

174-
[anti-aliasing-tolerance]: https://testplane.io/docs/v8/config/browsers/#antialiasing_tolerance
174+
[anti-aliasing-tolerance]: https://testplane.io/docs/v8/reference/config/browsers/#antialiasing_tolerance
175175
[looks-same]: https://github.com/gemini-testing/looks-same
176176
[looks-same-benchmarks]: https://github.com/gemini-testing/looks-same/blob/master/benchmark/results.md
177177
[mpt]: https://learn.microsoft.com/en-us/azure/playwright-testing/
178178
[report-visual-testing]: https://testplane.io/docs/v8/html-reporter/overview/#superb-visual-testing-capabilities
179179
[reporter]: https://testplane.io/docs/v8/html-reporter/overview/
180180
[storybook]: https://storybook.js.org
181-
[storybook-autotests]: https://testplane.io/docs/v8/visual-testing/with-storybook/
181+
[storybook-autotests]: https://testplane.io/docs/v8/basic-guides/visual-testing-with-storybook/
182182
[testplane-mcp]: https://testplane.io/ru/docs/v8/testplane-mcp/
183-
[tolerance]: https://testplane.io/docs/v8/config/browsers/#tolerance
183+
[tolerance]: https://testplane.io/docs/v8/reference/config/browsers/#tolerance
184184
[time-travel]: https://testplane.io/ru/docs/v8/guides/time-travel/

blog/time-travel-release.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ Time Travel записывает снапшоты DOM-дерева, что по
6565
Следите за новыми релизами в нашем блоге и в разделе [Release Notes на GitHub](https://github.com/gemini-testing/html-reporter/releases), а в случае обнаружения проблем приходите в [issue GitHub][gh-issues] мы вам обязательно поможем!
6666

6767
[gh-issues]: https://github.com/gemini-testing/testplane/issues
68-
[time-travel-guide]: https://testplane.io/ru/docs/v8/guides/time-travel/
68+
[time-travel-guide]: https://testplane.io/ru/docs/v8/basic-guides/time-travel/

blog/vscode-extension.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Admonition from "@theme/Admonition";
99
import runTestsFromSidebarVideoUrl from "/video/blog/vscode-extension/run-tests-from-sidebar.mp4";
1010
import runTestsFromEditorVideoUrl from "/video/blog/vscode-extension/run-tests-from-editor.mp4";
1111

12-
Для Testplane реализовали расширение для <a href="https://code.visualstudio.com/">VS Code</a>, с помощью которого можно настраивать Testplane с нуля, запускать тесты и удобно работать с <a href="/ru/docs/v8/command-line#testplane-repl">REPL режимом</a>.
12+
Для Testplane реализовали расширение для <a href="https://code.visualstudio.com/">VS Code</a>, с помощью которого можно настраивать Testplane с нуля, запускать тесты и удобно работать с <a href="/ru/docs/v8/reference/cli#testplane-repl">REPL режимом</a>.
1313

1414
<!-- truncate -->
1515

@@ -80,7 +80,7 @@ Install Testplane
8080

8181
#### С настройкой `REPL`
8282

83-
При клике в чекбокс `Enable REPL` и последующем запуске теста (в REPL режиме можно одновременно запустить только один тест) он будет запущен в специальном REPL режиме. Подробнее про этот режим можно прочитать <a href="/ru/docs/v8/command-line#testplane-repl">здесь</a>.
83+
При клике в чекбокс `Enable REPL` и последующем запуске теста (в REPL режиме можно одновременно запустить только один тест) он будет запущен в специальном REPL режиме. Подробнее про этот режим можно прочитать <a href="/ru/docs/v8/reference/cli#testplane-repl">здесь</a>.
8484

8585
![Включение опции REPL](/img/blog/vscode-extension/enable-repl.png)
8686

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ Instances of the `browser` and `expect` are available inside of the browser's gl
184184

185185
Calling the `log`, `info`, `warn`, `error`, `debug` and `table` commands on the `console` object in the browser causes information to be displayed not only in the browser's DevTools, but also in the terminal from which Testplane was launched. I.e., you can call `console.log` in the test/component and you will be able to see the result of it execution in the terminal. This is especially handy when debugging the test.
186186

187-
[test-run-env-option]: ../config/system.mdx#testrunenv
187+
[test-run-env-option]: ../reference/config/system.mdx#testrunenv
188188
[browser-execute]: ../commands/browser/execute.mdx
189189
[testplane-examples-component-testing]: https://github.com/gemini-testing/testplane/tree/master/examples/component-testing
190190
[testplane-global-hook]: https://github.com/gemini-testing/testplane-global-hook
191191
[vite-hmr]: https://vitejs.dev/guide/api-hmr.html
192-
[repl-mode]: ../command-line/index.mdx#testplane-repl
192+
[repl-mode]: ../reference/cli.mdx#testplane-repl
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Tabs from "@theme/Tabs";
22
import TabItem from "@theme/TabItem";
33
import Admonition from "@theme/Admonition";
4-
import AddElementCommandExample from "@site/docs/config/_partials/examples/_prepare-browser-add-element-command.mdx";
4+
import AddElementCommandExample from "@site/docs/reference/config/_partials/examples/_prepare-browser-add-element-command.mdx";
55

66
# Custom Commands
77

@@ -20,7 +20,7 @@ Testplane allows you to enhance your test suites by adding custom commands. Thes
2020

2121
<Admonition type="tip">
2222
A good place to add all of your custom commands is
23-
[`prepareBrowser`](../config/prepare-browser.mdx) hook.
23+
[`prepareBrowser`](../reference/config/prepare-browser.mdx) hook.
2424
</Admonition>
2525

2626
To add a custom command to the `browser` object, use the `addCommand` method. Here's how you can define a command that retrieves both the URL and title of the current page:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Admonition from "@theme/Admonition";
22

3-
# How to Debug a Test
3+
# Debugging Tests
44

55
## Problem {#problem}
66

docs/guides/how-to-manage-network-bandwidth.mdx renamed to docs/basic-guides/emulation.mdx

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
11
import Admonition from "@theme/Admonition";
22

3-
# How to Manage Network Bandwidth
3+
# Emulation
44

5-
## Overview {#overview}
5+
## CPU Performance
66

77
<Admonition type="warning">
8-
This recipe only works when using _Chrome DevTools Protocol (CDP)_.
98

10-
Read details in the section “[How to use CDP in Testplane][how-to-use-cdp]”.
9+
This feature only works with browsers supporting _Chrome DevTools Protocol (CDP)_.
10+
11+
</Admonition>
12+
13+
The CPU speed on mobile devices is significantly slower than on computers. Therefore, to emulate CPU speed in _puppeteer_, there is a method called [emulateCPUThrottling][emulate-cpu-throttling].
14+
15+
### Example: Slowing Down CPU Speed by 8x {#example}
16+
17+
Let's use this method to slow down CPU speed by 8 times:
18+
19+
```javascript
20+
it("should open yandex.ru with emulation 8x slower CPU", async function ({ browser }) {
21+
// Get puppeteer instance
22+
const puppeteer = await browser.getPuppeteer();
23+
24+
// Get the first open page (considering it to be currently active)
25+
const [page] = await puppeteer.pages();
26+
27+
// Slow down the CPU speed by 8 times
28+
await page.emulateCPUThrottling(8);
29+
30+
await browser.url("https://yandex.ru");
31+
});
32+
```
33+
34+
[emulate-cpu-throttling]: https://pptr.dev/api/puppeteer.page.emulatecputhrottling
35+
[cdp-session-send]: https://pptr.dev/api/puppeteer.cdpsession.send
36+
[emulation-set-cpu-throttling-rate]: https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setCPUThrottlingRate
37+
38+
## Network Bandwidth
39+
40+
<Admonition type="warning">
41+
42+
This feature only works with browsers supporting _Chrome DevTools Protocol (CDP)_.
1143

1244
</Admonition>
1345

@@ -23,7 +55,7 @@ Besides custom settings, the [throttle][throttle] method supports the following
2355
- DSL
2456
- WiFi
2557

26-
## Example 1: Emulating a 2G Connection {#example_1}
58+
### Example 1: Emulating a 2G Connection {#example_1}
2759

2860
Let's emulate a 2G connection and open yandex.ru in Chrome with phone emulation:
2961

@@ -36,7 +68,7 @@ it("should open yandex.ru with emulation of 2G-connection", async function ({ br
3668
});
3769
```
3870

39-
## Example 2: Emulating a Network with Given Characteristics {#example_2}
71+
### Example 2: Emulating a Network with Given Characteristics {#example_2}
4072

4173
We can also emulate a connection with specific characteristics:
4274

@@ -54,5 +86,4 @@ it("should open yandex.ru with emulation of custom connection", async function (
5486
});
5587
```
5688

57-
[how-to-use-cdp]: ../how-to-use-cdp
5889
[throttle]: ../../commands/browser/throttle
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Admonition from "@theme/Admonition";
22

3-
# How to Run Testplane in a Local Browser
3+
# Managing Browsers
44

55
## Introduction
66

7-
Testplane can automatically download browsers in accordance with your [Testplane Config](/docs/v8/config/main).
7+
Testplane can automatically download browsers in accordance with your [Testplane Config](/docs/v8/reference/config/main).
88

99
Additionally, if Testplane is used on a supported version of Ubuntu, the necessary deb packages for running browsers will also be downloaded in a similar manner.
1010

@@ -16,11 +16,11 @@ In a project with Testplane, you can execute the command `npx testplane install-
1616

1717
You can also download only the necessary browsers described in the config. For example, if the browser `chrome-dark` is described, you can download only this one with the command `npm testplane install-deps chrome-dark'.
1818

19-
You can read more about this command on the respective page: [install-deps](/docs/v8/command-line#install-deps)
19+
You can read more about this command on the respective page: [install-deps](/docs/v8/reference/cli#install-deps)
2020

2121
## Running tests
2222

23-
You can run tests on local browsers using the [CLI option](/docs/v8/command-line) `--local`, or with [gridUrl](/docs/v8/config/browsers/#grid_url): "local" in the [Testplane config](/docs/v8/config/main). For example:
23+
You can run tests on local browsers using the [CLI option](/docs/v8/reference/cli) `--local`, or with [gridUrl](/docs/v8/reference/config/browsers/#grid_url): "local" in the [Testplane config](/docs/v8/reference/config/main). For example:
2424

2525
```bash
2626
npx testplane --local

0 commit comments

Comments
 (0)