Skip to content
Merged
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
5 changes: 3 additions & 2 deletions Bunoshfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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}
Expand All @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion docs/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/best.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
20 changes: 10 additions & 10 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -49,23 +49,23 @@ 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.

## [pause](/plugins/pause)

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.

Expand All @@ -77,15 +77,15 @@ 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.

## [sitemap](/plugins/sitemap)

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.

2 changes: 1 addition & 1 deletion docs/plugins/aiTrace.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/aiTrace
permalink: /plugins/ai-trace
editLink: false
sidebar: auto
title: aiTrace
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/autoDelay.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/autoDelay
permalink: /plugins/auto-delay
editLink: false
sidebar: auto
title: autoDelay
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/customLocator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/customLocator
permalink: /plugins/custom-locator
editLink: false
sidebar: auto
title: customLocator
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/customReporter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/customReporter
permalink: /plugins/custom-reporter
editLink: false
sidebar: auto
title: customReporter
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/junitReporter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/junitReporter
permalink: /plugins/junit-reporter
editLink: false
sidebar: auto
title: junitReporter
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pageInfo.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/pageInfo
permalink: /plugins/page-info
editLink: false
sidebar: auto
title: pageInfo
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pauseOnFail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/pauseOnFail
permalink: /plugins/pause-on-fail
editLink: false
sidebar: auto
title: pauseOnFail
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/retryFailedStep.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/retryFailedStep
permalink: /plugins/retry-failed-step
editLink: false
sidebar: auto
title: retryFailedStep
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/screenshotOnFail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/screenshotOnFail
permalink: /plugins/screenshot-on-fail
editLink: false
sidebar: auto
title: screenshotOnFail
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/stepTimeout.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
permalink: /plugins/stepTimeout
permalink: /plugins/step-timeout
editLink: false
sidebar: auto
title: stepTimeout
Expand Down
Loading