Skip to content

Commit 54f08ba

Browse files
miraoJaromir Obrclaude
authored
fix(docs): use kebab-case slugs for plugin page links (#5764)
* fix(docs): use kebab-case slugs for plugin page links The website serves plugin pages under kebab-case slugs (/plugins/retry-failed-step), so camelCase links like /plugins/retryFailedStep returned 404. Generate kebab-case permalinks and index links, and fix the stale autoLogin link in best.md. Fixes #5763 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove accidentally committed Playwright MCP console log Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Jaromir Obr <jobr@spork.tech> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9096da6 commit 54f08ba

14 files changed

Lines changed: 25 additions & 24 deletions

‎Bunoshfile.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const documentjsCliArgs = '-f md --shallow --markdown-toc=false --sort-order=alp
1010
const helperSlug = name => name.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2').replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()
1111
const helperMarkDownFile = name => `docs/helpers/${name}.md`
1212
const pluginMarkDownFile = name => `docs/plugins/${name}.md`
13+
const pluginSlug = name => name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()
1314

1415
/**
1516
* Generate all documentation (helpers, plugins and external helpers in parallel).
@@ -84,7 +85,7 @@ export async function docsPlugins() {
8485

8586
await writeToFile(pluginMarkDownFile(name), line => {
8687
line`---
87-
permalink: /plugins/${name}
88+
permalink: /plugins/${pluginSlug(name)}
8889
editLink: false
8990
sidebar: auto
9091
title: ${name}
@@ -107,7 +108,7 @@ title: ${name}
107108
line`CodeceptJS bundles the following plugins. Each plugin has its own page with full configuration reference.`
108109
line``
109110
for (const { name, summary } of index) {
110-
line`## [${name}](/plugins/${name})`
111+
line`## [${name}](/plugins/${pluginSlug(name)})`
111112
line``
112113
if (summary) line`${summary}`
113114
line``

‎docs/assertions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ helpers: {
466466
}
467467
```
468468

469-
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.
469+
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.
470470

471471
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.
472472

‎docs/best.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To write simpler and effective tests we encourage to use short cuts.
3838
Make test be focused on one feature and try to simplify everything that is not related directly to test.
3939

4040
* If data is required for a test, try to create that data via API. See how to do it in [Data Management](/data) chapter.
41-
* If user login is required, use [autoLogin plugin](/plugins#autoLogin) instead of putting login steps inside a test.
41+
* If user login is required, use [auth plugin](/plugins#auth) instead of putting login steps inside a test.
4242
* Break a long test into few. Long test can be fragile and complicated to follow and update.
4343
* Use [custom steps and page objects](/pageobjects) to hide steps which are not relevant to current test.
4444

‎docs/plugins.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Plugins
99

1010
CodeceptJS bundles the following plugins. Each plugin has its own page with full configuration reference.
1111

12-
## [aiTrace](/plugins/aiTrace)
12+
## [aiTrace](/plugins/ai-trace)
1313

1414
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.
1515

@@ -21,7 +21,7 @@ Uses AI to analyze test failures and provide insights
2121

2222
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.
2323

24-
## [autoDelay](/plugins/autoDelay)
24+
## [autoDelay](/plugins/auto-delay)
2525

2626
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.
2727

@@ -33,11 +33,11 @@ Overrides browser helper config from the command line. Works for all browser hel
3333

3434
Dumps code coverage from Playwright/Puppeteer after every test.
3535

36-
## [customLocator](/plugins/customLocator)
36+
## [customLocator](/plugins/custom-locator)
3737

3838
Creates a [custom locator][1] by using special attributes in HTML.
3939

40-
## [customReporter](/plugins/customReporter)
40+
## [customReporter](/plugins/custom-reporter)
4141

4242
Sample custom reporter for CodeceptJS.
4343

@@ -49,23 +49,23 @@ Exposes properties from helper instances as injectable test arguments. Use it to
4949

5050
Self-healing tests with AI.
5151

52-
## [junitReporter](/plugins/junitReporter)
52+
## [junitReporter](/plugins/junit-reporter)
5353

5454
Generates a JUnit-compatible XML report after a test run.
5555

56-
## [pageInfo](/plugins/pageInfo)
56+
## [pageInfo](/plugins/page-info)
5757

5858
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.
5959

6060
## [pause](/plugins/pause)
6161

6262
Pauses test execution interactively. Replaces the legacy `pauseOnFail` plugin. The default `on=fail` matches the old `pauseOnFail` behavior.
6363

64-
## [pauseOnFail](/plugins/pauseOnFail)
64+
## [pauseOnFail](/plugins/pause-on-fail)
6565

6666
Starts an interactive pause when a test fails.
6767

68-
## [retryFailedStep](/plugins/retryFailedStep)
68+
## [retryFailedStep](/plugins/retry-failed-step)
6969

7070
Retries each failed step in a test.
7171

@@ -77,15 +77,15 @@ Records a video of tests. Uses Playwright's `page.screencast` API (WebM) when th
7777

7878
Saves screenshots from the browser at points triggered by `on=`.
7979

80-
## [screenshotOnFail](/plugins/screenshotOnFail)
80+
## [screenshotOnFail](/plugins/screenshot-on-fail)
8181

8282
Saves a screenshot when a test fails.
8383

8484
## [sitemap](/plugins/sitemap)
8585

8686
Collects all pages visited while tests are running and saves them as a [sitemap][1] XML file.
8787

88-
## [stepTimeout](/plugins/stepTimeout)
88+
## [stepTimeout](/plugins/step-timeout)
8989

9090
Set timeout for test steps globally.
9191

‎docs/plugins/aiTrace.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/aiTrace
2+
permalink: /plugins/ai-trace
33
editLink: false
44
sidebar: auto
55
title: aiTrace

‎docs/plugins/autoDelay.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/autoDelay
2+
permalink: /plugins/auto-delay
33
editLink: false
44
sidebar: auto
55
title: autoDelay

‎docs/plugins/customLocator.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/customLocator
2+
permalink: /plugins/custom-locator
33
editLink: false
44
sidebar: auto
55
title: customLocator

‎docs/plugins/customReporter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/customReporter
2+
permalink: /plugins/custom-reporter
33
editLink: false
44
sidebar: auto
55
title: customReporter

‎docs/plugins/junitReporter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/junitReporter
2+
permalink: /plugins/junit-reporter
33
editLink: false
44
sidebar: auto
55
title: junitReporter

‎docs/plugins/pageInfo.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
permalink: /plugins/pageInfo
2+
permalink: /plugins/page-info
33
editLink: false
44
sidebar: auto
55
title: pageInfo

0 commit comments

Comments
 (0)