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
34 changes: 19 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,24 @@

# CTRF v0.0.16

## Enumerations

- [SortOrder](enumerations/SortOrder.md)

## Interfaces
## Schema

- [Attachment](interfaces/Attachment.md)
- [Baseline](interfaces/Baseline.md)
- [Environment](interfaces/Environment.md)
- [Insights](interfaces/Insights.md)
- [InsightsMetric](interfaces/InsightsMetric.md)
- [Report](interfaces/Report.md)
- [Results](interfaces/Results.md)
- [RetryAttempt](interfaces/RetryAttempt.md)
- [RootInsights](interfaces/RootInsights.md)
- [Step](interfaces/Step.md)
- [Summary](interfaces/Summary.md)
- [Test](interfaces/Test.md)
- [TestInsights](interfaces/TestInsights.md)
- [TestTree](interfaces/TestTree.md)
- [Tool](interfaces/Tool.md)
- [TreeNode](interfaces/TreeNode.md)
- [TreeOptions](interfaces/TreeOptions.md)
- [ValidationResult](interfaces/ValidationResult.md)

## Type Aliases

- [TestStatus](type-aliases/TestStatus.md)
- [TreeTest](type-aliases/TreeTest.md)

## Functions
## Methods

- [enrichReportWithInsights](functions/enrichReportWithInsights.md)
- [findSuiteByName](functions/findSuiteByName.md)
Expand All @@ -51,3 +40,18 @@
- [traverseTree](functions/traverseTree.md)
- [validateReport](functions/validateReport.md)
- [validateReportStrict](functions/validateReportStrict.md)

## Enumerations

- [SortOrder](enumerations/SortOrder.md)

## Interfaces

- [TestTree](interfaces/TestTree.md)
- [TreeNode](interfaces/TreeNode.md)
- [TreeOptions](interfaces/TreeOptions.md)
- [ValidationResult](interfaces/ValidationResult.md)

## Type Aliases

- [TreeTest](type-aliases/TreeTest.md)
2 changes: 1 addition & 1 deletion docs/functions/findSuiteByName.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **findSuiteByName**(`nodes`, `name`): `undefined` \| [`TreeNode`](../interfaces/TreeNode.md)

Defined in: src/methods/tree-hierarchical-structure.ts:331
Defined in: [src/methods/tree-hierarchical-structure.ts:331](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L331)

Utility function to find a suite by name in the tree

Expand Down
2 changes: 1 addition & 1 deletion docs/functions/findTestByName.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **findTestByName**(`nodes`, `name`): `undefined` \| [`TreeTest`](../type-aliases/TreeTest.md)

Defined in: src/methods/tree-hierarchical-structure.ts:354
Defined in: [src/methods/tree-hierarchical-structure.ts:354](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L354)

Utility function to find a test by name in the tree

Expand Down
2 changes: 1 addition & 1 deletion docs/functions/flattenTree.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **flattenTree**(`nodes`): `object`[]

Defined in: src/methods/tree-hierarchical-structure.ts:379
Defined in: [src/methods/tree-hierarchical-structure.ts:379](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L379)

Utility function to convert tree to a flat array with indentation information
Useful for displaying the tree in a linear format
Expand Down
2 changes: 1 addition & 1 deletion docs/functions/getAllTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **getAllTests**(`nodes`): [`TreeTest`](../type-aliases/TreeTest.md)[]

Defined in: src/methods/tree-hierarchical-structure.ts:403
Defined in: [src/methods/tree-hierarchical-structure.ts:403](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L403)

Utility function to get all tests from the tree structure as a flat array

Expand Down
2 changes: 1 addition & 1 deletion docs/functions/getSuiteStats.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **getSuiteStats**(`nodes`, `suitePath`): `undefined` \| [`Summary`](../interfaces/Summary.md)

Defined in: src/methods/tree-hierarchical-structure.ts:422
Defined in: [src/methods/tree-hierarchical-structure.ts:422](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L422)

