From fbc6e90e13c121a32d5ddfe2716d5e2031cd0dc9 Mon Sep 17 00:00:00 2001 From: shadowusr <58862284+shadowusr@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:45:21 +0300 Subject: [PATCH] fix: fix broken links and anchors, translate main page (#12) * fix: fix broken links and anchors, translate main page * fix: consistent font size across headers and other blocks --- docs/commands/expect/element-matchers.mdx | 4 +- docs/config/system.mdx | 2 +- docs/index.mdx | 4 +- .../how-to-upgrade-hermione-to-4.mdx | 8 +- .../how-to-upgrade-hermione-to-5.mdx | 12 +- .../how-to-upgrade-hermione-to-6.mdx | 2 +- docs/plugins/testplane-chunks.mdx | 2 +- .../{hermione-api.mdx => testplane-api.mdx} | 2 +- docusaurus.config.ts | 6 +- .../current/config/system.mdx | 2 +- .../current/index.mdx | 119 ++++++++++++++++++ .../current/plugins/testplane-chunks.mdx | 2 +- .../plugins/testplane-retry-command.mdx | 2 +- src/scss/custom.scss | 24 +++- 14 files changed, 163 insertions(+), 28 deletions(-) rename docs/reference/{hermione-api.mdx => testplane-api.mdx} (99%) diff --git a/docs/commands/expect/element-matchers.mdx b/docs/commands/expect/element-matchers.mdx index 21f9e13..92174fc 100644 --- a/docs/commands/expect/element-matchers.mdx +++ b/docs/commands/expect/element-matchers.mdx @@ -318,7 +318,7 @@ await expect(elem).toBeDisplayedInViewport(); ## toHaveChildren -Проверяет количество дочерних элементов заданного элемента, используя команду [element.$('./\*')](../element/_dollar). +Проверяет количество дочерних элементов заданного элемента, используя команду [element.$('./\*')](../element/$). Например: @@ -337,7 +337,7 @@ await expect(list).toHaveChildren({ eq: 3 }); ## toBeElementsArrayOfSize -Проверяет количество полученных элементов с помощью команды [$$](../element/_dollardollar). +Проверяет количество полученных элементов с помощью команды [$$](../element/$$). Например: diff --git a/docs/config/system.mdx b/docs/config/system.mdx index cb4f33b..6326856 100644 --- a/docs/config/system.mdx +++ b/docs/config/system.mdx @@ -92,7 +92,7 @@ module.exports = { }; ``` -### ctx {#setup_ctx} +### ctx {#ctx} Контекст, который будет доступен во всех тестах через метод `testplane.ctx`. Предназначен для совместного использования каких-либо данных между всеми тестами, без необходимости прибегать к использованию глобальных переменных. diff --git a/docs/index.mdx b/docs/index.mdx index 0c3f54c..3334ef0 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -110,11 +110,11 @@ [testplane-plugins-profiler]: https://github.com/gemini-testing/testplane-plugins-profiler [how-to-test-layout-under-login]: ./guides/how-to-test-layout-under-login [how-to-read-browser-logs]: ./guides/how-to-read-browser-logs -[prepare-browser]: ./config/main#config_prepare_browser +[prepare-browser]: ./config/prepare-browser [defaults]: ./config/browsers#timeouts [commands]: ./commands/overview [html-reporter]: ./html-reporter/html-reporter-setup -[html-reporter-diff]: ./html-reporter/html-reporter-setup#setup_diff_mode +[html-reporter-diff]: ./html-reporter/html-reporter-setup#diffmode [html-reporter-gui]: ./html-reporter/html-reporter-commands#gui [plugins]: https://github.com/gemini-testing/ [testplane-events]: ./reference/testplane-events diff --git a/docs/migrations/how-to-upgrade-hermione-to-4.mdx b/docs/migrations/how-to-upgrade-hermione-to-4.mdx index 6837ecc..d8fde70 100644 --- a/docs/migrations/how-to-upgrade-hermione-to-4.mdx +++ b/docs/migrations/how-to-upgrade-hermione-to-4.mdx @@ -459,10 +459,10 @@ npm uninstall hermione-codemod [webdriverio]: https://webdriver.io [webdriverio-api]: https://webdriver.io/docs/api [webdriverio-v4-api]: http://v4.webdriver.io/api.html -[browser-dollar]: ../commands/browser/_dollar -[browser-dollar-dollar]: ../commands/browser/_dollardollar -[element-dollar]: ../commands/element/_dollar -[element-dollar-dollar]: ../commands/element/_dollardollar +[browser-dollar]: ../commands/browser/$ +[browser-dollar-dollar]: ../commands/browser/$$ +[element-dollar]: ../commands/element/$ +[element-dollar-dollar]: ../commands/element/$$ [element-wait-for-exist]: ../commands/element/waitForExist [browser-react-dollar]: ../commands/browser/reactDollar [browser-react-dollar-dollar]: ../commands/browser/reactDollarDollar diff --git a/docs/migrations/how-to-upgrade-hermione-to-5.mdx b/docs/migrations/how-to-upgrade-hermione-to-5.mdx index 2b03bb0..9dd002c 100644 --- a/docs/migrations/how-to-upgrade-hermione-to-5.mdx +++ b/docs/migrations/how-to-upgrade-hermione-to-5.mdx @@ -60,13 +60,13 @@ import Admonition from "@theme/Admonition"; [how-to-upgrade-hermione-to-4]: ../migrations/how-to-upgrade-hermione-to-4 [config-browsers]: ../config/browsers [hermione-teamcity-reporter]: https://github.com/gemini-testing/hermione-teamcity-reporter -[before-file-read]: ../reference/hermione-events#before_file_read -[event-suite-begin]: ../reference/hermione-events#suite_begin -[event-test-begin]: ../reference/hermione-events#test_begin -[test-parser]: ../reference/hermione-events#test_parser -[hermione-events]: ../reference/hermione-events +[before-file-read]: ../reference/testplane-events#before_file_read +[event-suite-begin]: ../reference/testplane-events#suite_begin +[event-test-begin]: ../reference/testplane-events#test_begin +[test-parser]: ../reference/testplane-events#test_parser +[hermione-events]: ../reference/testplane-events [antialiasing-tolerance]: ../config/browsers#antialiasing_tolerance -[composite-image]: .../config/browsers#composite_image +[composite-image]: ../config/browsers#composite_image [take-screenshot-on-fails-assert-view-fail]: ../config/browsers#take_screenshot_on_fails [take-screenshot-on-fails-mode]: ../config/browsers#take_screenshot_on_fails_mode [take-screenshot-on-fails-timeout]: ../config/browsers#take_screenshot_on_fails_timeout diff --git a/docs/migrations/how-to-upgrade-hermione-to-6.mdx b/docs/migrations/how-to-upgrade-hermione-to-6.mdx index 56e2c10..018a3bb 100644 --- a/docs/migrations/how-to-upgrade-hermione-to-6.mdx +++ b/docs/migrations/how-to-upgrade-hermione-to-6.mdx @@ -47,5 +47,5 @@ module.exports = { [how-to-upgrade-hermione-to-4]: ../migrations/how-to-upgrade-hermione-to-4 [how-to-upgrade-hermione-to-5]: ../migrations/how-to-upgrade-hermione-to-5 [browser-ws-endpoint]: ../config/browsers#browser_ws_endpoint -[how-to-use-cdp]: ../guides/how-to-use-cdp.md +[how-to-use-cdp]: ../guides/how-to-use-cdp [gh-issues]: https://github.com/gemini-testing/testplane/issues diff --git a/docs/plugins/testplane-chunks.mdx b/docs/plugins/testplane-chunks.mdx index cfe03fb..9a869d7 100644 --- a/docs/plugins/testplane-chunks.mdx +++ b/docs/plugins/testplane-chunks.mdx @@ -107,7 +107,7 @@ testplane_chunks_count=10 testplane_chunks_run=1 npx testplane ... - [Что такое идемпотентность?][idempotence] [html-reporter]: ../html-reporter/html-reporter-setup -[merge-reports]: ../html-reporter/html-reporter-commands#merge_reports +[merge-reports]: ../html-reporter/html-reporter-commands#merge-reports [testplane-chunks]: https://github.com/gemini-testing/testplane-chunks [cli]: https://ru.wikipedia.org/wiki/Интерфейс_командной_строки [idempotence]: https://ru.wikipedia.org/wiki/Идемпотентность diff --git a/docs/reference/hermione-api.mdx b/docs/reference/testplane-api.mdx similarity index 99% rename from docs/reference/hermione-api.mdx rename to docs/reference/testplane-api.mdx index 13ad483..ac1b76b 100644 --- a/docs/reference/hermione-api.mdx +++ b/docs/reference/testplane-api.mdx @@ -542,7 +542,7 @@ eachRootSuite((root, browserId) => { ``` [after-tests-read]: ./testplane-events#after_tests_read -[testplane-events]: ./testplane-events.nd +[testplane-events]: ./testplane-events [wdio-execute]: ../commands/browser/execute [diff-bounds]: https://github.com/gemini-testing/looks-same/blob/master/README.md#getting-diff-bounds [diff-clusters]: https://github.com/gemini-testing/looks-same/blob/master/README.md#getting-diff-clusters diff --git a/docusaurus.config.ts b/docusaurus.config.ts index d5ca8c9..be6b0c6 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -42,7 +42,7 @@ const config: Config = { { docs: { sidebarPath: "./sidebars.ts", - editUrl: "https://github.com/gemini-testing/testplane-docs/tree/main/docs/", + editUrl: "https://github.com/gemini-testing/testplane-docs/tree/master/", lastVersion: "current", versions: { current: { @@ -53,7 +53,7 @@ const config: Config = { }, blog: { showReadingTime: true, - editUrl: "https://github.com/gemini-testing/testplane-docs/tree/main/blog/", + editUrl: "https://github.com/gemini-testing/testplane-docs/tree/master/", }, theme: { customCss: "./src/scss/custom.scss", @@ -136,7 +136,7 @@ const config: Config = { items: [ { label: "Testplane API", - href: "/docs/v8/reference/hermione-api", + href: "/docs/v8/reference/testplane-api", }, { label: "Testplane events", diff --git a/i18n/en/docusaurus-plugin-content-docs/current/config/system.mdx b/i18n/en/docusaurus-plugin-content-docs/current/config/system.mdx index ff76512..0db22ae 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/config/system.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/config/system.mdx @@ -92,7 +92,7 @@ module.exports = { }; ``` -### ctx {#setup_ctx} +### ctx {#ctx} The context you can get in all tests via the `testplane.ctx` method. Designed to share any data between all tests, without having to use global variables. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/index.mdx b/i18n/en/docusaurus-plugin-content-docs/current/index.mdx index a8d03c4..2f93607 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/index.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/index.mdx @@ -5,3 +5,122 @@ sidebar_position: 1 # Overview **Testplane** — a tool for automating testing of user scenarios in web interfaces. + +With Testplane, you can test the functionality of your site or project and ensure that your layout consistently matches what's expected under any circumstances. At your disposal, you have the full range of [commands][commands] provided by [WebDriverIO v8][webdriverio-api] and [all the capabilities of the Chrome DevTools protocol][how-to-use-cdp]. Additionally, you have the familiar [Mocha][mocha] syntax. + +Is your testing workload growing as your project evolves? — Testplane allows you to easily scale your test runs without losing usability. It not only runs tests in parallel, across different browsers and platforms, but also gathers all the test results into a single HTML report with flexible viewing, grouping, and filtering capabilities. + +Lacking some functionality? — Not an issue! You can write your own plugin to address your needs with maximum efficiency. Or find an existing plugin and add it to your project. + +And that’s not all. + +## Why Testplane? {#why-testplane} + +- [Easy Setup and Great Features](#easystart_great_features) +- [Fast Test Execution](#fast) +- [Flexible Test Running](#flexible) +- [Smart Error Handling](#smart) +- [Detailed Test Run Report](#user_friendly) +- [Interactive Test Running](#interactive) +- [Rich Debugging Capabilities](#debuggable) +- [Extensibility](#extendable) + +### Easy Setup and Great Features {#easystart_great_features} + +- quickly create a project using [create-testplane][create-testplane]; +- all key parameters have [optimal defaults][defaults]; +- easy to write tests based on [Mocha][mocha]; +- a wide [range of commands][commands], powered by [WebdriverIO v8][webdriverio-api]; +- a robust [assertView][assert-view] command for taking and comparing screenshots; +- flexible [parameters management][assert-view-opts] for individual tests when comparing screenshots; +- specify areas to ignore when taking screenshots; +- automatic stitching of large images that exceed the viewport. + +### Fast Test Execution {#fast} + +- thanks to [parallelism within Testplane][testplane-workers]; +- scale using [testplane-chunks][testplane-chunks]; +- [reusing sessions][sessions-reuse]; +- session caching with browsers; +- 20,000 tests in 10 minutes. + +### Flexible Test Running {#flexible} + +- in a specific browser; +- [across platforms (sets)][testplane-sets] — on desktop and mobile browsers; +- [by matching patterns][testplane-option-grep]; +- [from a specific file][how-to-run-test-in-file]; +- [a set number of times to check stability][how-to-check-test-stability]; +- [helpers only.in, only.notIn, skip.in, skip.notIn][how-to-skip-tests]. + +### Smart Error Handling {#smart} + +- [reject sessions that fail with specific error patterns][patterns-on-reject]; +- [retries with time and count limits][retry-limiter]; +- [retries for infrastructure errors][retry-progressive]. + +### Detailed Test Run Report {#user_friendly} + +- can display [results of tens of thousands of tests simultaneously][html-reporter]; +- stays responsive regardless of volume; +- provides complete information about the test run: retries, meta-information, screenshots, logs, etc.; +- screenshot diff viewing in [6 modes][html-reporter-diff], including _switch, swipe_, and _onion skin_; +- history of commands executed during the test is available; +- if a test fails, the error message and stack trace are saved; +- [flexible viewing, grouping, and filtering options][html-reporter-gui]. + +### Interactive Test Running {#interactive} + +- run tests directly from the report in [GUI mode][html-reporter-gui]; +- all reporting features listed above are available; +- [ability to integrate additional controls][html-reporter-plugins] for GUI mode from other plugins; +- accelerated screenshot updating; + +### Rich Debugging Capabilities {#debuggable} + +- [DevTools in CDP mode][how-to-use-cdp]; +- [Testplane profiling][testplane-profiler]; +- [plugin profiling][testplane-plugins-profiler]. + +### Extensibility {#extendable} + +- [easily add your own commands][prepare-browser]; +- dozens of [ready-made plugins][plugins]; +- write your own plugin to implement any functionality; +- [over 20 events you can subscribe to][testplane-events]; +- available [extension points][html-reporter-extension-points] in the testplane report; +- [extend the Testplane CLI from your plugin][testplane-cli], adding new commands and options. + +[create-testplane]: https://github.com/gemini-testing/create-testplane +[webdriverio-api]: https://webdriver.io/docs/api +[mocha]: https://mochajs.org +[testplane-chunks]: ./plugins/testplane-chunks +[testplane-option-grep]: ./guides/how-to-run-specified-test#solution_2 +[how-to-run-test-in-file]: ./guides/how-to-run-specified-test#solution_1 +[how-to-skip-tests]: ./guides/how-to-skip-test-in-browsers +[how-to-check-test-stability]: ./guides/how-to-check-test-stability +[testplane-sets]: ./config/sets +[retry-limiter]: ./plugins/retry-limiter +[retry-progressive]: ./plugins/testplane-retry-progressive +[sharp]: https://github.com/lovell/sharp +[sessions-reuse]: ./config/browsers#tests_per_session +[patterns-on-reject]: ./config/system#patterns_on_reject +[assert-view-opts]: ./config/browsers#assert_view_opts +[assert-view]: ./commands/browser/assertView +[how-to-use-cdp]: ./guides/how-to-use-cdp +[testplane-profiler]: https://github.com/gemini-testing/testplane-profiler +[testplane-plugins-profiler]: https://github.com/gemini-testing/testplane-plugins-profiler +[how-to-test-layout-under-login]: ./guides/how-to-test-layout-under-login +[how-to-read-browser-logs]: ./guides/how-to-read-browser-logs +[prepare-browser]: ./config/prepare-browser +[defaults]: ./config/browsers#timeouts +[commands]: ./commands/overview +[html-reporter]: ./html-reporter/html-reporter-setup +[html-reporter-diff]: ./html-reporter/html-reporter-setup#diffmode +[html-reporter-gui]: ./html-reporter/html-reporter-commands#gui +[plugins]: https://github.com/gemini-testing/ +[testplane-events]: ./reference/testplane-events +[html-reporter-extension-points]: ./html-reporter/html-reporter-plugins#extension_points +[testplane-cli]: ./reference/testplane-events#cli +[html-reporter-plugins]: ./html-reporter/html-reporter-plugins +[testplane-workers]: ./config/system#workers diff --git a/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-chunks.mdx b/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-chunks.mdx index 1f939f5..7f9772a 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-chunks.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-chunks.mdx @@ -106,7 +106,7 @@ testplane_chunks_count=10 testplane_chunks_run=1 npx testplane ... - [What is idempotence?][idempotence] [html-reporter]: ../html-reporter/html-reporter-setup -[merge-reports]: ../html-reporter/html-reporter-commands#merge_reports +[merge-reports]: ../html-reporter/html-reporter-commands#merge-reports [testplane-chunks]: https://github.com/gemini-testing/testplane-chunks [cli]: https://en.wikipedia.org/wiki/Command-line_interface [idempotence]: https://en.wikipedia.org/wiki/Idempotence diff --git a/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-retry-command.mdx b/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-retry-command.mdx index 463b8a9..cd93773 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-retry-command.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/plugins/testplane-retry-command.mdx @@ -119,4 +119,4 @@ testplane_retry_command_count=3 npx testplane [testplane-retry-command]: https://github.com/gemini-testing/testplane-retry-command [take-screenshot]: https://webdriver.io/docs/api/webdriver/#takescreenshot -[assert-view]: ../reference/tests-api#command_assert_view +[assert-view]: ../commands/browser/assertView diff --git a/src/scss/custom.scss b/src/scss/custom.scss index ebbb655..d447fb9 100644 --- a/src/scss/custom.scss +++ b/src/scss/custom.scss @@ -1,16 +1,29 @@ @tailwind base; @layer base { + h1, + h2, + h3, + h4, + h5, + h6 { + @apply mb-3 text-lg font-medium; + } + h1 { - @apply mb-4 text-4xl font-medium; + @apply mb-4 text-4xl; } h2 { - @apply mb-4 text-3xl font-medium; + @apply mb-4 text-3xl; } h3 { - @apply mb-3 text-xl font-medium; + @apply text-2xl; + } + + h4 { + @apply text-xl; } p { @@ -133,7 +146,10 @@ .theme-doc-markdown, article { - p { + p, + ul, + ol, + table { font-size: theme("fontSize.lg"); }