refactor: test run case status messages duplication
This commit is contained in:
@@ -2,17 +2,13 @@ import { ProjectHome } from './ProjectHome';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { PriorityMessages } from '@/types/priority';
|
||||
import { TestTypeMessages } from '@/types/testType';
|
||||
import { TestStatusMessages } from '@/types/testStatus';
|
||||
|
||||
export type HomeMessages = {
|
||||
folders: string;
|
||||
testCases: string;
|
||||
testRuns: string;
|
||||
progress: string;
|
||||
untested: string;
|
||||
passed: string;
|
||||
failed: string;
|
||||
retest: string;
|
||||
skipped: string;
|
||||
testClassification: string;
|
||||
byType: string;
|
||||
byPriority: string;
|
||||
@@ -25,16 +21,20 @@ export default function Page({ params }: { params: { projectId: string } }) {
|
||||
testCases: t('test_cases'),
|
||||
testRuns: t('test_runs'),
|
||||
progress: t('progress'),
|
||||
untested: t('untested'),
|
||||
passed: t('passed'),
|
||||
failed: t('failed'),
|
||||
retest: t('retest'),
|
||||
skipped: t('skipped'),
|
||||
testClassification: t('test_classification'),
|
||||
byType: t('by_type'),
|
||||
byPriority: t('by_priority'),
|
||||
};
|
||||
|
||||
const st = useTranslations('Status');
|
||||
const statusMessages: TestStatusMessages = {
|
||||
untested: st('untested'),
|
||||
passed: st('passed'),
|
||||
failed: st('failed'),
|
||||
retest: st('retest'),
|
||||
skipped: st('skipped'),
|
||||
};
|
||||
|
||||
const tt = useTranslations('Type');
|
||||
const testTypeMessages: TestTypeMessages = {
|
||||
other: tt('other'),
|
||||
@@ -65,6 +65,7 @@ export default function Page({ params }: { params: { projectId: string } }) {
|
||||
<ProjectHome
|
||||
projectId={params.projectId}
|
||||
messages={messages}
|
||||
statusMessages={statusMessages}
|
||||
testTypeMessages={testTypeMessages}
|
||||
priorityMessages={priorityMessages}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user