Utility function to get statistics for a specific suite path

Expand Down
2 changes: 1 addition & 1 deletion docs/functions/organizeTestsBySuite.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **organizeTestsBySuite**(`tests`, `options`): [`TestTree`](../interfaces/TestTree.md)

Defined in: src/methods/tree-hierarchical-structure.ts:92
Defined in: [src/methods/tree-hierarchical-structure.ts:92](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L92)

Organizes CTRF tests into a hierarchical tree structure based on the suite property.

Expand Down
2 changes: 1 addition & 1 deletion docs/functions/traverseTree.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **traverseTree**(`nodes`, `callback`, `depth`): `void`

Defined in: src/methods/tree-hierarchical-structure.ts:302
Defined in: [src/methods/tree-hierarchical-structure.ts:302](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L302)

Utility function to traverse the tree and apply a function to each node

Expand Down
73 changes: 73 additions & 0 deletions docs/interfaces/Baseline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[**CTRF v0.0.16**](../README.md)

***

[CTRF](../README.md) / Baseline

# Interface: Baseline

Defined in: [types/ctrf.d.ts:150](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L150)

## Properties

### buildName?

> `optional` **buildName**: `string`

Defined in: [types/ctrf.d.ts:155](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L155)

***

### buildNumber?

> `optional` **buildNumber**: `number`

Defined in: [types/ctrf.d.ts:156](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L156)

***

### buildUrl?

> `optional` **buildUrl**: `string`

Defined in: [types/ctrf.d.ts:157](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L157)

***

### commit?

> `optional` **commit**: `string`

Defined in: [types/ctrf.d.ts:154](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L154)

***

### extra?

> `optional` **extra**: `Record`\<`string`, `unknown`\>

Defined in: [types/ctrf.d.ts:158](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L158)

***

### reportId

> **reportId**: `string`

Defined in: [types/ctrf.d.ts:151](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L151)

***

### source?

> `optional` **source**: `string`

Defined in: [types/ctrf.d.ts:152](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L152)

***

### timestamp?

> `optional` **timestamp**: `string`

