fix: update error when editing run cases

This commit is contained in:
Takeshi Kimata
2024-07-30 23:10:06 +09:00
parent 0da8e4129e
commit 2522c68b71
3 changed files with 105 additions and 5 deletions

View File

@@ -198,10 +198,17 @@ function includeExcludeTestCases(
} else if (targetCase.RunCases[0].editState === 'new') {
// do nothing
} else if (targetCase.RunCases[0].editState === 'deleted') {
targetCase.RunCases[0].editState = 'changed';
if (targetCase.RunCases[0].id > 0) {
// when id is valid (already included)
targetCase.RunCases[0].editState = 'changed';
} else {
// when id is invalid (has not included)
targetCase.RunCases[0].editState = 'new';
}
}
} else {
const newRunCase = {
id: -1,
runId: runId,
status: 0,
editState: 'new',