Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update time travel guide with new package versions #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions docs/guides/time-travel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ The Time Travel mode is a new Testplane UI tool that allows you to observe test
recommend waiting for the stable version.
</Admonition>

1. Install the alpha versions of `testplane` and `html-reporter`:
1. Install a fresh versions of `testplane` and `html-reporter`:

```shell
npm i -D testplane@8.26.0 [email protected].0
npm i -D testplane@8.27.1 [email protected].2
```

2. Enable snapshot recording in the Testplane config:

```typescript
export = {
/* ... */
record: "on",
record: "on", // You can also use "last-failed-run", "retries-only", "off"
};
```

Expand All @@ -54,10 +54,13 @@ To debug the layout, you can use the browser's DevTools. All selectors and attri

## Configuring Time Travel

Currently, snapshot recording is controlled via the `record` option in the Testplane config. It supports two values: `"on"` (snapshots will be recorded for every test run) and `"off"` (snapshots are completely disabled).
Currently, snapshot recording is controlled via the `record` option in the Testplane config. It supports the following values:

- `"on"` - snapshots will be recorded for every test run
- `"last-failed-run"` - snapshots will be saved only for the last failed run
- `"retries-only"` - snapshots will be recorded only for the retries
- `"off"` - snapshots are completely disabled

<Admonition type="info">
In the near future, smarter recording modes will be available, such as "only on failure" or
"enabled during retries." Additionally, network request debugging and full-screen mode will soon
be available.
In the near future, network request debugging and full-screen mode will soon be available.
</Admonition>
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ import Admonition from "@theme/Admonition";
использования в production рекомендуем дождаться stable версии.
</Admonition>

1. Необходимо установить alpha-версии `testplane` и `html-reporter`:
1. Необходимо установить свежие версии `testplane` и `html-reporter`:

```shell
npm i -D testplane@8.26.0 [email protected].0
npm i -D testplane@8.27.1 [email protected].2
```

2. Включить запись снапшотов в конфиге testplane:

```typescript
export = {
/* ... */
record: "on",
record: "on", // Также поддерживаются "last-failed-run", "retries-only", "off"
};
```

Expand All @@ -54,10 +54,13 @@ import Admonition from "@theme/Admonition";

## Настройка Time Travel

В данный момент всё управление записью снапшотов происходит с помощью опции `record` в конфиге Testplane. Поддержано 2 значения: `"on"` (снапшоты будут записываться на каждый запуск теста) и `"off"` (снапшоты полностью отключены).
В данный момент всё управление записью снапшотов происходит с помощью опции `record` в конфиге Testplane. Поддерживаются следующие значения:

- `"on"` - снапшоты будут записываться на каждый запуск теста
- `"last-failed-run"` - снапшоты будут сохраняться только для последнего запуска теста с ошибкой
- `"retries-only"` - снапшоты будут записываться только для ретраев
- `"off"` - снапшоты полностью отключены

<Admonition type="info">
В самом ближайшем будущем появятся более умные режимы записи снапшотов, такие, как "только при
падении" или "включить при ретраях". Помимо этого скоро станет доступна отладка сетевых запросов
и полноэкранный режим.
В самом ближайшем будущем станет доступна отладка сетевых запросов и полноэкранный режим.
</Admonition>