Defined in: [types/ctrf.d.ts:153](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L153)
4 changes: 2 additions & 2 deletions docs/interfaces/Report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Defined in: [types/ctrf.d.ts:1](https://github.com/ctrf-io/ctrf-core-js/blob/mai

### baseline?

> `optional` **baseline**: `Baseline`
> `optional` **baseline**: [`Baseline`](Baseline.md)

Defined in: [types/ctrf.d.ts:9](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L9)

Expand All @@ -36,7 +36,7 @@ Defined in: [types/ctrf.d.ts:6](https://github.com/ctrf-io/ctrf-core-js/blob/mai

### insights?

> `optional` **insights**: [`Insights`](Insights.md)
> `optional` **insights**: [`RootInsights`](RootInsights.md)

Defined in: [types/ctrf.d.ts:8](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L8)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

***

[CTRF](../README.md) / Insights
[CTRF](../README.md) / RootInsights

# Interface: Insights
# Interface: RootInsights

Defined in: [types/ctrf.d.ts:123](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L123)

Expand Down
6 changes: 3 additions & 3 deletions docs/interfaces/TestTree.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Interface: TestTree

Defined in: src/methods/tree-hierarchical-structure.ts:44
Defined in: [src/methods/tree-hierarchical-structure.ts:44](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L44)

Result of converting tests to tree structure

Expand All @@ -16,7 +16,7 @@ Result of converting tests to tree structure

> **roots**: [`TreeNode`](TreeNode.md)[]

Defined in: src/methods/tree-hierarchical-structure.ts:46
Defined in: [src/methods/tree-hierarchical-structure.ts:46](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L46)

Root nodes of the tree (top-level suites)

Expand All @@ -26,6 +26,6 @@ Root nodes of the tree (top-level suites)

> `optional` **summary**: [`Summary`](Summary.md)

Defined in: src/methods/tree-hierarchical-structure.ts:48
Defined in: [src/methods/tree-hierarchical-structure.ts:48](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L48)

Overall statistics for all tests (only present when includeSummary is true)
16 changes: 8 additions & 8 deletions docs/interfaces/TreeNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Interface: TreeNode

Defined in: src/methods/tree-hierarchical-structure.ts:16
Defined in: [src/methods/tree-hierarchical-structure.ts:16](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L16)

Represents a tree node (suite) that can contain tests and child suites
Following the CTRF Suite Tree schema specification
Expand All @@ -17,7 +17,7 @@ Following the CTRF Suite Tree schema specification

> **duration**: `number`

Defined in: src/methods/tree-hierarchical-structure.ts:22
Defined in: [src/methods/tree-hierarchical-structure.ts:22](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L22)

Total duration of all tests in this suite and children

Expand All @@ -27,7 +27,7 @@ Total duration of all tests in this suite and children

> `optional` **extra**: `Record`\<`string`, `unknown`\>

Defined in: src/methods/tree-hierarchical-structure.ts:30
Defined in: [src/methods/tree-hierarchical-structure.ts:30](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L30)

Additional properties

Expand All @@ -37,7 +37,7 @@ Additional properties

> **name**: `string`

Defined in: src/methods/tree-hierarchical-structure.ts:18
Defined in: [src/methods/tree-hierarchical-structure.ts:18](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L18)

The name of this suite

Expand All @@ -47,7 +47,7 @@ The name of this suite

> **status**: [`TestStatus`](../type-aliases/TestStatus.md)

Defined in: src/methods/tree-hierarchical-structure.ts:20
Defined in: [src/methods/tree-hierarchical-structure.ts:20](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L20)

The status of this suite (derived from child test results)

Expand All @@ -57,7 +57,7 @@ The status of this suite (derived from child test results)

> **suites**: `TreeNode`[]

Defined in: src/methods/tree-hierarchical-structure.ts:28
Defined in: [src/methods/tree-hierarchical-structure.ts:28](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L28)

Child suites contained within this suite

Expand All @@ -67,7 +67,7 @@ Child suites contained within this suite

> `optional` **summary**: [`Summary`](Summary.md)

Defined in: src/methods/tree-hierarchical-structure.ts:24
Defined in: [src/methods/tree-hierarchical-structure.ts:24](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L24)

Aggregated statistics for this suite (only present when includeSummary is true)

Expand All @@ -77,6 +77,6 @@ Aggregated statistics for this suite (only present when includeSummary is true)

> **tests**: [`TreeTest`](../type-aliases/TreeTest.md)[]

Defined in: src/methods/tree-hierarchical-structure.ts:26
Defined in: [src/methods/tree-hierarchical-structure.ts:26](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L26)

Tests directly contained in this suite
4 changes: 2 additions & 2 deletions docs/interfaces/TreeOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Interface: TreeOptions

Defined in: src/methods/tree-hierarchical-structure.ts:36
Defined in: [src/methods/tree-hierarchical-structure.ts:36](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L36)

Options for controlling tree structure creation

Expand All @@ -16,6 +16,6 @@ Options for controlling tree structure creation

> `optional` **includeSummary**: `boolean`

Defined in: src/methods/tree-hierarchical-structure.ts:38
Defined in: [src/methods/tree-hierarchical-structure.ts:38](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L38)

Whether to include summary statistics aggregation (default: true)
2 changes: 1 addition & 1 deletion docs/type-aliases/TreeTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

> **TreeTest** = [`Test`](../interfaces/Test.md) & `object`

Defined in: src/methods/tree-hierarchical-structure.ts:7
Defined in: [src/methods/tree-hierarchical-structure.ts:7](https://github.com/ctrf-io/ctrf-core-js/blob/main/src/methods/tree-hierarchical-structure.ts#L7)

Tree test extends CTRF Test with a nodeType field for tree traversal

Expand Down
Loading