diff --git a/blog/component-testing.mdx b/blog/component-testing.mdx
index 6e80971c..a6ef991b 100644
--- a/blog/component-testing.mdx
+++ b/blog/component-testing.mdx
@@ -9,7 +9,7 @@ import Admonition from "@theme/Admonition";
В testplane в экспериментальном режиме поддержали компонентное тестирование и unit-тесты, выполняющиеся в браузере.
-
+{/* truncate */}
Практически все современные веб-интерфейсы пишутся с использованием фреймворков (React, Vue, Svelte, ...) для упрощения создания и реиспользования компонентов. Такие компоненты важно тестировать в изоляции друг от друга, чтобы быть уверенным, что каждый компонент корректно справляется со своей работой. Точно так же как мы пишем unit-тесты отдельно от интеграционных. В Testplane уже поддержанно скриншотное тестирование компонентов с помощью [Storybook](https://storybook.js.org/), однако этот инструмент актуален не для всех проектов. Поэтому мы разработали ещё один вариант компонентного тестирования, который не требует использования Storybook.
diff --git a/blog/local-browsers.mdx b/blog/local-browsers.mdx
index 89c12c37..ab5eed4c 100644
--- a/blog/local-browsers.mdx
+++ b/blog/local-browsers.mdx
@@ -10,7 +10,7 @@ import localBrowsersExampleUrl from "/video/blog/local-browsers/local-browsers-e
В Testplane добавлена возможность автоматической загрузки браузеров и драйверов для последующего локального запуска.
-
+{/* truncate */}
Раньше Testplane с протоколом автоматизации webdriver можно было запустить локально только с вручную запущенным [selenium-standalone](https://github.com/webdriverio/selenium-standalone). Теперь достаточно указать `gridUrl: "local"` в [Конфиге Testplane](/docs/reference/config/main) или запустить тесты с [CLI-опцией](/docs/reference/cli) `--local`. В таком случае перед запуском тестов при необходимости будут загружены соответствующие браузеры и вебдрайверы к ним, которые также будут запущены для дальнейшего использования в этих тестах.
diff --git a/blog/rebranding.mdx b/blog/rebranding.mdx
index 3b55ac82..aee60700 100644
--- a/blog/rebranding.mdx
+++ b/blog/rebranding.mdx
@@ -7,7 +7,7 @@ date: 2024-05-20T13:00
Представляем вашему вниманию... **Testplane**. Наш проект Hermione решил сменить имя — встречайте проверенный годами продукт в свежем образе!
-
+{/* truncate */}
Мы долго рассматривали все за и против и пришли к выводу, что новое имя — Testplane — наилучшим образом отражает наше видение и будущее развитие продукта:
diff --git a/blog/selectivity.mdx b/blog/selectivity.mdx
index 964b1ee8..1be26aea 100644
--- a/blog/selectivity.mdx
+++ b/blog/selectivity.mdx
@@ -7,7 +7,7 @@ date: 2025-12-03T14:00
В Testplane добавлена селективность запуска тестов — возможность автоматически запускать только те тесты, для которых изменились файлы, от которых они зависят.
-
+{/* truncate */}
Селективность позволяет значительно ускорить процесс тестирования, запуская только релевантные тесты вместо всего набора. Testplane отслеживает зависимости каждого теста от файлов проекта — как код самих тестов, так и код, выполняемый в браузере — и при изменении файла запускает только те тесты, которые от него зависят.
diff --git a/blog/storybook-testing.mdx b/blog/storybook-testing.mdx
index 822e6337..e809dd67 100644
--- a/blog/storybook-testing.mdx
+++ b/blog/storybook-testing.mdx
@@ -7,7 +7,7 @@ date: 2024-09-26T13:00
Now, for automatic visual testing of your components, you only need Storybook with your components and the `@testplane/storybook` plugin. There’s no need to write any tests anymore.
-
+{/* truncate */}
[Storybook][storybook] is a tool for developing user interfaces based on components. It allows developers to independently visualize components in various states in an isolated environment, separate from other components.
This "showroom" is perfect for screenshot testing your components, as this isolated environment makes such tests significantly more stable and faster compared to e2e testing.
diff --git a/blog/support-bidi-protocol.mdx b/blog/support-bidi-protocol.mdx
index 85cc8e1d..780ebed2 100644
--- a/blog/support-bidi-protocol.mdx
+++ b/blog/support-bidi-protocol.mdx
@@ -13,7 +13,7 @@ import screenFullPageExampleUrl from "/video/blog/bidi/screen-full-page-example.
В [testplane@8.27.0](https://github.com/gemini-testing/testplane/releases/tag/v8.27.0) добавлена поддержка [WebDriver BiDi протокола](https://w3c.github.io/webdriver-bidi/) (будущий единый стандарт для автоматизации браузеров).
-
+{/* truncate */}
WebDriver BiDi (Bidirectional) — это новый протокол кросс-браузерной автоматизации, который сочетает в себе лучшее из существующих протоколов: [W3C WebDriver][webdriver] и [Chrome DevTools Protocol (CDP)][cdp] (подробнее о них можно почитать в нашей [статье][webvider-vs-cdp]). По сути новый протокол расширяет существующий
W3C Webdriver протокол и добавляет в него новые кросс-браузерные команды, которые заменяют CDP протокол (не является кросс-браузерным). Старые webdriver-команды работают как и раньше по http, а новые команды обеспечивают двунаправленную коммуникацию между клиентом и браузером по websocket соединению.
diff --git a/blog/testplane-9.mdx b/blog/testplane-9.mdx
new file mode 100644
index 00000000..db9b3770
--- /dev/null
+++ b/blog/testplane-9.mdx
@@ -0,0 +1,432 @@
+---
+title: Привет, Testplane 9!
+slug: testplane-9
+hide_table_of_contents: false
+date: 2026-06-16T17:00
+---
+
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+import coverImage from "@site/static/img/blog/testplane-9/cover.png";
+import scrollableContainerTestplane9Image from "@site/static/img/blog/testplane-9/scrollable-container/testplane-9.png";
+import scrollableContainerTestplane8Image from "@site/static/img/blog/testplane-9/scrollable-container/testplane-8.png";
+import scrollableContainerPlaywrightImage from "@site/static/img/blog/testplane-9/scrollable-container/playwright.png";
+import interferenceTestplane9Image from "@site/static/img/blog/testplane-9/interferences/testplane-9.png";
+import interferenceTestplane8Image from "@site/static/img/blog/testplane-9/interferences/testplane-8.png";
+import interferencePlaywrightImage from "@site/static/img/blog/testplane-9/interferences/playwright.png";
+import stickyTestplane9Image from "@site/static/img/blog/testplane-9/sticky/testplane-9.png";
+import stickyTestplane8Image from "@site/static/img/blog/testplane-9/sticky/testplane-8.png";
+import stickyPlaywrightImage from "@site/static/img/blog/testplane-9/sticky/playwright.png";
+import lazyLoadContentTestplane9Image from "@site/static/img/blog/testplane-9/lazy-load-content/testplane-9.jpg";
+import lazyLoadContentTestplane8Image from "@site/static/img/blog/testplane-9/lazy-load-content/testplane-8.jpg";
+import lazyLoadContentPlaywrightImage from "@site/static/img/blog/testplane-9/lazy-load-content/playwright.jpg";
+import hoverTestplane9Image from "@site/static/img/blog/testplane-9/hover/testplane-9.png";
+import hoverTestplane8Image from "@site/static/img/blog/testplane-9/hover/testplane-8-with-rects.png";
+import hoverPlaywrightImage from "@site/static/img/blog/testplane-9/hover/playwright.png";
+import pseudoElementsTestplane9Image from "@site/static/img/blog/testplane-9/pseudo-elements/testplane-9.png";
+import pseudoElementsTestplane8Image from "@site/static/img/blog/testplane-9/pseudo-elements/testplane-8.png";
+
+Встречайте Testplane 9: в этой версии заметно улучшились визуальные проверки, стала удобнее работа с глобальными объектами и появилось несколько полезных улучшений во всем фреймворке.
+
+
+
+{/* truncate */}
+
+## Переход на Testplane 9
+
+Руководство по миграции находится [здесь](/docs/migrations/how-to-upgrade-testplane-to-9). Ниже — обзор новых возможностей.
+
+## Полностью новый `assertView`
+
+Главное изменение в Testplane 9 — полностью переработанная логика работы `assertView`.
+
+Она лучше справляется с реальными интерфейсами: длинными страницами, скроллируемыми контейнерами, sticky-заголовками, fixed-оверлеями, шторками, модальными окнами, псевдоэлементами, тенями, обводками и другими случаями, из-за которых визуальные проверки часто становятся нестабильными.
+
+### Длинные скриншоты и контейнеры со скроллом
+
+`assertView` теперь гораздо лучше работает с элементами, которые не помещаются в один вьюпорт.
+
+Команда может автоматически определить, какой элемент нужно скроллить, найти неподвижные элементы и корректно обработать элементы с нестабильной высотой.
+
+
+
+
+### Sticky- и fixed-элементы
+
+Новая механика `assertView` вычисляет безопасную область до и во время съемки, поэтому sticky-заголовки, fixed-футеры и оверлеи не попадают в итоговый скриншот.
+
+
+ Код теста
+
+Testplane:
+
+```javascript
+it("captures a card with fixed page chrome around it", async ({ browser }) => {
+ await browser.url("file:///page.html");
+
+ await browser.assertView("analytics-card", "[data-testid=analytics-card]");
+});
+```
+
+Playwright:
+
+```javascript
+test("captures a card with fixed page chrome around it", async ({ page }) => {
+ await page.goto("file:///page.html");
+
+ await expect(page.locator("[data-testid=analytics-card]")).toHaveScreenshot(
+ "analytics-card.png",
+ );
+});
+```
+
+
+
+
+
+
+
Testplane v9
+
Testplane v8
+
Playwright
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Элементы с нестабильной высотой и lazy-load-контентом
+
+В Testplane 9 `assertView` умеет работать с контентом, который подгружается при скролле, и заранее прогружать всю нужную область.
+
+Если даже после такой прогрузки высота элемента меняется в процессе снятия скриншота, `assertView` постарается сделать скриншот без видимых разрывов.
+
+
+ Код и сравнение скриншотов
+
+ ```javascript
+ it("should capture a full page screenshot with assertView", async ({browser}) => {
+ await browser.url("https://sp.yandex.ru/s7");
+
+ await browser.execute(() => {
+ document.querySelectorAll('.DialElement_root__CftHX h1').forEach(h1 => {
+ h1.style.display = 'none';
+ });
+ });
+
+ await browser.assertView("visual-engine-comparison", "#__next");
+ });
+ ```
+
+ *Примечание: изображения ниже сильно сжаты из-за большого исходного размера.*
+
+ *Кликните на изображение, чтобы открыть его в новой вкладке.*
+
+
+
+
+
Testplane v9
+
Testplane v8
+
Playwright
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Подавление hover-эффектов
+
+В команде `assertView` появилась опция `disableHover`, которая подавляет hover-эффекты во время снятия скриншота.
+
+По умолчанию она включается автоматически, когда для того, чтобы снять скриншот элемента целиком, нужен скролл.
+
+_Примечание: на скриншоте Testplane v8 прямоугольниками выделены области, где видны hover-эффекты. В Testplane v9 их нет._
+
+
+
+
+
Testplane v9
+
Testplane v8
+
Playwright
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Поддержка псевдоэлементов
+
+Обновленный `assertView` умеет снимать псевдоэлементы, например `::before` и `::after`.
+
+В Testplane v8 для этого приходилось писать кастомную команду, которая сначала рисовала прямоугольник примерно поверх элемента, а затем снимала скриншот этой области.
+
+В Testplane v9 `assertView` работает с псевдоэлементами наравне с обычными элементами.
+
+
+
+
+
Testplane v9
+
Testplane v8
+
Playwright
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
+
+
+
+
+
+
+### Другие заметные улучшения
+
+В Testplane 9 есть и другие изменения, которые делают визуальное тестирование удобнее и стабильнее:
+
+- Значение `tolerance` по умолчанию теперь `3.0`, а не `2.3`, как в Testplane v8. То есть по умолчанию проверки `assertView` стали немного менее строгими.
+- Поддержка симуляторов iOS 26+ с новым Safari.
+- Опция `cropMargins` для обрезки скриншотов. Она полезна для обрезки скроллбаров в окружениях, где их нельзя скрыть.
+- Улучшенная отладка скриншотов: подробный лог и пошаговые скриншоты.
+
+## Асинхронный конфиг и lifecycle-хуки
+
+Конфиг Testplane теперь может быть асинхронной функцией. Это позволяет, например, загружать секреты, обращаться к внешним сервисам, готовить временные тестовые данные или вычислять настройки браузеров перед запуском.
+
+```typescript
+import type { ConfigInput } from "testplane";
+
+export default async (): Promise => {
+ const baseUrl = await getPreviewUrl();
+
+ return {
+ baseUrl,
+ browsers: {
+ chrome: {
+ desiredCapabilities: { browserName: "chrome" },
+ },
+ },
+ };
+};
+```
+
+`prepareEnvironment` тоже может быть асинхронным:
+
+```typescript
+import type { ConfigInput } from "testplane";
+
+const config: ConfigInput = {
+ prepareEnvironment: async () => {
+ process.env.AUTH_TOKEN = await createTestToken();
+ },
+
+ browsers: {
+ chrome: {
+ desiredCapabilities: { browserName: "chrome" },
+ },
+ },
+};
+
+export default config;
+```
+
+Некоторые lifecycle-события теперь тоже умеют ждать асинхронные обработчики, включая `CLI` и `NEW_BROWSER`.
+
+```javascript
+const fs = require("node:fs/promises");
+
+module.exports = testplane => {
+ testplane.on(testplane.events.CLI, async cli => {
+ const environments = JSON.parse(await fs.readFile("./test-envs.json", "utf8"));
+
+ cli.option("--env ", `Environment: ${environments.join(", ")}`);
+ });
+};
+```
+
+## Testplane больше не засоряет глобальный namespace
+
+Исторически тесты Testplane опирались на глобальные объекты вроде `it`, `describe`, `beforeEach`, `afterEach`, `testplane.*` и `hermione.*`. В Testplane 9 эти хелперы явно экспортируются из пакета и по умолчанию не добавляются в глобальное пространство, чтобы не конфликтовать с другими test runner'ами:
+
+```typescript
+import { describe, it, beforeEach } from "testplane";
+
+describe("profile", () => {
+ beforeEach(async ({ browser }) => {
+ await browser.url("/profile");
+ });
+
+ it("shows user name", async ({ browser }) => {
+ await expect(browser.$("[data-testid=user-name]")).toHaveText("Alice");
+ });
+});
+```
+
+Но можно и вернуть всё как было: достаточно установить пакет [`@testplane/globals`](https://github.com/gemini-testing/testplane-globals).
+
+## Удаление `automationProtocol: "devtools"` и изменения в браузерных настройках по умолчанию
+
+Testplane 9 использует WebDriver как единственный `automationProtocol`. Старый режим `automationProtocol: "devtools"` удален, локальный запуск браузеров можно делать с помощью `gridUrl: "local"`.
+
+Примечание: CDP-протокол и все, что с ним связано, по-прежнему можно использовать. Это изменение касается только опции `automationProtocol`.
+
+## Прекращение поддержки Node 18 и 20
+
+Testplane 9 необходима Node 22 или новее для работы (мы рекомендуем v22.12+).
diff --git a/blog/testplane-vs-playwright.mdx b/blog/testplane-vs-playwright.mdx
index 7bfff909..1a225c47 100644
--- a/blog/testplane-vs-playwright.mdx
+++ b/blog/testplane-vs-playwright.mdx
@@ -12,7 +12,7 @@ import Admonition from "@theme/Admonition";
И **Testplane**, и **Playwright** — это решения для end-to-end тестирования, но они имеют разные подходы и возможности. В этой статье мы проведём детальное сравнение этих инструментов, чтобы помочь вам сделать правильный выбор.
-
+{/* truncate */}
## Краткий обзор инструментов
diff --git a/blog/time-travel-release.mdx b/blog/time-travel-release.mdx
index aa87886f..60ee86df 100644
--- a/blog/time-travel-release.mdx
+++ b/blog/time-travel-release.mdx
@@ -15,7 +15,7 @@ import screenFullPageExampleUrl from "/video/blog/bidi/screen-full-page-example.

-
+{/* truncate */}
## Как получить доступ к последним обновлениям?
diff --git a/blog/vscode-extension.mdx b/blog/vscode-extension.mdx
index 4ea2c09a..97623812 100644
--- a/blog/vscode-extension.mdx
+++ b/blog/vscode-extension.mdx
@@ -11,7 +11,7 @@ import runTestsFromEditorVideoUrl from "/video/blog/vscode-extension/run-tests-f
Для Testplane реализовали расширение для VS Code, с помощью которого можно настраивать Testplane с нуля, запускать тесты и удобно работать с [REPL режимом](/docs/reference/cli#testplane-repl).
-
+{/* truncate */}
### Установка
diff --git a/docs/_partials/specs/assert-view-history.mdx b/docs/_partials/specs/assert-view-history.mdx
new file mode 100644
index 00000000..eadd90ad
--- /dev/null
+++ b/docs/_partials/specs/assert-view-history.mdx
@@ -0,0 +1,31 @@
+
+
+
+
Version
+
Changes
+
+
+
+
+
v9.0.0
+
+ Major update to the screenshot engine, see [full article](/blog/testplane-9) for
+ more details. Added `disableHover` and `cropMargins` options. `selectorToScroll` is
+ deprecated because the scrollable element is now detected automatically. `tolerance`
+ is now `3.0` by default instead of `2.3`.
+
Elements (specified as selectors) that will be ignored when comparing screenshots.
- Ignoring is implemented by painting the listed elements black. In the case of a
- single element, the parameter can be specified as a string.
+ Ignoring is implemented by painting the listed elements black. If multiple elements match any of the selectors, all matches will be ignored.
tolerance
-
Number
-
Sensitivity to color differences.
+
`number`
+
Sensitivity to color differences, `3.0` by default. [Read more](https://github.com/gemini-testing/looks-same).
antialiasingTolerance
-
Number
-
Sensitivity to antialiasing.
+
`number`
+
Sensitivity to antialiasing, `4` by default. [Read more](https://github.com/gemini-testing/looks-same).
allowViewportOverflow
-
Boolean
+
`boolean`
- By default, Testplane throws an error if an element is outside the viewport
- boundaries. This parameter disables boundary checking, allowing screenshots of
- elements that do not fit within the viewport. Only the parts of the element that fit
- within the viewport will be visible in the screenshot. However, if _compositeImage_
- is set to _true_, parts of the element that are below the viewport will also be
- visible in the screenshot. Similarly, if _captureElementFromTop_ is set to _true_,
- parts of the element that are above the viewport will also be included in the
- screenshot.
+ By default, Testplane will print a warning if element could not be captured in full, this option disables the warning.
+
+ Use this option in combination with `captureElementFromTop` to disable any scrolling that might happen before capture.
captureElementFromTop
-
Boolean
+
`boolean`
- Capture a screenshot of the element from the very top. If the element is outside the
- viewport, it will be scrolled into view.
+ By default, Testplane may scroll the element into view before capturing a screenshot, if it's not visible initially.
+
+ If this option is disabled and element is not visible initially, Testplane will throw an error.
compositeImage
-
Boolean
+
`boolean`
- If the element does not fit within the viewport, enabling this option will take
- multiple screenshots of different parts of the element sequentially, and then stitch
- them together into one image to display the entire element.
+ By default, Testplane will take capture the element in full by taking multiple screenshots of the element
+ and scrolling, and then stitch them together.
+
+ When disabled, only the part of the element that is visible on the first screenshot will be captured.
screenshotDelay
-
Number
+
`number`
- Delay in milliseconds before taking a screenshot. This can be useful when there are
- elements on the page that use animation, or a scrollbar that does not disappear
- immediately and ends up in the resulting screenshot.
-
-
-
-
selectorToScroll
-
String
-
- Selector to scroll. This can be useful when you need to take a screenshot of a modal
- window that does not fit on the screen. Otherwise, without specifying the selector,
- the scroll will be applied to the _window_ object, and the background will scroll,
- leaving the popup window in place.
+ Delay in milliseconds before taking a screenshot.
+
+ This can be useful to wait for a scrollbar to disappear before capturing a screenshot.
disableAnimation
-
Boolean
+
`boolean`
Disable animations and transitions when taking a screenshot. Default is `true`
starting from version `8.0.0`.
@@ -86,20 +72,51 @@
ignoreDiffPixelCount
-
`` `${number}%` `` or Number
+
number | \`$\{number\}%\`
Percentage of pixels to ignore in the diff. Useful for ignoring very small diffs.
+
Default is `0`. Available starting from version `8.2.0`.
waitForStaticToLoadTimeout
-
Number
+
`number`
- Timeout for `waitForStaticToLoad` command, which is automatically called before
- taking screenshot. Waiting is disabled, if value is set to `0`. Default is `5000`.
+ Default is `5000`. Timeout for `waitForStaticToLoad` command, which is automatically called before
+ taking screenshot.
+
+ If value is set to `0`, waiting is disabled.
Available starting from version `8.32.0`.
+
+
disableHover
+
`"always" | "never" | "when-scrolling-needed"`
+
+ By default, Testplane will disable hover effects if scrolling is needed to capture element in full.
+
+ Available starting from version `9.0.0`.
+
+
+
+
cropMargins
+
`{ top?: number, right?: number, bottom?: number, left?: number }`
+
+ Determines the margins to crop the screenshot by. Useful to crop scrollbars on android emulators.
+
+ Available starting from version `9.0.0`.
+
+
+
+
selectorToScroll
+
`string`
+
+ **Deprecated**. Starting from Testplane 9, the scrollable element is determined automatically.
+
+ Manual override affects what element Testplane will scroll when capturing a screenshot.
+
+
+
diff --git a/docs/basic-guides/browsers-overview.mdx b/docs/basic-guides/browsers-overview.mdx
index 3130bbb4..98bbe8f8 100644
--- a/docs/basic-guides/browsers-overview.mdx
+++ b/docs/basic-guides/browsers-overview.mdx
@@ -143,7 +143,7 @@ TESTPLANE_BROWSERS_PATH=./node_modules/.testplane npx testplane install-deps
- Delete the .testplane directory in the home folder
- Or delete the directory specified in `TESTPLANE_BROWSERS_PATH`
-### Browser Support {#browser-support}
+### Browser Support {/* #browser-support */}
Below is a table of supported browsers:
diff --git a/docs/basic-guides/configuration.mdx b/docs/basic-guides/configuration.mdx
index ad599ff5..46e36e88 100644
--- a/docs/basic-guides/configuration.mdx
+++ b/docs/basic-guides/configuration.mdx
@@ -20,7 +20,7 @@ The configuration file is the primary source of settings: it specifies browsers,
For a complete reference of parameters, see the [configuration documentation](../reference/config/main.mdx).
-## Configuration file {#config-location}
+## Configuration file {/* #config-location */}
When launched, Testplane looks for a configuration file in the current working directory. The following file names are supported (in order of priority):
@@ -37,7 +37,7 @@ If you need to use a config from a different location, specify the path using th
npx testplane --config ./configs/testplane.local.ts
```
-## Setting parameters {#config-sources}
+## Setting parameters {/* #config-sources */}
Testplane configuration parameters can be set in three ways:
@@ -45,7 +45,7 @@ Testplane configuration parameters can be set in three ways:
2. Environment variables: convenient for CI/CD and sensitive data
3. CLI arguments: for quick overrides at runtime
-### Overriding via environment variables {#env-override}
+### Overriding via environment variables {/* #env-override */}
Any configuration parameter can be overridden via environment variables. The variable name is formed from the parameter name in the config:
@@ -61,7 +61,7 @@ testplane_grid_url=local npx testplane
testplane_browsers_firefox_headless=false npx testplane
```
-### Overriding via CLI {#cli-override}
+### Overriding via CLI {/* #cli-override */}
Parameters can also be overridden via CLI arguments:
@@ -77,7 +77,7 @@ npx testplane --grid-url local
npx testplane --browsers-firefox-headless false
```
-### Parameter priority {#priority}
+### Parameter priority {/* #priority */}
When values conflict, the following priority applies (from highest to lowest):
@@ -88,11 +88,11 @@ When values conflict, the following priority applies (from highest to lowest):
| 3 | Configuration file | `baseUrl: "http://example.com"` |
| 4 | Default value | — |
-## Parameter inheritance {#inheritance}
+## Parameter inheritance {/* #inheritance */}
Testplane supports cascading parameter inheritance: settings defined at the root level of the config apply to all browsers. Browsers can override these values.
-### Inheritance example {#inheritance-example}
+### Inheritance example {/* #inheritance-example */}
```typescript title="testplane.config.ts"
import type { ConfigInput } from "testplane";
@@ -131,9 +131,9 @@ In this example:
defined for each browser separately.
-## Basic parameters {#basic-params}
+## Basic parameters {/* #basic-params */}
-### Retries (retry) {#retry}
+### Retries (retry) {/* #retry */}
The [`retry`](../reference/config/browsers.mdx#retry) parameter determines how many times Testplane will restart a failed test.
@@ -154,7 +154,7 @@ export default {
} satisfies ConfigInput;
```
-### Test file locations {#test-files}
+### Test file locations {/* #test-files */}
Test file sets and browsers for running them are specified in the `sets` section:
@@ -187,7 +187,7 @@ npx testplane --set desktop
For more details about sets, see the [sets documentation](../reference/config/sets.mdx).
-### Dev Server {#dev-server}
+### Dev Server {/* #dev-server */}
The `devServer` section allows you to automatically start a development server before tests:
@@ -223,7 +223,7 @@ Testplane will run the command and wait for the server to be ready at the specif
For more details, see the [devServer documentation](../reference/config/dev-server.mdx).
-### Execution parallelism {#parallelism}
+### Execution parallelism {/* #parallelism */}
Testplane runs tests in parallel, which significantly speeds up the test run. Two main parameters are used to configure parallelism: `sessionsPerBrowser` and `workers`.
@@ -257,7 +257,7 @@ export default {
In this example, Testplane can run up to 5 parallel Chrome sessions and up to 3 Firefox sessions, distributing tests among 4 worker processes.
-## Timeouts {#timeouts}
+## Timeouts {/* #timeouts */}
Testplane allows you to configure timeouts to control operation execution time:
@@ -288,11 +288,11 @@ export default {
For a complete list of timeouts and their descriptions, see the [documentation](../reference/config/browsers.mdx#timeouts).
-## Connecting plugins {#plugins}
+## Connecting plugins {/* #plugins */}
Plugins are connected and configured in the `plugins` section of the configuration file. Each key is the npm package name of the plugin, and the value is an object with its parameters.
-### Example with html-reporter {#html-reporter-example}
+### Example with html-reporter {/* #html-reporter-example */}
[html-reporter](../html-reporter/html-reporter-setup.mdx) is a plugin for generating HTML test reports.
@@ -348,11 +348,11 @@ If a parameter is specified in multiple places, the value with the highest prior
This allows flexible control of plugin behavior in CI/CD without modifying the config.
-## Setting defaults for commands {#command-defaults}
+## Setting defaults for commands {/* #command-defaults */}
Testplane allows you to set default values for parameters of certain commands. Instead of passing the same options with each call, you can specify them once in the configuration.
-### assertViewOpts {#assert-view-opts}
+### assertViewOpts {/* #assert-view-opts */}
Default settings for screenshot testing. Allows you to specify which elements to ignore, acceptable pixel difference, delay before capture, and other screenshot comparison parameters.
@@ -368,7 +368,7 @@ export default {
For a complete list of parameters, see the [assertView](../commands/browser/assertView.mdx) documentation.
-### expectOpts {#expect-opts}
+### expectOpts {/* #expect-opts */}
Settings for asynchronous assertions with waiting.
@@ -386,7 +386,7 @@ export default {
For a complete list of parameters, see the [expect matchers](../commands/expect/overview.mdx) documentation.
-### stateOpts {#state-opts}
+### stateOpts {/* #state-opts */}
Settings for browser state save and restore commands. Defines what to save (cookies, localStorage, sessionStorage), where to save, and whether to delete the file after tests.
diff --git a/docs/basic-guides/debugging-tests.mdx b/docs/basic-guides/debugging-tests.mdx
index 2a26f746..9dedd8ec 100644
--- a/docs/basic-guides/debugging-tests.mdx
+++ b/docs/basic-guides/debugging-tests.mdx
@@ -2,13 +2,13 @@ import Admonition from "@theme/Admonition";
# Debugging Tests
-## Problem {#problem}
+## Problem {/* #problem */}
In the course of developing tests, any developer will sooner or later encounter errors that are hard to detect through normal code review. At such moments, it's necessary to use software tools to understand where the error occurred, or why the test is behaving differently than expected.
Let's explore the options available to a Testplane test developer.
-## Solution 1: --inspect or --inspect-brk option {#solution_1}
+## Solution 1: --inspect or --inspect-brk option {/* #solution_1 */}
To see how a test is executed step by step, Testplane has a debug mode. This mode relies on the [V8 inspector integration with Node.js](https://nodejs.org/dist/latest-v16.x/docs/api/debugger.html#advanced-usage).
@@ -52,11 +52,11 @@ testplane path/to/mytest.js --inspect
with the parameter _sessionsPerBrowser=1_ to debug tests one at a time.
-## Keywords {#keywords}
+## Keywords {/* #keywords */}
- --inspect
- --inspect-brk
-## Useful Links {#useful_links}
+## Useful Links {/* #useful_links */}
- [About Chrome DevTools](https://developer.chrome.com/docs/devtools/)
diff --git a/docs/basic-guides/emulation.mdx b/docs/basic-guides/emulation.mdx
index 10a3a0cb..a6b78f90 100644
--- a/docs/basic-guides/emulation.mdx
+++ b/docs/basic-guides/emulation.mdx
@@ -12,7 +12,7 @@ This feature only works with browsers supporting _Chrome DevTools Protocol (CDP)
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].
-### Example: Slowing Down CPU Speed by 8x {#example}
+### Example: Slowing Down CPU Speed by 8x {/* #example */}
Let's use this method to slow down CPU speed by 8 times:
@@ -55,7 +55,7 @@ Besides custom settings, the [throttle][throttle] method supports the following
- DSL
- WiFi
-### Example 1: Emulating a 2G Connection {#example_1}
+### Example 1: Emulating a 2G Connection {/* #example_1 */}
Let's emulate a 2G connection and open yandex.ru in Chrome with phone emulation:
@@ -68,7 +68,7 @@ it("should open yandex.ru with emulation of 2G-connection", async function ({ br
});
```
-### Example 2: Emulating a Network with Given Characteristics {#example_2}
+### Example 2: Emulating a Network with Given Characteristics {/* #example_2 */}
We can also emulate a connection with specific characteristics:
diff --git a/docs/basic-guides/reporters.mdx b/docs/basic-guides/reporters.mdx
index 8f8b0a61..ca94bc4b 100644
--- a/docs/basic-guides/reporters.mdx
+++ b/docs/basic-guides/reporters.mdx
@@ -1,6 +1,6 @@
# Reporters
-## Simple Reporter {#testplane_report}
+## Simple Reporter {/* #testplane_report */}
Out of the box, Testplane writes the following summary to the console:
@@ -8,7 +8,7 @@ Out of the box, Testplane writes the following summary to the console:
Total: 1812 Passed: 1792 Failed: 0 Skipped: 20 Retries: 47
```
-## Stats Reporter {#stat_reporter_report}
+## Stats Reporter {/* #stat_reporter_report */}
If you add the [stat-reporter][stat-reporter] plugin to your project, you will get a more detailed report of the run results in the console after completing all the tests. For example:
@@ -52,7 +52,7 @@ The `stat-reporter` plugin also allows generating reports in HTML or JSON format
However, in terms of capabilities, the [stat-reporter][stat-reporter] plugin is significantly inferior to the [html-reporter][html-reporter] plugin, which provides much more advanced ways to work with tests and their run results.
-## JSON Reporter {#json_reporter_report}
+## JSON Reporter {/* #json_reporter_report */}
Install the [json-reporter][json-reporter] plugin to get a JSON report with test results in the following format:
@@ -82,7 +82,7 @@ Install the [json-reporter][json-reporter] plugin to get a JSON report with test
}
```
-## HTML Reporter {#html_reporter_report}
+## HTML Reporter {/* #html_reporter_report */}
Testplane's HTML Reporter is an ever-evolving, sleek and feature-packed UI for analyzing test results. It allows you to:
@@ -156,14 +156,14 @@ export default {
};
```
-## Keywords {#keywords}
+## Keywords {/* #keywords */}
- stat-reporter
- json-reporter
- html-reporter
- gui
-## Useful Links {#useful_links}
+## Useful Links {/* #useful_links */}
- [stat-reporter Plugin][stat-reporter]
- [html-reporter Plugin][html-reporter]
diff --git a/docs/basic-guides/visual-testing-with-storybook.mdx b/docs/basic-guides/visual-testing-with-storybook.mdx
index 6e42cda3..2c39518d 100644
--- a/docs/basic-guides/visual-testing-with-storybook.mdx
+++ b/docs/basic-guides/visual-testing-with-storybook.mdx
@@ -9,7 +9,7 @@ With the [@testplane/storybook][testplane-storybook] plugin, you can automatical
You just need to describe your component in `Storybook` and Testplane will automatically generate all necessary tests upon execution, run them in the required browsers and provide a visual report for updating screenshots.
Additionally, if a [play function][play-function] has been declared for the components, Testplane will execute it before the test begins to set the component to the desired state.
-## How to use? {#how_to_use}
+## How to use? {/* #how_to_use */}
### Step 1: Install dependencies
@@ -67,7 +67,7 @@ export default {
};
```
-## Custom tests {#custom_tests}
+## Custom tests {/* #custom_tests */}
Here's the translation:
@@ -136,7 +136,7 @@ export default {
The entire list of available options can be viewed on the [plugin page][plugin-link].
-## Additional settings {#extra_config}
+## Additional settings {/* #extra_config */}
Other types of testing can already be configured in your project, which can be run using Testplane. In order not to mix entities, we recommend using a separate config for Storybook tests and specifying it when running tests.
@@ -169,7 +169,7 @@ export default {
In this example, screenshot references would be stored in `screens//` folder, next to each of your story files.
-## Optimization of test runs {#optimize_run}
+## Optimization of test runs {/* #optimize_run */}
Storybook tests themselves are quite fast, because they do not need a complex environment, and only one component is rendered on the page.
In the context of the browser, Storybook testing environments are created one time and reused from test to test. Therefore, for the maximum speed of passing the tests, we recommend setting the [testsPerSession][tests-per-session] option with a value of at least 20 (more is better) to reuse the browser session as long as possible:
diff --git a/docs/basic-guides/visual-testing.mdx b/docs/basic-guides/visual-testing.mdx
index f7db0126..6f4ecaa2 100644
--- a/docs/basic-guides/visual-testing.mdx
+++ b/docs/basic-guides/visual-testing.mdx
@@ -5,7 +5,7 @@ We recommend using the [html-reporter][html-reporter] plugin, which provides a u

-### Screenshot Comparison Features {#features}
+### Screenshot Comparison Features {/* #features */}
For screenshot checks, Testplane provides the `assertView` command, which allows you to take a screenshot of a specific element or the entire viewport.
When the assertView command is invoked, it searches for the required element on the page with automatic waiting. By default, animations will be disabled on the page before taking a screenshot to eliminate potential instability in the test due to the changing state of the element.
@@ -19,7 +19,7 @@ The following settings are taken into account during comparison:
- comparison accuracy settings (acceptable deviations) are considered;
- anti-aliasing (the most common diffs in screenshots) accuracy settings for fonts are considered.
-### Usage {#usage}
+### Usage {/* #usage */}
```typescript
await browser.assertView(state, options);
@@ -49,7 +49,7 @@ it("check search view", async ({ browser }) => {
Read more about the capabilities of the `assertView' command in the relevant sections.
-### Useful links {#useful_links}
+### Useful links {/* #useful_links */}
- [browser.assertView command][browser-command]
- [element.assertView command][element-command]
diff --git a/docs/commands/browser/$$.mdx b/docs/commands/browser/$$.mdx
index 2b71523d..40f2c9ab 100644
--- a/docs/commands/browser/$$.mdx
+++ b/docs/commands/browser/$$.mdx
@@ -7,7 +7,7 @@ import Admonition from "@theme/Admonition";
# $$
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `$$` command instead of [findElements][find-elements] as a shorter command to get multiple elements on the page.
@@ -20,13 +20,13 @@ You can chain `$` or `$$` together to traverse down the DOM tree.
selectors][how-to-use-selectors]".
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.$$(selector);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -38,7 +38,7 @@ await browser.$$(selector);
-## Examples {#examples}
+## Examples {/* #examples */}
**index.html**
@@ -82,7 +82,7 @@ it("should get text of a menu link - JS Function", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [browser.$](../_dollar)
- [element.$](../../element/_dollar)
diff --git a/docs/commands/browser/$.mdx b/docs/commands/browser/$.mdx
index fd66cf65..dfddad75 100644
--- a/docs/commands/browser/$.mdx
+++ b/docs/commands/browser/$.mdx
@@ -7,7 +7,7 @@ import Admonition from "@theme/Admonition";
# $
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `$` command instead of [findElement][find-element] as a shorter command to get a single element on the page.
@@ -20,13 +20,13 @@ You can chain `$` or `$$` together to traverse down the DOM tree.
selectors][how-to-use-selectors]".
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.$(selector);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -38,7 +38,7 @@ await browser.$(selector);
-## Examples {#examples}
+## Examples {/* #examples */}
**index.html**
@@ -105,7 +105,7 @@ it("should use Androids DataMatcher or ViewMatcher selector", async ({ browser }
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [browser.$$](../_dollardollar)
- [element.$](../../element/_dollar)
diff --git a/docs/commands/browser/action.mdx b/docs/commands/browser/action.mdx
index b30745df..fd00f534 100644
--- a/docs/commands/browser/action.mdx
+++ b/docs/commands/browser/action.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# action
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `action` command to perform input actions on one of the virtualizable devices in the web browser.
@@ -25,7 +25,7 @@ await browser.action(...).perform(true);
[Android][appium-android].
-## Keyboard Control {#keyboard_control}
+## Keyboard Control {/* #keyboard_control */}
Used when specifying `key` as the argument for the `action` command. Example:
@@ -39,7 +39,7 @@ Returns a `KeyAction` object that supports the following actions:
- `up(value: string)` — creates a key release action;
- `pause(ms: number)` — specifies that the input source does nothing for the specified amount of time.
-### Special Symbols {#special_symbols}
+### Special Symbols {/* #special_symbols */}
To use special symbols (`Control`, `Page Up`, `Shift`, etc.), you can use the `Key` object from the [webdriverio][webdriverio-npm] package. It contains Unicode representations of all necessary special symbols. Example:
@@ -49,7 +49,7 @@ import { Key } from "webdriverio";
await browser.action("key").down(Key.Ctrl).perform();
```
-### Usage Examples {#keyboard_examples}
+### Usage Examples {/* #keyboard_examples */}
```typescript
import { Key } from "webdriverio";
@@ -69,7 +69,7 @@ it("should emit key events using key action commands", async ({ browser }) => {
Instead of a series of `down/up` events, it is better to use the `setValue` command. The example is purely for demonstrating the principles of the `action` command.
-## Pointer Control {#pointer_control}
+## Pointer Control {/* #pointer_control */}
Used when specifying `pointer` as the argument for the `action` command, and you can also specify the pointer type. Example:
@@ -92,7 +92,7 @@ Returns a `PointerAction` object that supports the following actions:
Detailed information on the parameter types [PointerActionParams][pointer-action-params], [PointerActionMoveParams][pointer-action-move-params], and [PointerActionUpParams][pointer-action-up-params] can be found in the webdriverio source code.
-### Usage Examples {#pointer_examples}
+### Usage Examples {/* #pointer_examples */}
```typescript
it("drag and drop using pointer action command", async ({ browser }) => {
@@ -110,7 +110,7 @@ it("drag and drop using pointer action command", async ({ browser }) => {
});
```
-## Scroll Wheel Control {#scroll_wheel_control}
+## Scroll Wheel Control {/* #scroll_wheel_control */}
Used when specifying `wheel` as the argument for the `action` command. Example:
@@ -125,7 +125,7 @@ Returns a `WheelAction` object that supports the following actions:
Detailed information on the parameter type [ScrollParams][scroll-params] can be found in the webdriverio source code.
-### Usage Examples {#scroll_examples}
+### Usage Examples {/* #scroll_examples */}
```typescript
it("should scroll using wheel action commands", async ({ browser }) => {
@@ -144,7 +144,7 @@ it("should scroll using wheel action commands", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [actions](../actions)
diff --git a/docs/commands/browser/actions.mdx b/docs/commands/browser/actions.mdx
index 8a03adc6..e5aaa116 100644
--- a/docs/commands/browser/actions.mdx
+++ b/docs/commands/browser/actions.mdx
@@ -1,16 +1,16 @@
# actions
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `actions` command to perform multiple input actions on one of the virtualizable devices in the web browser, for example, to simulate page zooming. More detailed information is provided in the description of the [action][action] command.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.actions([action1, action2, ...]);
```
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```typescript
it("run multiple actions at once for a pinch zoom", async ({ browser }) => {
@@ -21,7 +21,7 @@ it("run multiple actions at once for a pinch zoom", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [action](../action)
diff --git a/docs/commands/browser/addCommand.mdx b/docs/commands/browser/addCommand.mdx
index be16c61a..fcd1f293 100644
--- a/docs/commands/browser/addCommand.mdx
+++ b/docs/commands/browser/addCommand.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# addCommand
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `addCommand` command to add your own command to the browser or to an element. The command being added can be either synchronous or asynchronous.
@@ -11,13 +11,13 @@ Use the `addCommand` command to add your own command to the browser or to an ele
commands][how-to-add-custom-commands]".
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
browser.addCommand(name, callback, elementScope);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
// add the getUrlAndTitle command
@@ -73,7 +73,7 @@ it("should use my add command", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [overwriteCommand](../overwriteCommand)
diff --git a/docs/commands/browser/addTag.mdx b/docs/commands/browser/addTag.mdx
index 236b861e..d1aa4cc3 100644
--- a/docs/commands/browser/addTag.mdx
+++ b/docs/commands/browser/addTag.mdx
@@ -4,11 +4,11 @@ import Version from "../../_partials/specs/version.mdx";
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `addTag` command to add a tag (or multiple tags) to a test during execution.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.addTag("one");
@@ -32,7 +32,7 @@ function getTag(): TestTag[];
`getTag` returns an array of the tag objects mentioned above.
Each object has a `title` and a `dynamic` field, which indicates that the tag was added during the test.
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
diff --git a/docs/commands/browser/assertView.mdx b/docs/commands/browser/assertView.mdx
index ef36fee5..5f1ef6d2 100644
--- a/docs/commands/browser/assertView.mdx
+++ b/docs/commands/browser/assertView.mdx
@@ -1,41 +1,61 @@
import Admonition from "@theme/Admonition";
import AssertViewOptions from "../../_partials/specs/assert-view-options.mdx";
+import AssertViewHistory from "../../_partials/specs/assert-view-history.mdx";
# assertView
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `assertView` command to take a screenshot for a specific test state and compare it with a reference.
- This command is implemented within Testplane, it's not available in the [API
- WebDriverIO][webdriverio-api].
-
+ The `assertView` command uses [waitForExist][wait-for-exist] (with
+ [waitTimeout][wait-timeout] and [waitInterval][wait-interval]) to wait for the element to exist before taking a screenshot.
+
+ It also automatically waits for static (fonts, images, etc.) to load using the [waitForStaticToLoad][wait-for-static-to-load] command.
-
- Automatically calls the [waitForStaticToLoad][wait-for-static-to-load] command before taking a
- screenshot.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.assertView(state, options);
await browser.assertView(state, selector, options);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-
-
**Name**
**Type**
**Description**
-
-
-
[state](#state)
String
Required parameter. The name of the test state. It must be unique within a single test.
-
[selector](#selector)
String or String[]
Optional parameter. Can be skipped. The DOM element selector to capture. If skipped, current viewport is captured.
-
[options](#options)
Object
Settings for the _assertView_ command.
-
-
+
+
+
**Name**
+
**Type**
+
**Description**
+
+
+
+
+
[state](#state)
+
`string`
+
+ Required parameter. The name of the test state. It must be unique within a single
+ test.
+
+
+
+
[selector](#selector)
+
`string | string[]`
+
+ Optional parameter. Can be skipped. The DOM element selector to capture. If skipped,
+ current viewport is captured.
+
+
+
+
[options](#options)
+
`AssertViewOpts`
+
Optional settings for the _assertView_ command.
+
+
### state
@@ -44,18 +64,13 @@ Required parameter. Specifies the name of the test state. The name must be uniqu
### selector
-Optional parameter. Specifies the selector of the DOM element to capture. If not specified or skipped, will be set to `body` and the following options will be automatically added to `options`:
+Optional parameter. Specifies the selector of the DOM element to capture:
-```
-{
- allowViewportOverflow: true,
- compositeImage: false,
- captureElementFromTop: false
-}
-```
+- If not specified, `assertView` will take a screenshot of the current viewport
+
+- If an array of selectors is passed, `assertView` will take a screenshot of an area covering all passed selectors
-These additional options will have higher priority than `assertViewOpts` from config, but lower priority than options from `options` parameter passed by user.
-So, assertView without `selector` parameter will take a screenshot of the current viewport.
+- If any of the selectors matches multiple elements, `assertView` will take a screenshot of the first one
### options
@@ -63,7 +78,7 @@ Specifies the settings for the `assertView` command:
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
**Visual check of certain element**
@@ -108,14 +123,20 @@ it("should assert view with given options", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## History
+
+
+
+## Related Commands {/* #related */}
- [element.assertView](../../element/assertView)
- [browser.saveRecordingScreen](../saveRecordingScreen)
- [browser.saveScreenshot](../saveScreenshot)
- [element.saveScreenshot](../../element/saveScreenshot)
-[webdriverio-api]: https://webdriver.io/docs/api
[browsers-tolerance]: ../../../reference/config/browsers#tolerance
[browsers-antialiasing-tolerance]: ../../../reference/config/browsers#antialiasing_tolerance
[wait-for-static-to-load]: ../waitForStaticToLoad
+[wait-for-exist]: ../../element/waitForExist
+[wait-timeout]: ../../../reference/config/browsers#wait_timeout
+[wait-interval]: ../../../reference/config/browsers#wait_interval
diff --git a/docs/commands/browser/call.mdx b/docs/commands/browser/call.mdx
index 40432fc3..08b2f758 100644
--- a/docs/commands/browser/call.mdx
+++ b/docs/commands/browser/call.mdx
@@ -1,18 +1,18 @@
# call
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `call` command to perform any asynchronous action in tests.
This command is treated as a synchronous function. It accepts a promise and halts its execution until the promise is resolved.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.call(callback);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -24,7 +24,7 @@ await browser.call(callback);
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("some testing here", async ({ browser }) => {
diff --git a/docs/commands/browser/clearSession.mdx b/docs/commands/browser/clearSession.mdx
index 460c6d1a..bd2475e2 100644
--- a/docs/commands/browser/clearSession.mdx
+++ b/docs/commands/browser/clearSession.mdx
@@ -1,16 +1,16 @@
# clearSession
-## Overview {#overview}
+## Overview {/* #overview */}
Browser command that clears session state (deletes cookies, clears local and session storages).
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.clearSession();
```
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```typescript
it("test", async ({ browser }) => {
diff --git a/docs/commands/browser/debug.mdx b/docs/commands/browser/debug.mdx
index b0e87b32..768e5c17 100644
--- a/docs/commands/browser/debug.mdx
+++ b/docs/commands/browser/debug.mdx
@@ -1,18 +1,18 @@
# debug
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `debug` command to pause the execution of a test in the browser.
By pausing the test, you can switch to the browser, open _DevTools_, and inspect the web page in real-time. This can be useful for debugging the test.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.debug();
```
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should demonstrate the debug command", async ({ browser }) => {
diff --git a/docs/commands/browser/deleteCookies.mdx b/docs/commands/browser/deleteCookies.mdx
index b65c24b1..5ea68f2d 100644
--- a/docs/commands/browser/deleteCookies.mdx
+++ b/docs/commands/browser/deleteCookies.mdx
@@ -1,18 +1,18 @@
# deleteCookies
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `deleteCookies` command to delete all or specific cookies for the current page.
To delete specific cookies, you need to specify the cookie name as a string or a list of cookie names as an array of strings.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.deleteCookies(names);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should delete cookies", async ({ browser }) => {
@@ -59,7 +59,7 @@ it("should delete cookies", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [getCookies](../getCookies)
- [setCookies](../setCookies)
diff --git a/docs/commands/browser/execute.mdx b/docs/commands/browser/execute.mdx
index e9a7110b..6cf9c7cc 100644
--- a/docs/commands/browser/execute.mdx
+++ b/docs/commands/browser/execute.mdx
@@ -1,6 +1,6 @@
# execute
-## Overview {#overview}
+## Overview {/* #overview */}
Use `execute` to _synchronously_ execute the specified JavaScript code in the context of the currently selected frame.
@@ -10,13 +10,13 @@ The `script` argument defines the script to be executed as the body of a functio
Arguments can be any JSON primitives, arrays, or JSON objects. JSON objects that define a reference to a _WebElement_ will be converted to the corresponding DOM element. Similarly, any _WebElements_ in the script result will be returned to the client as _WebElement JSON_ objects.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.execute(script, arguments);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should inject javascript on the page", async ({ browser }) => {
@@ -49,7 +49,7 @@ it("should inject javascript on the page", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [executeAsync](../executeAsync)
- [setTimeout](../setTimeout)
diff --git a/docs/commands/browser/executeAsync.mdx b/docs/commands/browser/executeAsync.mdx
index f4feab15..c8572404 100644
--- a/docs/commands/browser/executeAsync.mdx
+++ b/docs/commands/browser/executeAsync.mdx
@@ -1,6 +1,6 @@
# executeAsync
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `executeAsync` command to _asynchronously_ execute the specified JavaScript code in the context of the currently selected frame.
@@ -10,13 +10,13 @@ The `script` argument defines the script to be executed as the body of a functio
Arguments can be any JSON primitives, arrays, or JSON objects. JSON objects that define a reference to a _WebElement_ will be converted to the corresponding DOM element. Similarly, any _WebElements_ in the script result will be returned to the client as _WebElement JSON_ objects.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.executeAsync(script, arguments);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should execute async JavaScript on the page", async ({ browser }) => {
@@ -53,7 +53,7 @@ it("should execute async JavaScript on the page", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [execute](../execute)
- [setTimeout](../setTimeout)
diff --git a/docs/commands/browser/executionContext.mdx b/docs/commands/browser/executionContext.mdx
index e9f87725..06639ddf 100644
--- a/docs/commands/browser/executionContext.mdx
+++ b/docs/commands/browser/executionContext.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# executionContext
-## Overview {#overview}
+## Overview {/* #overview */}
During the test run, Testplane adds an `executionContext` property to `browser` to store the execution context.
@@ -13,7 +13,7 @@ The `browser.executionContext` property holds the current test or hook \_Mocha o
WebDriverIO][webdriverio-api].
-## Usage Example {#examples}
+## Usage Example {/* #examples */}
```javascript
it("should log execution context", async ({ browser }) => {
diff --git a/docs/commands/browser/getConfig.mdx b/docs/commands/browser/getConfig.mdx
index 6519368c..1d3bdd5a 100644
--- a/docs/commands/browser/getConfig.mdx
+++ b/docs/commands/browser/getConfig.mdx
@@ -1,16 +1,16 @@
# getConfig
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `getConfig` command to get the browser [config][browser-config].
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.getConfig();
```
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("some test", async ({ browser }) => {
diff --git a/docs/commands/browser/getCookies.mdx b/docs/commands/browser/getCookies.mdx
index c8756680..ba11574c 100644
--- a/docs/commands/browser/getCookies.mdx
+++ b/docs/commands/browser/getCookies.mdx
@@ -1,18 +1,18 @@
# getCookies
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `getCookies` command to get all or specific cookies on the current page.
To get specific cookies, you need to specify the cookie name as a string or a list of cookie names as an array of strings.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.getCookies(names);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should open a new tab", async ({ browser }) => {
diff --git a/docs/commands/browser/openAndWait.mdx b/docs/commands/browser/openAndWait.mdx
index a99418af..d30dfa1e 100644
--- a/docs/commands/browser/openAndWait.mdx
+++ b/docs/commands/browser/openAndWait.mdx
@@ -1,12 +1,12 @@
# openAndWait
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `openAndWait` command to open a page and wait for it to load (based on a combination of specified factors).
Functions for waiting for network idle and failing on network errors are only available when using browsers that support _Chrome DevTools Protocol (CDP)_.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.openAndWait("some/url", {
@@ -20,7 +20,7 @@ await browser.openAndWait("some/url", {
});
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
// log the pause duration in ms before the pause and then return the value
@@ -67,7 +67,7 @@ it("should use my overwrite command", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [addCommand](../addCommand)
diff --git a/docs/commands/browser/pause.mdx b/docs/commands/browser/pause.mdx
index 1dcbc366..9c175152 100644
--- a/docs/commands/browser/pause.mdx
+++ b/docs/commands/browser/pause.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# pause
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `pause` command to halt the execution of the test for a specified period of time.
@@ -12,13 +12,13 @@ Use the `pause` command to halt the execution of the test for a specified period
_waitFor*_ commands.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.pause(milliseconds);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should pause the execution", async ({ browser }) => {
diff --git a/docs/commands/browser/reactDollar.mdx b/docs/commands/browser/reactDollar.mdx
index d92be12e..466662e6 100644
--- a/docs/commands/browser/reactDollar.mdx
+++ b/docs/commands/browser/reactDollar.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# react$
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `react$` command to find React components on the page by their actual name, while filtering them by props and state.
@@ -13,13 +13,13 @@ Read more about React selectors in the recipe "[How to use selectors][how-to-use
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.react$(reactComponentSelector, { props, state });
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -33,7 +33,7 @@ await browser.react$(reactComponentSelector, { props, state });
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should calculate 7 * 6", async ({ browser }) => {
@@ -67,7 +67,7 @@ it("should calculate 7 * 6", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [browser.react$$](../reactDollarDollar)
- [element.react$](../../element/reactDollar)
diff --git a/docs/commands/browser/reactDollarDollar.mdx b/docs/commands/browser/reactDollarDollar.mdx
index a97b712e..f3fdcb6a 100644
--- a/docs/commands/browser/reactDollarDollar.mdx
+++ b/docs/commands/browser/reactDollarDollar.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# react$$
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `react$$` command to find multiple React components on the page by their actual name, while filtering them by props and state.
@@ -13,13 +13,13 @@ Read more about React selectors in the recipe "[How to use selectors][how-to-use
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.react$$(reactComponentSelector, { props, state });
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -33,7 +33,7 @@ await browser.react$$(reactComponentSelector, { props, state });
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should calculate 7 * 6", async ({ browser }) => {
@@ -48,7 +48,7 @@ it("should calculate 7 * 6", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [browser.react$](../reactDollar)
- [element.react$](../../element/reactDollar)
diff --git a/docs/commands/browser/reloadSession.mdx b/docs/commands/browser/reloadSession.mdx
index a089b601..c67f7598 100644
--- a/docs/commands/browser/reloadSession.mdx
+++ b/docs/commands/browser/reloadSession.mdx
@@ -1,18 +1,18 @@
# reloadSession
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `reloadSession` command to create a new Selenium session with the current capabilities.
This command can be useful if you are testing an application with many states and need to clear the browser session between individual tests in a single file, to avoid creating hundreds of separate test files with WDIO. However, be cautious, as this command significantly impacts testing time since creating new Selenium sessions is time-consuming, especially when using cloud services.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.reloadSession();
```
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should reload my session with current capabilities", async ({ browser }) => {
diff --git a/docs/commands/browser/restoreState.mdx b/docs/commands/browser/restoreState.mdx
index 80a2a1b2..1f45e64d 100644
--- a/docs/commands/browser/restoreState.mdx
+++ b/docs/commands/browser/restoreState.mdx
@@ -5,11 +5,11 @@ import Version from "../../_partials/specs/version.mdx";
-## Overview {#overview}
+## Overview {/* #overview */}
Browser command that restores session state (cookies, local and session storages) from a file or variable.
-## Usage {#usage}
+## Usage {/* #usage */}
You can restore the browser state from either a file (using the `path` parameter) or directly from an object (using the `data` parameter).
@@ -34,7 +34,7 @@ await browser.restoreState({
});
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -93,7 +93,7 @@ await browser.restoreState({
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
Restore state from file.
@@ -150,7 +150,7 @@ export default {
} satisfies ConfigInput;
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [saveState](../saveState)
- [afterAll](../../../reference/config/after-all)
diff --git a/docs/commands/browser/runStep.mdx b/docs/commands/browser/runStep.mdx
index 8f02545d..b2edab8a 100644
--- a/docs/commands/browser/runStep.mdx
+++ b/docs/commands/browser/runStep.mdx
@@ -1,17 +1,17 @@
# runStep
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `runStep` command to obtain a human-readable execution history of the test, which will automatically be displayed in the [html-reporter][reporter].
Steps can be nested.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.runStep(stepName, stepCb);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should save a PDF screenshot of the browser view", async ({ browser }) => {
@@ -53,7 +53,7 @@ it("should save a PDF screenshot of the browser view", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [saveRecordingScreen](../saveRecordingScreen)
- [saveScreenshot](../saveScreenshot)
diff --git a/docs/commands/browser/saveRecordingScreen.mdx b/docs/commands/browser/saveRecordingScreen.mdx
index bd657543..227d6a16 100644
--- a/docs/commands/browser/saveRecordingScreen.mdx
+++ b/docs/commands/browser/saveRecordingScreen.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# saveRecordingScreen
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `saveRecordingScreen` command to save a video to a file that was started with the [startRecordingScreen][start-recording-screen] command.
@@ -11,13 +11,13 @@ Use the `saveRecordingScreen` command to save a video to a file that was started
[Appium][appium].
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.saveRecordingScreen(filepath);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should save a video", async ({ browser }) => {
@@ -39,7 +39,7 @@ it("should save a video", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [savePDF](../savePDF)
- [saveScreenshot](../saveScreenshot)
diff --git a/docs/commands/browser/saveScreenshot.mdx b/docs/commands/browser/saveScreenshot.mdx
index 144db5a3..71cf9d7e 100644
--- a/docs/commands/browser/saveScreenshot.mdx
+++ b/docs/commands/browser/saveScreenshot.mdx
@@ -1,18 +1,18 @@
# saveScreenshot
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `saveScreenshot` command to save a screenshot of the current browser context to a PNG file.
Keep in mind that some browser drivers capture screenshots of the entire document (e.g., the [Gecko driver][gecko] for Firefox), while others capture only the current viewport (e.g., [Chromedriver][chromedriver] for Chrome).
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.saveScreenshot(filepath);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should save a screenshot of the browser view", async ({ browser }) => {
@@ -32,7 +32,7 @@ it("should save a screenshot of the browser view", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [browser.savePDF](../savePDF)
- [browser.saveRecordingScreen](../saveRecordingScreen)
diff --git a/docs/commands/browser/saveState.mdx b/docs/commands/browser/saveState.mdx
index c8b82afd..7b8e19bc 100644
--- a/docs/commands/browser/saveState.mdx
+++ b/docs/commands/browser/saveState.mdx
@@ -4,11 +4,11 @@ import Version from "../../_partials/specs/version.mdx";
-## Overview {#overview}
+## Overview {/* #overview */}
Browser command that saves session state (cookies, local and session storages).
-## Usage {#usage}
+## Usage {/* #usage */}
This command returns a state of the page state, including cookies, localStorage, and sessionStorage.
You can use parameters to exclude specific types of data if needed.
@@ -27,7 +27,7 @@ const stateDump: SaveStateData = await browser.saveState({
});
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
Save state in file.
@@ -98,7 +98,7 @@ it("test", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [restoreState](../restoreState)
- [afterAll](../../../reference/config/after-all)
diff --git a/docs/commands/browser/scroll.mdx b/docs/commands/browser/scroll.mdx
index 768ff117..c041416b 100644
--- a/docs/commands/browser/scroll.mdx
+++ b/docs/commands/browser/scroll.mdx
@@ -1,16 +1,16 @@
# scroll
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `scroll` command to scroll the browser viewport. Note that the `x` and `y` coordinates refer to the current scrolling position of the viewport.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.scroll(x, y);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -23,7 +23,7 @@ await browser.scroll(x, y);
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```typescript
it("should demonstrate the scroll command", async ({ browser }) => {
@@ -35,7 +35,7 @@ it("should demonstrate the scroll command", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [element.scrollIntoView](../../element/scrollIntoView)
diff --git a/docs/commands/browser/setCookies.mdx b/docs/commands/browser/setCookies.mdx
index 07a0e013..4988a0ef 100644
--- a/docs/commands/browser/setCookies.mdx
+++ b/docs/commands/browser/setCookies.mdx
@@ -1,18 +1,18 @@
# setCookies
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `setCookies` command to set cookies on the current page.
Make sure you are on the page for which you want to set the cookies. You cannot set cookies for an arbitrary page without being on it.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.setCookies(cookies);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should get meta info of test", async ({ browser }) => {
@@ -50,7 +50,7 @@ it("should get meta info of test", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [getMeta](../getMeta)
diff --git a/docs/commands/browser/setOrientation.mdx b/docs/commands/browser/setOrientation.mdx
index ff1353af..60cce54b 100644
--- a/docs/commands/browser/setOrientation.mdx
+++ b/docs/commands/browser/setOrientation.mdx
@@ -1,17 +1,17 @@
# setOrientation
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `setOrientation` command to change the browser orientation. This command ensures that subsequent commands will not start executing until the orientation change occurs.
If the device does not support this feature, the command will be ignored.
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.setOrientation(orientation);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [getWindowSize](../getWindowSize)
diff --git a/docs/commands/browser/switchToRepl.mdx b/docs/commands/browser/switchToRepl.mdx
index aaceb7f6..4f89e6f7 100644
--- a/docs/commands/browser/switchToRepl.mdx
+++ b/docs/commands/browser/switchToRepl.mdx
@@ -2,19 +2,19 @@ import Admonition from "@theme/Admonition";
# switchToRepl
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `switchToRepl` command to stop the test execution and open an interactive `REPL` interface in the terminal where you can execute code line by line and observe the results in real-time. This mode allows for convenient debugging of problematic tests both in a locally installed browser and in a remote grid (for example, using [VNC][vnc]).
For more convenient use of the `REPL` mode, it is recommended to use the [VS Code extension][extension].
-## Usage {#usage}
+## Usage {/* #usage */}
```typescript
await browser.runStep(stepName, stepCb);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
it("should do a touch gesture", async ({ browser }) => {
@@ -79,7 +79,7 @@ it("should do a touch gesture", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [element.touchAction](../../element/touchAction)
diff --git a/docs/commands/browser/uploadFile.mdx b/docs/commands/browser/uploadFile.mdx
index ea77b008..ec87f255 100644
--- a/docs/commands/browser/uploadFile.mdx
+++ b/docs/commands/browser/uploadFile.mdx
@@ -2,7 +2,7 @@ import Admonition from "@theme/Admonition";
# uploadFile
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `uploadFile` command to upload a file to a _[Selenium Standalone][selenium-file]_ server or to the browser via its driver (e.g., [Chromedriver][chromedriver]).
@@ -12,13 +12,13 @@ Use the `uploadFile` command to upload a file to a _[Selenium Standalone][seleni
currently implemented only in _Chrome_ and when running on [Selenium Grid][selenium-grid].
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.uploadFile(localPath);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
```javascript
const path = require("path");
diff --git a/docs/commands/browser/url.mdx b/docs/commands/browser/url.mdx
index 09700335..79d45f52 100644
--- a/docs/commands/browser/url.mdx
+++ b/docs/commands/browser/url.mdx
@@ -1,6 +1,6 @@
# url
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `url` command to navigate to the specified URL in the browser.
@@ -8,13 +8,13 @@ If [baseUrl][base-url] is specified in the configuration, it will be added to th
Calling `browser.url()` with the same URL as before will reload the page.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.url(url);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -26,7 +26,7 @@ await browser.url(url);
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
**url.js**
diff --git a/docs/commands/browser/waitForStaticToLoad.mdx b/docs/commands/browser/waitForStaticToLoad.mdx
index 9f4ee1b5..0969fc82 100644
--- a/docs/commands/browser/waitForStaticToLoad.mdx
+++ b/docs/commands/browser/waitForStaticToLoad.mdx
@@ -5,7 +5,7 @@ import Version from "../../_partials/specs/version.mdx";
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `waitForStaticToLoad` command to wait for static elements on the page to load, such as fonts, CSS styles, and images.
@@ -19,7 +19,7 @@ Automatically called when executing `assertView`.
server, or if the element has a `crossorigin` attribute set to `anonymous`.
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
const result = await browser.waitForStaticToLoad({ timeout: 5000, interval: 300 });
@@ -32,7 +32,7 @@ const result = await browser.waitForStaticToLoad({ timeout: 5000, interval: 300
// { ready: false, reason: "Resources are not loaded", pendingResources: ["https://example.com/image.jpg"] }
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
**example.html**
@@ -52,7 +52,7 @@ it("should wait until text has changed", async ({ browser }) => {
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [element.waitUntil](../../element/waitUntil)
diff --git a/docs/commands/element/$$.mdx b/docs/commands/element/$$.mdx
index 6f1216c9..896a658c 100644
--- a/docs/commands/element/$$.mdx
+++ b/docs/commands/element/$$.mdx
@@ -7,7 +7,7 @@ import Admonition from "@theme/Admonition";
# $$
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `$$` command instead of [findElements][find-elements] as a shorter command to get multiple elements on the page within the scope of an element. This command is similar to the [browser.$$()](../../browser/_dollardollar) command but differs in that the search for elements will be among the children of the current element.
@@ -16,13 +16,13 @@ Use the `$$` command instead of [findElements][find-elements] as a shorter comma
selectors][how-to-use-selectors]".
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.$(selector).$$(subSelector);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
**index.html**
diff --git a/docs/commands/element/$.mdx b/docs/commands/element/$.mdx
index ec7edc60..67fe1cff 100644
--- a/docs/commands/element/$.mdx
+++ b/docs/commands/element/$.mdx
@@ -7,7 +7,7 @@ import Admonition from "@theme/Admonition";
# $
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `$` command instead of [findElement][find-element] as a shorter command to get a single element on the page.
@@ -20,13 +20,13 @@ You can chain `$` or `$$` together to navigate down the DOM tree. But note that
selectors][how-to-use-selectors]".
-## Usage {#usage}
+## Usage {/* #usage */}
```javascript
await browser.$(selector);
```
-## Command Parameters {#parameters}
+## Command Parameters {/* #parameters */}
@@ -38,7 +38,7 @@ await browser.$(selector);
-## Usage Examples {#examples}
+## Usage Examples {/* #examples */}
**index.html**
@@ -109,7 +109,7 @@ it("should use Android's DataMatcher or ViewMatcher selector", async ({ browser
});
```
-## Related Commands {#related}
+## Related Commands {/* #related */}
- [element.$$](../_dollardollar)
- [browser.$](../../browser/_dollar)
diff --git a/docs/commands/element/addValue.mdx b/docs/commands/element/addValue.mdx
index d2989ba4..b5d60640 100644
--- a/docs/commands/element/addValue.mdx
+++ b/docs/commands/element/addValue.mdx
@@ -1,16 +1,16 @@
# addValue
-## Overview {#overview}
+## Overview {/* #overview */}
Use the `addValue` command to add a value to an `` or `
-### `mapDependencyRelativePath` examples {#mapDependencyRelativePath_examples}
+### `mapDependencyRelativePath` examples {/* #mapDependencyRelativePath_examples */}
-#### Ignore Next.js internal dependencies {#mapDependencyRelativePath_example_nextjs}
+#### Ignore Next.js internal dependencies {/* #mapDependencyRelativePath_example_nextjs */}
```ts
{
@@ -1142,7 +1142,7 @@ The section has the following parameters:
}
```
-#### Usage with @testplane/storybook plugin {#mapDependencyRelativePath_example_testplane_storybook}
+#### Usage with @testplane/storybook plugin {/* #mapDependencyRelativePath_example_testplane_storybook */}
```ts
{
@@ -1165,9 +1165,9 @@ The section has the following parameters:
}
```
-### `mapSourceMapUrl` examples {#mapSourceMapUrl_examples}
+### `mapSourceMapUrl` examples {/* #mapSourceMapUrl_examples */}
-#### Filter out third-party scripts {#mapSourceMapUrl_example_filter}
+#### Filter out third-party scripts {/* #mapSourceMapUrl_example_filter */}
```ts
{
@@ -1185,7 +1185,7 @@ The section has the following parameters:
}
```
-#### Remap source map URL to a local server {#mapSourceMapUrl_example_remap}
+#### Remap source map URL to a local server {/* #mapSourceMapUrl_example_remap */}
```ts
{
@@ -1209,7 +1209,7 @@ The section has the following parameters:
the application's backend source code.
-## stateOpts {#state_opts}
+## stateOpts {/* #state_opts */}
diff --git a/docs/reference/config/dev-server.mdx b/docs/reference/config/dev-server.mdx
index 1a3a6813..8c1dc866 100644
--- a/docs/reference/config/dev-server.mdx
+++ b/docs/reference/config/dev-server.mdx
@@ -12,7 +12,7 @@ Keep in mind that the `devServer` configuration does not change the `baseUrl`, w
-## Example Usage {#example}
+## Example Usage {/* #example */}
@@ -88,33 +88,33 @@ Keep in mind that the `devServer` configuration does not change the `baseUrl`, w
-### command {#command}
+### command {/* #command */}
Command to start the dev server. If not specified, the dev server will not be started.
-### reuseExisting {#reuseexisting}
+### reuseExisting {/* #reuseexisting */}
Reuse an existing dev server if it's already running, instead of spawning a new one. When enabled, Testplane will check if a server is already available at the specified URL before attempting to start a new one.
This option requires setting the `url` property in the `readinessProbe` section, which will be used to verify that the server is ready and accessible.
-### env {#env}
+### env {/* #env */}
Environment variables to be passed to the dev server process, in addition to the main process's `process.env`.
-### args {#args}
+### args {/* #args */}
Arguments to be passed to the dev server process.
-### cwd {#cwd}
+### cwd {/* #cwd */}
Working directory of the dev server.
-### logs {#logs}
+### logs {/* #logs */}
Enables streaming of dev server logs to the console with the prefix `[dev server]`.
-### readinessProbe {#readiness-probe}
+### readinessProbe {/* #readiness-probe */}
Check that the server is ready to accept requests. If not specified, the check is disabled.
diff --git a/docs/reference/config/last-failed.mdx b/docs/reference/config/last-failed.mdx
index a0b25de0..57928723 100644
--- a/docs/reference/config/last-failed.mdx
+++ b/docs/reference/config/last-failed.mdx
@@ -2,7 +2,7 @@ import LastFailedExample from "@site/docs/reference/config/_partials/examples/_l
# lastFailed
-## Overview {#overview}
+## Overview {/* #overview */}
Testplane can rerun tests that failed in the last run. To do this, it saves a JSON file with information about the failed tests after each run.
@@ -10,13 +10,13 @@ With the `lastFailed` section, you can configure the location of this file and o
To run only the failed tests from the CLI, use the `--last-failed-only` option or the environment variable `testplane_last_failed_only=true`.
-## Setup {#setup}
+## Setup {/* #setup */}
The `lastFailed` section has the following format:
-### Configuration Parameter Descriptions {#setup_description}
+### Configuration Parameter Descriptions {/* #setup_description */}
@@ -49,19 +49,19 @@ The `lastFailed` section has the following format:
-### only {#only}
+### only {/* #only */}
Enables the rerun mode for failed tests. In this mode, only tests from the list specified in `input` are run if set to `true`.
Default: `false`.
-### input {#input}
+### input {/* #input */}
Path or list of paths to read the list of failed tests. If a list of file paths is specified, all tests that appear in at least one of them are rerun.
Default: `.testplane/failed.json`.
-### output {#output}
+### output {/* #output */}
Path to save the list of failed tests. Always used, regardless of the `only` option.
diff --git a/docs/reference/config/main.mdx b/docs/reference/config/main.mdx
index daa05269..52bdf120 100644
--- a/docs/reference/config/main.mdx
+++ b/docs/reference/config/main.mdx
@@ -7,7 +7,7 @@ By default, when launched, Testplane looks for a `.testplane.conf.ts` or `testpl
You can specify your configuration file using the `--config` CLI option.
-## Setup {#setup}
+## Setup {/* #setup */}
To set up Testplane, you need to specify at least one browser:
@@ -17,7 +17,7 @@ As the number of tests in the project grows, you will likely need more advanced
-## Configuration Reference {#config_sections_description}
+## Configuration Reference {/* #config_sections_description */}
The only mandatory section in Testplane settings is the `browsers` section.
diff --git a/docs/reference/config/plugins.mdx b/docs/reference/config/plugins.mdx
index 291c0414..7626edb6 100644
--- a/docs/reference/config/plugins.mdx
+++ b/docs/reference/config/plugins.mdx
@@ -4,7 +4,7 @@ import RegisterWorkersExample from "@site/docs/reference/config/_partials/exampl
# plugins
-## Overview {#overview}
+## Overview {/* #overview */}
With the `plugins` section, you can connect external plugins to Testplane, which will expand the available functionality.
@@ -24,11 +24,11 @@ All plugins will be loaded before Testplane starts running tests.
If the plugin name starts with the prefix `testplane-`, this prefix can be omitted when adding the plugin to the `plugins` section. If there are modules with both names on the file system: _testplane-some-module_ and _some-module_, preference will be given to the module with the `testplane-` prefix.
-## Schematic Example {#example}
+## Schematic Example {/* #example */}
-## Testplane Instance Properties {#testplane_instance}
+## Testplane Instance Properties {/* #testplane_instance */}
diff --git a/docs/reference/config/prepare-browser.mdx b/docs/reference/config/prepare-browser.mdx
index 76bb5cbc..8ce661a7 100644
--- a/docs/reference/config/prepare-browser.mdx
+++ b/docs/reference/config/prepare-browser.mdx
@@ -3,7 +3,7 @@ import AddMultipleCommandsExample from "@site/docs/reference/config/_partials/ex
# prepareBrowser
-## Overview {#overview}
+## Overview {/* #overview */}
This parameter is a hook. The function specified for this parameter will be automatically called before running tests in the browser. The function receives a reference to the browser session as an argument.
@@ -13,7 +13,7 @@ The `prepareBrowser` hook is a perfect place to set up all of your custom comman
Read more about custom commands in [our guide](../../basic-guides/custom-commands.mdx).
-## Usage Examples {#example}
+## Usage Examples {/* #example */}
### Adding new browser commands or overwriting existing browser commands
diff --git a/docs/reference/config/prepare-environment.mdx b/docs/reference/config/prepare-environment.mdx
index 3de6895f..bba09e6f 100644
--- a/docs/reference/config/prepare-environment.mdx
+++ b/docs/reference/config/prepare-environment.mdx
@@ -2,12 +2,12 @@ import PrepareEnvironmentExample from "@site/docs/reference/config/_partials/exa
# prepareEnvironment
-## Overview {#overview}
+## Overview {/* #overview */}
This parameter is a hook. The function specified for this parameter will be automatically called after reading the Testplane config. With its help, you can set environment variables or, for example, supplement some config parameters.
The context of the function is the Testplane config.
-## Usage Example {#example}
+## Usage Example {/* #example */}
diff --git a/docs/reference/config/sets.mdx b/docs/reference/config/sets.mdx
index fa62033a..91eb31ab 100644
--- a/docs/reference/config/sets.mdx
+++ b/docs/reference/config/sets.mdx
@@ -3,7 +3,7 @@ import SetsExample from "@site/docs/reference/config/_partials/examples/_sets-ex
# sets
-## Overview {#overview}
+## Overview {/* #overview */}
You can use sets to bind a set of tests to specific browsers and run them all at once with the command `testplane --set `.
@@ -13,7 +13,7 @@ A set of tests is specified as an array of paths to them or to folders containin
If there are no sets in the config, or you do not specify them when running Testplane (see the “[Usage](#usage)” section), then all tests from the `testplane` folder will be run in all browsers specified in the [browsers][browsers] section of the Testplane config.
-## Setup {#setup}
+## Setup {/* #setup */}
The `sets` section has the following format:
@@ -21,7 +21,7 @@ The `sets` section has the following format:
Where `` is the name of the set used for its identification.
-### Sets Section Reference {#setup_description}
+### Sets Section Reference {/* #setup_description */}
@@ -65,13 +65,13 @@ Where `` is the name of the set used for its identification.
-## Setup Example {#setup_example}
+## Setup Example {/* #setup_example */}
In this example, the **common** set contains all tests in the `common` directory and will run in all browsers. The **desktop** set contains all tests in the `common` and `desktop` directories but will only run in `chrome` and `firefox`.
-## Usage {#usage}
+## Usage {/* #usage */}
Use the CLI option `--set` to specify a set when running tests.
diff --git a/docs/reference/config/system.mdx b/docs/reference/config/system.mdx
index 14a432d8..5072abf8 100644
--- a/docs/reference/config/system.mdx
+++ b/docs/reference/config/system.mdx
@@ -4,7 +4,7 @@ import TestRunEnvExample from "@site/docs/reference/config/_partials/examples/_s
# system
-## Overview {#overview}
+## Overview {/* #overview */}
The `system` section in Testplane settings is not mandatory.
@@ -23,7 +23,7 @@ Example configuration of the `system` section:
-## System Section Reference {#setup_description}
+## System Section Reference {/* #setup_description */}
@@ -104,13 +104,13 @@ Example configuration of the `system` section:
-### debug {#debug}
+### debug {/* #debug */}
Enables debug mode for WebDriver if set to `true`. In this mode, detailed information about each command sent to the browser will be output to the console.
Default: `false`.
-### expectOpts {#expect_opts}
+### expectOpts {/* #expect_opts */}
Options for [expect-webdriverio](https://webdriver.io/docs/api/expect-webdriverio/). Allows changing the timeout and interval between attempts to find an element.
@@ -123,7 +123,7 @@ const defaultExpectOpts = {
};
```
-### mochaOpts {#mocha_opts}
+### mochaOpts {/* #mocha_opts */}
Additional options for `mocha`, which are passed to `mocha.setup`. See the list of available options in the [Mocha documentation](https://mochajs.org/). Default: `{ timeout: 60000 }`.
@@ -140,7 +140,7 @@ export default {
} satisfies ConfigInput;
```
-### ctx {#ctx}
+### ctx {/* #ctx */}
Context that will be available in all tests via the `testplane.ctx` method. Intended for sharing some data between all tests without resorting to using global variables.
@@ -167,7 +167,7 @@ it("awesome test", function () {
Use _testplane.ctx_ in tests instead of global variables.
-### patternsOnReject {#patterns_on_reject}
+### patternsOnReject {/* #patterns_on_reject */}
The session will be closed if a test fails with an error matching one of the specified patterns in `patternsOnReject`. A new session will then be created to avoid infrastructure issues.
@@ -184,25 +184,25 @@ export default {
} satisfies ConfigInput;
```
-### workers {#workers}
+### workers {/* #workers */}
Testplane runs all tests in subprocesses to reduce CPU usage for the main process and avoid memory limitations for _Node.js._ This option sets the number of subprocesses that will be launched to run tests. Default: `1`.
-### testsPerWorker {#tests_per_worker}
+### testsPerWorker {/* #tests_per_worker */}
Maximum number of tests that will be run in one subprocess before the subprocess is restarted. Default: `Infinity`.
-### diffColor {#diff_color}
+### diffColor {/* #diff_color */}
Color for displaying the diff in visual checks using the [`browser.assertView`](../../../commands/browser/assertView) command.
Default: `"#ff00ff"`.
-### parallelLimit {#parallel_limit}
+### parallelLimit {/* #parallel_limit */}
By default, Testplane launches all browsers simultaneously. Sometimes (e.g., when using cloud services like [SauceLabs][sauce-labs]) you may need to limit the number of browsers that can be launched simultaneously. This option sets that limit. Default: `Infinity`.
-### fileExtensions {#file_extensions}
+### fileExtensions {/* #file_extensions */}
File extensions in which Testplane will search the file system for tests to run. Default: `[".js", ".mjs", ".ts", ".mts", ".jsx", ".tsx"]`.
diff --git a/docs/reference/testplane-api.mdx b/docs/reference/testplane-api.mdx
index 68d97d36..cc023929 100644
--- a/docs/reference/testplane-api.mdx
+++ b/docs/reference/testplane-api.mdx
@@ -34,11 +34,11 @@ A `Testplane` class instance has the following properties and methods:
-## config {#testplane_config}
+## config {/* #testplane_config */}
A testplane config object or a path to the configuration file, relative to the working folder: `process.cwd()`.
-## events {#testplane_events}
+## events {/* #testplane_events */}
[testplane Events][testplane-events] that you can subscribe to.
@@ -50,7 +50,7 @@ testplane.on(testplane.events.INIT, async () => {
});
```
-## errors {#testplane_errors}
+## errors {/* #testplane_errors */}
Testplane can return errors of the following types:
@@ -63,7 +63,7 @@ Testplane can return errors of the following types:
- [ImageDiffError](#testplane_errors_image_diff_error)
- [NoRefImageError](#testplane_errors_no_ref_image_error)
-### CoreError {#testplane_errors_core_error}
+### CoreError {/* #testplane_errors_core_error */}
The `CoreError` is returned in the case of a failed calibration of an empty page (`about:blank`) in the browser.
@@ -73,7 +73,7 @@ The error includes the following message:
Could not calibrate. This could be due to calibration page has failed to open properly
```
-### CancelledError {#testplane_errors_cancelled_error}
+### CancelledError {/* #testplane_errors_cancelled_error */}
The `CancelledError` is returned in case of emergency termination by the [halt](#testplane_halt) command.
@@ -83,7 +83,7 @@ The error includes the following message:
Browser request was cancelled
```
-### ClientBridgeError {#testplane_errors_client_bridge_error}
+### ClientBridgeError {/* #testplane_errors_client_bridge_error */}
The `ClientBridgeError` is returned in case of a failed JavaScript code injection on the client side (browser). Testplane performs code injection using the [execute][wdio-execute] command of WebDriverIO.
@@ -93,7 +93,7 @@ The error includes the following message:
Unable to inject client script
```
-### HeightViewportError {#testplane_errors_height_viewport_error}
+### HeightViewportError {/* #testplane_errors_height_viewport_error */}
The `HeightViewportError` is returned when trying to capture a screenshot of an area whose bottom bound does not fit into the viewport.
@@ -110,7 +110,7 @@ Viewport size: , .
The message advises the testplane user on what settings to configure in testplane to be able to capture the screenshot of the specified area.
-### OffsetViewportError {#testplane_errors_offset_viewport_error}
+### OffsetViewportError {/* #testplane_errors_offset_viewport_error */}
The `OffsetViewportError` is returned when trying to capture a screenshot of an area whose left, right, or top bounds go beyond the viewport.
@@ -130,7 +130,7 @@ option "allowViewportOverflow" in "assertView" command.
The message advises the testplane user on what settings to configure in testplane to be able to capture the screenshot of the specified area.
-### AssertViewError {#testplane_errors_assert_view_error}
+### AssertViewError {/* #testplane_errors_assert_view_error */}
The `AssertViewError` is returned in case of a failed attempt to capture a screenshot.
@@ -148,7 +148,7 @@ element ("") still not existing after ms
element ("") still not existing after ms
```
-### ImageDiffError {#testplane_errors_image_diff_error}
+### ImageDiffError {/* #testplane_errors_image_diff_error */}
The `ImageDiffError` is returned from the `assertView` command if a difference (diff) is found when capturing and comparing the screenshot with the reference screenshot.
@@ -192,7 +192,7 @@ exports.handleImageDiff = (currImg, refImg, state, opts) => {
};
```
-### NoRefImageError {#testplane_errors_no_ref_image_error}
+### NoRefImageError {/* #testplane_errors_no_ref_image_error */}
The `NoRefImageError` is returned from the `assertView` command if testplane does not find the reference screenshot on the filesystem when capturing and comparing the screenshot.
@@ -216,7 +216,7 @@ Additionally, the `NoRefImageError` contains the following data:
-## intercept {#testplane_intercept}
+## intercept {/* #testplane_intercept */}
A function that allows you to subscribe to testplane [event interception][testplane-events-interception].
@@ -232,7 +232,7 @@ testplane.intercept(testplane.events.TEST_FAIL, ({ event, data }) => {
Read more about event interception in the section "[About Event Interception][testplane-events-interception]".
-## init {#testplane_init}
+## init {/* #testplane_init */}
Initializes the testplane instance, loads all plugins, etc.
@@ -242,7 +242,7 @@ Initializes the testplane instance, loads all plugins, etc.
await testplane.init();
```
-## run {#testplane_run}
+## run {/* #testplane_run */}
Runs tests located at the specified paths.
@@ -273,7 +273,7 @@ All parameters of the `testplane.run()` method are optional.
-## addTestToRun {#testplane_add_test_to_run}
+## addTestToRun {/* #testplane_add_test_to_run */}
Adds a test to the current run. Returns `false` if the current run is already finished or cancelled. Otherwise, returns `true`.
@@ -298,7 +298,7 @@ All parameters are required.
-## readTests {#testplane_read_tests}
+## readTests {/* #testplane_read_tests */}
An asynchronous method that returns an object of type [TestCollection](#test_collection).
@@ -326,7 +326,7 @@ await testplane.readTests(testPaths, options);
-## isFailed {#testplane_is_failed}
+## isFailed {/* #testplane_is_failed */}
Returns `true` or `false` depending on whether there was an error or test failure during the test run. Might be useful in plugins to determine the current status of testplane.
@@ -336,7 +336,7 @@ Returns `true` or `false` depending on whether there was an error or test failur
const failed = testplane.isFailed();
```
-## isWorker {#testplane_is_worker}
+## isWorker {/* #testplane_is_worker */}
Returns `true` if the method was called from a testplane worker.
Returns `false` if the method was called from the testplane master process.
@@ -356,7 +356,7 @@ module.exports = testplane => {
};
```
-## halt {#testplane_halt}
+## halt {/* #testplane_halt */}
Forcibly terminates the test run in case of a critical error. If the process cannot gracefully shut down within the specified timeout, it will be forcibly terminated unless the timeout is explicitly set to `0`.
@@ -379,11 +379,11 @@ testplane.halt(error, [timeout=60000ms]);
-## Test Collection {#test_collection}
+## Test Collection {/* #test_collection */}
An object of type `TestCollection` is returned by the [testplane.readTests](#testplane_read_tests) method and is also passed as an argument to the handler of the [AFTER_TESTS_READ][after-tests-read] event.
-### getBrowsers {#test_collection_get_browsers}
+### getBrowsers {/* #test_collection_get_browsers */}
Returns a list of browsers for which tests are available in the collection.
@@ -393,7 +393,7 @@ Returns a list of browsers for which tests are available in the collection.
const browsers = testCollection.getBrowsers();
```
-### mapTests {#test_collection_map_tests}
+### mapTests {/* #test_collection_map_tests */}
Builds a mapping of tests for the specified browser.
@@ -407,7 +407,7 @@ const tests = testCollection.mapTests(browserId, (test, browserId) => {
If the browser is not specified (i.e., a callback is passed as the first argument), the mapping will be built for all browsers.
-### sortTests {#test_collection_sort_tests}
+### sortTests {/* #test_collection_sort_tests */}
Sorts tests for the specified browser.
@@ -421,7 +421,7 @@ testCollection.sortTests(browserId, (currentTest, nextTest) => {
If the browser is not specified (i.e., a callback is passed as the first argument), the sorting will be applied to all browsers.
-### eachTest {#test_collection_each_test}
+### eachTest {/* #test_collection_each_test */}
Iterates through the tests for the specified browser.
@@ -435,7 +435,7 @@ testCollection.eachTest(browserId, (test, browserId) => {
If the browser is not specified (i.e., a callback is passed as the first argument), the iteration will occur for tests in all browsers.
-### eachTestByVersions {#test_collection_each_test_by_versions}
+### eachTestByVersions {/* #test_collection_each_test_by_versions */}
Iterates through the tests and browser versions for the specified browser.
@@ -449,7 +449,7 @@ testCollection.eachTestByVersions(browserId, (test, browserId, browserVersion) =
});
```
-### disableAll {#test_collection_disable_all}
+### disableAll {/* #test_collection_disable_all */}
Disables all tests or tests for the specified browser. Returns a reference to the test collection instance.
@@ -467,7 +467,7 @@ disableAll(browserId);
If the browser is not specified, all tests will be disabled.
-### enableAll {#test_collection_enable_all}
+### enableAll {/* #test_collection_enable_all */}
Enables all tests or tests for the specified browser. Returns a reference to the test collection instance.
@@ -485,7 +485,7 @@ enableAll(browserId);
If the browser is not specified, all tests will be enabled.
-### disableTest {#test_collection_disable_test}
+### disableTest {/* #test_collection_disable_test */}
Disables the specified test in all browsers or only in the specified browser. Returns a reference to the test collection instance.
@@ -503,7 +503,7 @@ disableTest(fullTitle, browserId);
The test is identified by its full title: `fullTitle`.
-### enableTest {#test_collection_enable_test}
+### enableTest {/* #test_collection_enable_test */}
Enables the specified test in all browsers or only in the specified browser.
@@ -517,7 +517,7 @@ or
enableTest(fullTitle, browserId);
```
-### getRootSuite {#test_collection_get_root_suite}
+### getRootSuite {/* #test_collection_get_root_suite */}
Returns the root suite for the specified browser. Returns undefined if there are no tests for the specified browser in the collection.
@@ -527,7 +527,7 @@ Returns the root suite for the specified browser. Returns undefined if there are
const rootSuite = getRootSuite(browserId);
```
-### eachRootSuite {#test_collection_each_root_suite}
+### eachRootSuite {/* #test_collection_each_root_suite */}
Iterates through all root suites in the collection that have tests.
diff --git a/docs/reference/testplane-events.mdx b/docs/reference/testplane-events.mdx
index 9c543322..82d00d6a 100644
--- a/docs/reference/testplane-events.mdx
+++ b/docs/reference/testplane-events.mdx
@@ -2,9 +2,9 @@ import Admonition from "@theme/Admonition";
# Testplane Events
-## Overview {#overview}
+## Overview {/* #overview */}
-### How event descriptions are organized {#how_is_events_description_made}
+### How event descriptions are organized {/* #how_is_events_description_made */}
Below are described all the Testplane events you can subscribe to in your plugin.
@@ -22,7 +22,7 @@ Next are:
- the event handler parameters;
- and optionally, examples of using this event in a plugin or plugins.
-### Event generation scheme {#events_scheme}
+### Event generation scheme {/* #events_scheme */}
[//]: # "
+
+
+