refactor: test run case status messages duplication

This commit is contained in:
Takeshi Kimata
2024-07-21 15:16:40 +09:00
parent 1751dd69a2
commit f797ae2581
11 changed files with 92 additions and 76 deletions

View File

@@ -1,6 +1,6 @@
import { ProjectType } from '@/types/project';
import { testTypes, priorities, testRunCaseStatus } from '@/config/selection';
import { HomeMessages } from './page';
import { TestStatusMessages } from '@/types/testStatus';
// aggregate folder, case, run mum
function aggregateBasicInfo(project: ProjectType) {
@@ -50,9 +50,9 @@ function aggregateTestPriority(project: ProjectType) {
return result;
}
function aggregateProgress(project: ProjectType, messages: HomeMessages) {
function aggregateProgress(project: ProjectType, statusMessages: TestStatusMessages) {
let series = testRunCaseStatus.map((status) => {
return { name: messages[status.uid], data: [] };
return { name: statusMessages[status.uid], data: [] };
});
let categories = [];