Skip to content

Commit e91c6c9

Browse files
Feat/organise by suite (#6)
* feat: add organizeTestsBySuite * docs: update function definitions and add Baseline interface documentation
1 parent 0c80adf commit e91c6c9

19 files changed

+175
-56
lines changed

docs/README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,24 @@
44

55
# CTRF v0.0.16
66

7-
## Enumerations
8-
9-
- [SortOrder](enumerations/SortOrder.md)
10-
11-
## Interfaces
7+
## Schema
128

139
- [Attachment](interfaces/Attachment.md)
10+
- [Baseline](interfaces/Baseline.md)
1411
- [Environment](interfaces/Environment.md)
15-
- [Insights](interfaces/Insights.md)
1612
- [InsightsMetric](interfaces/InsightsMetric.md)
1713
- [Report](interfaces/Report.md)
1814
- [Results](interfaces/Results.md)
1915
- [RetryAttempt](interfaces/RetryAttempt.md)
16+
- [RootInsights](interfaces/RootInsights.md)
2017
- [Step](interfaces/Step.md)
2118
- [Summary](interfaces/Summary.md)
2219
- [Test](interfaces/Test.md)
2320
- [TestInsights](interfaces/TestInsights.md)
24-
- [TestTree](interfaces/TestTree.md)
2521
- [Tool](interfaces/Tool.md)
26-
- [TreeNode](interfaces/TreeNode.md)
27-
- [TreeOptions](interfaces/TreeOptions.md)
28-
- [ValidationResult](interfaces/ValidationResult.md)
29-
30-
## Type Aliases
31-
3222
- [TestStatus](type-aliases/TestStatus.md)
33-
- [TreeTest](type-aliases/TreeTest.md)
3423

35-
## Functions
24+
## Methods
3625

3726
- [enrichReportWithInsights](functions/enrichReportWithInsights.md)
3827
- [findSuiteByName](functions/findSuiteByName.md)
@@ -51,3 +40,18 @@
5140
- [traverseTree](functions/traverseTree.md)
5241
- [validateReport](functions/validateReport.md)
5342
- [validateReportStrict](functions/validateReportStrict.md)
43+
44+
## Enumerations
45+
46+
- [SortOrder](enumerations/SortOrder.md)
47+
48+
## Interfaces
49+
50+
- [TestTree](interfaces/TestTree.md)
51+
- [TreeNode](interfaces/TreeNode.md)
52+
- [TreeOptions](interfaces/TreeOptions.md)
53+
- [ValidationResult](interfaces/ValidationResult.md)
54+
55+
## Type Aliases
56+
57+
- [TreeTest](type-aliases/TreeTest.md)

docs/functions/findSuiteByName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **findSuiteByName**(`nodes`, `name`): `undefined` \| [`TreeNode`](../interfaces/TreeNode.md)
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:331
11+
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)
1212

1313
Utility function to find a suite by name in the tree
1414

docs/functions/findTestByName.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **findTestByName**(`nodes`, `name`): `undefined` \| [`TreeTest`](../type-aliases/TreeTest.md)
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:354
11+
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)
1212

1313
Utility function to find a test by name in the tree
1414

docs/functions/flattenTree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **flattenTree**(`nodes`): `object`[]
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:379
11+
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)
1212

1313
Utility function to convert tree to a flat array with indentation information
1414
Useful for displaying the tree in a linear format

docs/functions/getAllTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **getAllTests**(`nodes`): [`TreeTest`](../type-aliases/TreeTest.md)[]
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:403
11+
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)
1212

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

docs/functions/getSuiteStats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **getSuiteStats**(`nodes`, `suitePath`): `undefined` \| [`Summary`](../interfaces/Summary.md)
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:422
11+
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)
1212

1313
Utility function to get statistics for a specific suite path
1414

docs/functions/organizeTestsBySuite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **organizeTestsBySuite**(`tests`, `options`): [`TestTree`](../interfaces/TestTree.md)
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:92
11+
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)
1212

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

docs/functions/traverseTree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **traverseTree**(`nodes`, `callback`, `depth`): `void`
1010
11-
Defined in: src/methods/tree-hierarchical-structure.ts:302
11+
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)
1212

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

docs/interfaces/Baseline.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[**CTRF v0.0.16**](../README.md)
2+
3+
***
4+
5+
[CTRF](../README.md) / Baseline
6+
7+
# Interface: Baseline
8+
9+
Defined in: [types/ctrf.d.ts:150](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L150)
10+
11+
## Properties
12+
13+
### buildName?
14+
15+
> `optional` **buildName**: `string`
16+
17+
Defined in: [types/ctrf.d.ts:155](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L155)
18+
19+
***
20+
21+
### buildNumber?
22+
23+
> `optional` **buildNumber**: `number`
24+
25+
Defined in: [types/ctrf.d.ts:156](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L156)
26+
27+
***
28+
29+
### buildUrl?
30+
31+
> `optional` **buildUrl**: `string`
32+
33+
Defined in: [types/ctrf.d.ts:157](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L157)
34+
35+
***
36+
37+
### commit?
38+
39+
> `optional` **commit**: `string`
40+
41+
Defined in: [types/ctrf.d.ts:154](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L154)
42+
43+
***
44+
45+
### extra?
46+
47+
> `optional` **extra**: `Record`\<`string`, `unknown`\>
48+
49+
Defined in: [types/ctrf.d.ts:158](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L158)
50+
51+
***
52+
53+
### reportId
54+
55+
> **reportId**: `string`
56+
57+
Defined in: [types/ctrf.d.ts:151](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L151)
58+
59+
***
60+
61+
### source?
62+
63+
> `optional` **source**: `string`
64+
65+
Defined in: [types/ctrf.d.ts:152](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L152)
66+
67+
***
68+
69+
### timestamp?
70+
71+
> `optional` **timestamp**: `string`
72+
73+
Defined in: [types/ctrf.d.ts:153](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L153)

docs/interfaces/Report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Defined in: [types/ctrf.d.ts:1](https://github.com/ctrf-io/ctrf-core-js/blob/mai
1212

1313
### baseline?
1414

15-
> `optional` **baseline**: `Baseline`
15+
> `optional` **baseline**: [`Baseline`](Baseline.md)
1616
1717
Defined in: [types/ctrf.d.ts:9](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L9)
1818

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

3737
### insights?
3838

39-
> `optional` **insights**: [`Insights`](Insights.md)
39+
> `optional` **insights**: [`RootInsights`](RootInsights.md)
4040
4141
Defined in: [types/ctrf.d.ts:8](https://github.com/ctrf-io/ctrf-core-js/blob/main/types/ctrf.d.ts#L8)
4242

0 commit comments

Comments
 (0)