@dionlarson/playwright-orchestrator-dynamo-db 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js +4 -2
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/helpers.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TestItem, TestReportResult, TestSortItem, TestStatus } from '@dionlarson/playwright-orchestrator-core';
|
|
2
2
|
import { Fields, StatusOffset } from './constants.js';
|
|
3
3
|
import { DynamoResultTestParams, TestInfoItem, TestItemDb, TestReport } from './types.js';
|
|
4
|
-
export declare function mapTestItemToDb(runId: string, ttl: number, { position, order, file, project, timeout }: TestItem, status?: StatusOffset): TestItemDb;
|
|
4
|
+
export declare function mapTestItemToDb(runId: string, ttl: number, { position, order, file, project, timeout, title }: TestItem, status?: StatusOffset): TestItemDb;
|
|
5
5
|
export declare function mapTestInfoItemToReport(item: TestInfoItem | undefined, { testResult }: DynamoResultTestParams): TestReport | undefined;
|
|
6
|
-
export declare function mapDbToTestItem({ [Fields.Order]: order, [Fields.Line]: line, [Fields.Character]: character, [Fields.File]: file, [Fields.Project]: project, [Fields.Timeout]: timeout, }: TestItemDb): TestItem;
|
|
6
|
+
export declare function mapDbToTestItem({ [Fields.Order]: order, [Fields.Line]: line, [Fields.Character]: character, [Fields.File]: file, [Fields.Project]: project, [Fields.Timeout]: timeout, [Fields.Title]: title, }: TestItemDb): TestItem;
|
|
7
7
|
export declare function parseStatus(status: TestReportResult['status']): TestStatus;
|
|
8
8
|
export declare function idToStatus(id: number): TestStatus;
|
|
9
9
|
export declare function mapDbTestInfoToSortItem(item: TestInfoItem): TestSortItem;
|
package/dist/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TestStatus } from '@dionlarson/playwright-orchestrator-core';
|
|
2
2
|
import { Fields, OFFSET_STEP, StatusOffset } from './constants.js';
|
|
3
|
-
export function mapTestItemToDb(runId, ttl, { position, order, file, project, timeout }, status = StatusOffset.Pending) {
|
|
3
|
+
export function mapTestItemToDb(runId, ttl, { position, order, file, project, timeout, title }, status = StatusOffset.Pending) {
|
|
4
4
|
const [line, character] = position.split(':');
|
|
5
5
|
return {
|
|
6
6
|
[Fields.Id]: runId,
|
|
@@ -11,6 +11,7 @@ export function mapTestItemToDb(runId, ttl, { position, order, file, project, ti
|
|
|
11
11
|
[Fields.Project]: project,
|
|
12
12
|
[Fields.Timeout]: timeout,
|
|
13
13
|
[Fields.Ttl]: ttl,
|
|
14
|
+
[Fields.Title]: title,
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
export function mapTestInfoItemToReport(item, { testResult }) {
|
|
@@ -24,13 +25,14 @@ export function mapTestInfoItemToReport(item, { testResult }) {
|
|
|
24
25
|
[Fields.LastSuccess]: item[Fields.History].findLast((h) => h[Fields.Status] === TestStatus.Passed)?.[Fields.Updated] ?? 0,
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
export function mapDbToTestItem({ [Fields.Order]: order, [Fields.Line]: line, [Fields.Character]: character, [Fields.File]: file, [Fields.Project]: project, [Fields.Timeout]: timeout, }) {
|
|
28
|
+
export function mapDbToTestItem({ [Fields.Order]: order, [Fields.Line]: line, [Fields.Character]: character, [Fields.File]: file, [Fields.Project]: project, [Fields.Timeout]: timeout, [Fields.Title]: title, }) {
|
|
28
29
|
return {
|
|
29
30
|
position: `${line}:${character}`,
|
|
30
31
|
file,
|
|
31
32
|
project,
|
|
32
33
|
order,
|
|
33
34
|
timeout,
|
|
35
|
+
title,
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
38
|
export function parseStatus(status) {
|
package/dist/types.d.ts
CHANGED