refactor: test run status messages duplication

This commit is contained in:
Takeshi Kimata
2024-07-21 15:46:06 +09:00
parent 1da19ed43c
commit 32ee0231b0
11 changed files with 79 additions and 45 deletions

41
frontend/types/status.ts Normal file
View File

@@ -0,0 +1,41 @@
// The status of each test run
type RunStatusUidType = 'new' | 'inProgress' | 'underReview' | 'rejected' | 'done' | 'closed';
type RunStatusType = {
uid: RunStatusUidType;
};
type RunStatusMessages = {
new: string;
inProgress: string;
underReview: string;
rejected: string;
done: string;
closed: string;
};
// The status of each test case in test run
type TestRunCaseStatusUidType = 'untested' | 'passed' | 'failed' | 'retest' | 'skipped';
type TestRunCaseStatusType = {
uid: TestRunCaseStatusUidType;
color: string;
chartColor: string;
};
type TestRunCaseStatusMessages = {
untested: string;
passed: string;
failed: string;
retest: string;
skipped: string;
};
export type {
RunStatusUidType,
RunStatusType,
RunStatusMessages,
TestRunCaseStatusUidType,
TestRunCaseStatusType,
TestRunCaseStatusMessages,
};

View File

@@ -1,18 +0,0 @@
// The status of each test case in test run
type TestRunCaseStatusUidType = 'untested' | 'passed' | 'failed' | 'retest' | 'skipped';
type TestRunCaseStatusType = {
uid: TestRunCaseStatusUidType;
color: string;
chartColor: string;
};
type TestRunCaseStatusMessages = {
untested: string;
passed: string;
failed: string;
retest: string;
skipped: string;
};
export type { TestRunCaseStatusUidType, TestRunCaseStatusType, TestRunCaseStatusMessages };