-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathconvert-status.ts
More file actions
37 lines (31 loc) · 939 Bytes
/
Copy pathconvert-status.ts
File metadata and controls
37 lines (31 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import type { AxiosRequestConfig } from 'axios';
export interface ZephyrOptions extends AxiosRequestConfig {
authorizationToken: string;
projectKey: string;
testCycle?: ZephyrTestCycle;
nodeInternalTlsRejectUnauthorized?: '0' | '1'; // NODE_TLS_REJECT_UNAUTHORIZED
ignoreFailedRetries?: boolean;
}
export type ZephyrStatus = 'Passed' | 'Failed' | 'Blocked' | 'Not Executed' | 'In Progress';
export type ZephyrTestResult = {
result: ZephyrStatus;
testCase: {
key: string;
comment: string | undefined;
};
};
export type ZephyrTestCycle = {
name?: string;
description?: string;
jiraProjectVersion?: number;
folderId?: number;
customFields?: {
[key: string]: string;
};
};
export function convertStatus(status: string): ZephyrStatus {
if (status === 'passed') return 'Passed';
if (status === 'failed') return 'Failed';
if (status === 'timedOut') return 'Blocked';
return 'Not Executed';
}