Skip to content

Commit 449edfa

Browse files
authored
Improve aggregate option documentation (#428)
1 parent 80e7b94 commit 449edfa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/types/plugin.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,13 @@ export interface XrayOptions {
364364
*/
365365
status?: {
366366
/**
367-
* A function that returns a single status for a given combination of other statuses. It is
368-
* used to determine the final status of retried and data-driven tests.
367+
* A function that returns a single Xray status for a given combination of Cypress statuses.
368+
* It is used to determine the final status of retried and data-driven tests and is never
369+
* called for tests that have only been run once.
370+
*
371+
* Please note that tests are grouped by the issue keys present in their `describe()` and
372+
* `it()` titles as described
373+
* [here](https://qytera-gmbh.github.io/projects/cypress-xray-plugin/section/guides/targetingExistingIssues/#reuse-cypress-issues).
369374
*
370375
* By default, the aggregation works as follows in order of mention:
371376
*
@@ -380,7 +385,7 @@ export interface XrayOptions {
380385
*
381386
* @example
382387
*
383-
* The following example defines a custom _FLAKY_ status:
388+
* The following example defines custom `FLAKY` and `ABORTED` statuses for iterated tests:
384389
*
385390
* ```ts
386391
* ({ failed, passed, pending, skipped }) => {
@@ -391,14 +396,14 @@ export interface XrayOptions {
391396
* return "FLAKY";
392397
* }
393398
* if (pending > 0) {
394-
* return "TODO";
399+
* return "ABORTED";
395400
* }
396401
* return "FAILED";
397402
* }
398403
* ```
399404
*
400-
* @param args - the aggregation arguments
401-
* @returns the aggregated status
405+
* @param args - the status aggregation arguments
406+
* @returns the aggregated Xray status
402407
*/
403408
aggregate?: (args: {
404409
/**

0 commit comments

Comments
 (0)