Skip to content

Commit 9bb8404

Browse files
authored
fix: broken k6 testing links (#2039)
1 parent 34f5bd4 commit 9bb8404

File tree

30 files changed

+203
-203
lines changed

30 files changed

+203
-203
lines changed

docs/sources/k6/next/javascript-api/jslib/testing/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 00
66

77
# testing
88

9-
The k6 testing library provides assertion capabilities for both protocol and browser testing, and draws inspiration from Playwright's test API design. The entire library is centered around the [`expect()`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/expect) function, which can be configured for convenience.
9+
The k6 testing library provides assertion capabilities for both protocol and browser testing, and draws inspiration from Playwright's test API design. The entire library is centered around the [`expect()`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/expect) function, which can be configured for convenience.
1010

1111
{{< admonition type="note" >}}
1212
The k6 testing library source code is available on [GitHub](https://github.com/grafana/k6-jslib-testing).
@@ -16,9 +16,9 @@ The k6 testing library source code is available on [GitHub](https://github.com/g
1616

1717
- **Playwright-inspired assertions**: API designed with patterns inspired by Playwright's testing approach
1818
- **[Protocol and browser testing](#demo)**: Works with both HTTP/API testing and browser automation
19-
- **[Auto-retrying assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/expect#retrying-assertions)**: Automatically retry assertions until they pass or timeout
20-
- **[Soft assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/expect#soft-assertions)**: Continue test execution even after assertion failures
21-
- **[Configurable timeouts](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/configure)**: Customizable timeout and polling intervals
19+
- **[Auto-retrying assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/expect#retrying-assertions)**: Automatically retry assertions until they pass or timeout
20+
- **[Soft assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/expect#soft-assertions)**: Continue test execution even after assertion failures
21+
- **[Configurable timeouts](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/configure)**: Customizable timeout and polling intervals
2222

2323
## Usage
2424

@@ -114,7 +114,7 @@ The testing library provides two types of assertions:
114114

115115
Synchronous assertions that evaluate immediately. These are ideal for testing static values, API responses, and scenarios where the expected condition should be true at the moment of evaluation.
116116

117-
### [Retrying Assertions]((https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/expect/retrying-assertions/)
117+
### [Retrying Assertions](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/expect/retrying-assertions/)
118118

119119
Asynchronous assertions that automatically retry until conditions become true or timeout. These are suitable for browser testing, dynamic content, and scenarios where conditions may change over time.
120120

docs/sources/k6/next/javascript-api/jslib/testing/expect.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -197,37 +197,37 @@ export default async function () {
197197

198198
| Method | Description |
199199
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
200-
| [toBe(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobe) | Exact equality using Object.is() |
201-
| [toBeCloseTo(expected, precision?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobecloseto) | Floating point comparison |
202-
| [toBeDefined()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobedefined) | Value is not undefined |
203-
| [toBeFalsy()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobefalsy) | Value is falsy |
204-
| [toBeGreaterThan(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobegreaterthan) | Greater than comparison |
205-
| [toBeGreaterThanOrEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobegreaterthanorequal) | Greater than or equal comparison |
206-
| [toBeInstanceOf(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobeinstanceof) | Value is an instance of a class |
207-
| [toBeLessThan(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobelessthan) | Less than comparison |
208-
| [toBeLessThanOrEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobelessthanorequal) | Less than or equal comparison |
209-
| [toBeNaN()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobenan) | Value is NaN |
210-
| [toBeNull()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobenull) | Value is null |
211-
| [toBeTruthy()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobetruthy) | Value is truthy |
212-
| [toBeUndefined()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tobeundefined) | Value is undefined |
213-
| [toContain(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tocontain) | Array/string contains value |
214-
| [toContainEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tocontainorequal) | Array or Set contains a similar element |
215-
| [toEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/toequal) | Deep equality comparison |
216-
| [toHaveLength(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tohavelength) | Value has a expected length |
217-
| [toHaveProperty(path, expected?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/non-retrying-assertions/tohaveproperty) | Property at provided path exists in the object and optionally checks that it is equal to expected |
200+
| [toBe(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobe) | Exact equality using Object.is() |
201+
| [toBeCloseTo(expected, precision?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobecloseto) | Floating point comparison |
202+
| [toBeDefined()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobedefined) | Value is not undefined |
203+
| [toBeFalsy()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobefalsy) | Value is falsy |
204+
| [toBeGreaterThan(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobegreaterthan) | Greater than comparison |
205+
| [toBeGreaterThanOrEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobegreaterthanorequal) | Greater than or equal comparison |
206+
| [toBeInstanceOf(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobeinstanceof) | Value is an instance of a class |
207+
| [toBeLessThan(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobelessthan) | Less than comparison |
208+
| [toBeLessThanOrEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobelessthanorequal) | Less than or equal comparison |
209+
| [toBeNaN()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobenan) | Value is NaN |
210+
| [toBeNull()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobenull) | Value is null |
211+
| [toBeTruthy()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobetruthy) | Value is truthy |
212+
| [toBeUndefined()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tobeundefined) | Value is undefined |
213+
| [toContain(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tocontain) | Array/string contains value |
214+
| [toContainEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tocontainorequal) | Array or Set contains a similar element |
215+
| [toEqual(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/toequal) | Deep equality comparison |
216+
| [toHaveLength(expected)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tohavelength) | Value has a expected length |
217+
| [toHaveProperty(path, expected?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/non-retrying-assertions/tohaveproperty) | Property at provided path exists in the object and optionally checks that it is equal to expected |
218218

219219
### Retrying Assertions
220220

221221
| Method | Description |
222222
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
223-
| [toBeChecked(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobechecked) | Checkbox is checked |
224-
| [toBeDisabled(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobedisabled) | Element is disabled |
225-
| [toBeEditable(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobeeditable) | Element is editable |
226-
| [toBeEnabled(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobeenabled) | Element is enabled |
227-
| [toBeHidden(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobehidden) | Element is hidden |
228-
| [toBeVisible(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tobevisible) | Element is visible |
229-
| [toContainText(text, options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tocontaintext) | Element contains text |
230-
| [toHaveAttribute(attribute, value?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tohaveattribute) | Element attribute value |
231-
| [toHaveText(text, options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tohavetext) | Element text content |
232-
| [toHaveValue(value)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/k6-testing/retrying-assertions/tohavevalue) | Input element value |
223+
| [toBeChecked(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobechecked) | Checkbox is checked |
224+
| [toBeDisabled(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobedisabled) | Element is disabled |
225+
| [toBeEditable(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobeeditable) | Element is editable |
226+
| [toBeEnabled(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobeenabled) | Element is enabled |
227+
| [toBeHidden(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobehidden) | Element is hidden |
228+
| [toBeVisible(options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tobevisible) | Element is visible |
229+
| [toContainText(text, options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tocontaintext) | Element contains text |
230+
| [toHaveAttribute(attribute, value?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tohaveattribute) | Element attribute value |
231+
| [toHaveText(text, options?)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tohavetext) | Element text content |
232+
| [toHaveValue(value)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/jslib/testing/retrying-assertions/tohavevalue) | Input element value |
233233

0 commit comments

Comments
 (0)