diff --git a/Bunoshfile.js b/Bunoshfile.js index 3fb4274c6..5e19f5748 100644 --- a/Bunoshfile.js +++ b/Bunoshfile.js @@ -9,6 +9,7 @@ const documentjsCliArgs = '-f md --shallow --markdown-toc=false --sort-order=alp const helperMarkDownFile = name => `docs/helpers/${name}.md` const pluginMarkDownFile = name => `docs/plugins/${name}.md` +const pluginSlug = name => name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase() /** * Generate all documentation (helpers, plugins and external helpers in parallel). @@ -83,7 +84,7 @@ export async function docsPlugins() { await writeToFile(pluginMarkDownFile(name), line => { line`--- -permalink: /plugins/${name} +permalink: /plugins/${pluginSlug(name)} editLink: false sidebar: auto title: ${name} @@ -106,7 +107,7 @@ title: ${name} line`CodeceptJS bundles the following plugins. Each plugin has its own page with full configuration reference.` line`` for (const { name, summary } of index) { - line`## [${name}](/plugins/${name})` + line`## [${name}](/plugins/${pluginSlug(name)})` line`` if (summary) line`${summary}` line`` diff --git a/docs/assertions.md b/docs/assertions.md index 5707fb09d..fde963bbe 100644 --- a/docs/assertions.md +++ b/docs/assertions.md @@ -466,7 +466,7 @@ helpers: { } ``` -A failed decision is not retried by the [retryFailedStep](/plugins/retryFailedStep) plugin: asking again would cost another request and return the same answer. Only connection errors and timeouts are retried. +A failed decision is not retried by the [retryFailedStep](/plugins/retry-failed-step) plugin: asking again would cost another request and return the same answer. Only connection errors and timeouts are retried. Use decision assertions for what a page means, and built-in assertions for exact values. `I.see('Total: $42.00')` is still the right check for a price. diff --git a/docs/best.md b/docs/best.md index 3fd83ede9..143d42a7c 100644 --- a/docs/best.md +++ b/docs/best.md @@ -38,7 +38,7 @@ To write simpler and effective tests we encourage to use short cuts. Make test be focused on one feature and try to simplify everything that is not related directly to test. * If data is required for a test, try to create that data via API. See how to do it in [Data Management](/data) chapter. -* If user login is required, use [autoLogin plugin](/plugins#autoLogin) instead of putting login steps inside a test. +* If user login is required, use [auth plugin](/plugins#auth) instead of putting login steps inside a test. * Break a long test into few. Long test can be fragile and complicated to follow and update. * Use [custom steps and page objects](/pageobjects) to hide steps which are not relevant to current test. diff --git a/docs/plugins.md b/docs/plugins.md index 530284afb..b75cc1432 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -9,7 +9,7 @@ title: Plugins CodeceptJS bundles the following plugins. Each plugin has its own page with full configuration reference. -## [aiTrace](/plugins/aiTrace) +## [aiTrace](/plugins/ai-trace) Generates AI-friendly trace files for debugging with AI agents. This plugin creates a markdown file with test execution logs and links to all artifacts (screenshots, HTML, ARIA snapshots, browser logs, HTTP requests) for each step. @@ -21,7 +21,7 @@ Uses AI to analyze test failures and provide insights Logs user in for the first test and reuses session for next tests. Works by saving cookies into memory or file. If a session expires automatically logs in again. -## [autoDelay](/plugins/autoDelay) +## [autoDelay](/plugins/auto-delay) Sometimes it takes some time for a page to respond to user's actions. Depending on app's performance this can be either slow or fast. @@ -33,11 +33,11 @@ Overrides browser helper config from the command line. Works for all browser hel Dumps code coverage from Playwright/Puppeteer after every test. -## [customLocator](/plugins/customLocator) +## [customLocator](/plugins/custom-locator) Creates a [custom locator][1] by using special attributes in HTML. -## [customReporter](/plugins/customReporter) +## [customReporter](/plugins/custom-reporter) Sample custom reporter for CodeceptJS. @@ -49,11 +49,11 @@ Exposes properties from helper instances as injectable test arguments. Use it to Self-healing tests with AI. -## [junitReporter](/plugins/junitReporter) +## [junitReporter](/plugins/junit-reporter) Generates a JUnit-compatible XML report after a test run. -## [pageInfo](/plugins/pageInfo) +## [pageInfo](/plugins/page-info) Collects information from web page after each failed test and adds it to the test as an artifact. It is suggested to enable this plugin if you run tests on CI and you need to debug failed tests. This plugin can be paired with `analyze` plugin to provide more context. @@ -61,11 +61,11 @@ Collects information from web page after each failed test and adds it to the tes Pauses test execution interactively. Replaces the legacy `pauseOnFail` plugin. The default `on=fail` matches the old `pauseOnFail` behavior. -## [pauseOnFail](/plugins/pauseOnFail) +## [pauseOnFail](/plugins/pause-on-fail) Starts an interactive pause when a test fails. -## [retryFailedStep](/plugins/retryFailedStep) +## [retryFailedStep](/plugins/retry-failed-step) Retries each failed step in a test. @@ -77,7 +77,7 @@ Records a video of tests. Uses Playwright's `page.screencast` API (WebM) when th Saves screenshots from the browser at points triggered by `on=`. -## [screenshotOnFail](/plugins/screenshotOnFail) +## [screenshotOnFail](/plugins/screenshot-on-fail) Saves a screenshot when a test fails. @@ -85,7 +85,7 @@ Saves a screenshot when a test fails. Collects all pages visited while tests are running and saves them as a [sitemap][1] XML file. -## [stepTimeout](/plugins/stepTimeout) +## [stepTimeout](/plugins/step-timeout) Set timeout for test steps globally. diff --git a/docs/plugins/aiTrace.md b/docs/plugins/aiTrace.md index 04fc78104..e4871cdd8 100644 --- a/docs/plugins/aiTrace.md +++ b/docs/plugins/aiTrace.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/aiTrace +permalink: /plugins/ai-trace editLink: false sidebar: auto title: aiTrace diff --git a/docs/plugins/autoDelay.md b/docs/plugins/autoDelay.md index 7d12346b8..c01c084e6 100644 --- a/docs/plugins/autoDelay.md +++ b/docs/plugins/autoDelay.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/autoDelay +permalink: /plugins/auto-delay editLink: false sidebar: auto title: autoDelay diff --git a/docs/plugins/customLocator.md b/docs/plugins/customLocator.md index 88c454149..431426903 100644 --- a/docs/plugins/customLocator.md +++ b/docs/plugins/customLocator.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/customLocator +permalink: /plugins/custom-locator editLink: false sidebar: auto title: customLocator diff --git a/docs/plugins/customReporter.md b/docs/plugins/customReporter.md index 57c057ba3..7623c34ab 100644 --- a/docs/plugins/customReporter.md +++ b/docs/plugins/customReporter.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/customReporter +permalink: /plugins/custom-reporter editLink: false sidebar: auto title: customReporter diff --git a/docs/plugins/junitReporter.md b/docs/plugins/junitReporter.md index cfeb34d5e..c3187666a 100644 --- a/docs/plugins/junitReporter.md +++ b/docs/plugins/junitReporter.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/junitReporter +permalink: /plugins/junit-reporter editLink: false sidebar: auto title: junitReporter diff --git a/docs/plugins/pageInfo.md b/docs/plugins/pageInfo.md index bb4962a4d..537dea326 100644 --- a/docs/plugins/pageInfo.md +++ b/docs/plugins/pageInfo.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/pageInfo +permalink: /plugins/page-info editLink: false sidebar: auto title: pageInfo diff --git a/docs/plugins/pauseOnFail.md b/docs/plugins/pauseOnFail.md index 72db2c365..833805caf 100644 --- a/docs/plugins/pauseOnFail.md +++ b/docs/plugins/pauseOnFail.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/pauseOnFail +permalink: /plugins/pause-on-fail editLink: false sidebar: auto title: pauseOnFail diff --git a/docs/plugins/retryFailedStep.md b/docs/plugins/retryFailedStep.md index c78e4b9ad..d92ca4b77 100644 --- a/docs/plugins/retryFailedStep.md +++ b/docs/plugins/retryFailedStep.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/retryFailedStep +permalink: /plugins/retry-failed-step editLink: false sidebar: auto title: retryFailedStep diff --git a/docs/plugins/screenshotOnFail.md b/docs/plugins/screenshotOnFail.md index ab04d5033..0c926cb15 100644 --- a/docs/plugins/screenshotOnFail.md +++ b/docs/plugins/screenshotOnFail.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/screenshotOnFail +permalink: /plugins/screenshot-on-fail editLink: false sidebar: auto title: screenshotOnFail diff --git a/docs/plugins/stepTimeout.md b/docs/plugins/stepTimeout.md index 416e3fc4d..cd1f7bba8 100644 --- a/docs/plugins/stepTimeout.md +++ b/docs/plugins/stepTimeout.md @@ -1,5 +1,5 @@ --- -permalink: /plugins/stepTimeout +permalink: /plugins/step-timeout editLink: false sidebar: auto title: stepTimeout