Files
pp-tcms/frontend/types/run.ts
LittleYellow 02fa631f02 feat: upload test record attachments per run case
Allow testers to attach evidence files to a single test case within a
specific test run, proving the test was actually executed. Attachments
are scoped to the RunCase (per-execution), not the shared case definition.

Backend:
- runCaseAttachments join table + model (CASCADE on runCase/attachment)
- POST/GET /runcaseattachments routes (reuse /attachments download+delete)

Frontend:
- new "Test record" tab in the run case detail pane with drag-and-drop
  upload, scoped to reporters; i18n for all 6 locales

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 07:01:44 +08:00

126 lines
2.3 KiB
TypeScript

type RunType = {
id: number;
name: string;
configurations: number;
description: string;
state: number;
projectId: number;
createdAt: string;
updatedAt: string;
RunCases?: RunCaseType[];
};
type RunCaseType = {
id: number;
runId: number;
caseId: number;
status: number;
editState: 'notChanged' | 'changed' | 'new' | 'deleted';
createdAt: string;
updatedAt: string;
};
type RunStatusCountType = {
status: number;
count: number;
};
type ProgressSeriesType = {
name: string;
data: number[];
};
type RunsMessages = {
runList: string;
run: string;
newRun: string;
editRun: string;
deleteRun: string;
id: string;
name: string;
description: string;
lastUpdate: string;
actions: string;
runName: string;
runDescription: string;
close: string;
create: string;
update: string;
pleaseEnter: string;
noRunsFound: string;
areYouSure: string;
delete: string;
};
type RunMessages = {
backToRuns: string;
updating: string;
update: string;
updatedTestRun: string;
export: string;
progress: string;
refresh: string;
id: string;
title: string;
pleaseEnter: string;
description: string;
priority: string;
status: string;
actions: string;
selectTestCase: string;
testCaseSelection: string;
includeInRun: string;
excludeFromRun: string;
noCasesFound: string;
areYouSureLeave: string;
type: string;
testDetail: string;
steps: string;
preconditions: string;
expectedResult: string;
detailsOfTheStep: string;
close: string;
filter: string;
clearAll: string;
apply: string;
selectStatus: string;
pleaseSave: string;
caseTitleOrDescription: string;
selected: string;
tags: string;
selectTags: string;
comments: string;
};
type RunDetailMessages = {
title: string;
description: string;
priority: string;
type: string;
tags: string;
testDetail: string;
steps: string;
preconditions: string;
expectedResult: string;
detailsOfTheStep: string;
caseDetail: string;
comments: string;
history: string;
testRecord: string;
download: string;
delete: string;
clickToUpload: string;
orDragAndDrop: string;
maxFileSize: string;
};
export type {
RunType,
RunCaseType,
RunStatusCountType,
ProgressSeriesType,
RunsMessages,
RunMessages,
RunDetailMessages,
};