测试步骤长度限制
This commit is contained in:
parent
0fee46ceaf
commit
750f09d53b
|
@ -312,6 +312,15 @@
|
|||
if (valid) {
|
||||
let param = {};
|
||||
Object.assign(param, this.form);
|
||||
|
||||
for (let i = 0; i < param.steps.length; i++){
|
||||
if (param.steps[i].desc.length > 300 || param.steps[i].result.length > 300) {
|
||||
this.$warning(this.$t('test_track.case.step_desc') + ","
|
||||
+ this.$t('test_track.case.expected_results') + this.$t('test_track.length_less_than') + '300');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
param.steps = JSON.stringify(this.form.steps);
|
||||
param.nodeId = this.form.module;
|
||||
this.moduleOptions.forEach(item => {
|
||||
|
|
|
@ -222,12 +222,19 @@
|
|||
param.id = this.testCase.id;
|
||||
param.status = this.testCase.status;
|
||||
param.results = [];
|
||||
this.testCase.steptResults.forEach(item => {
|
||||
|
||||
for (let i = 0; i < this.testCase.steptResults.length; i++){
|
||||
let result = {};
|
||||
result.actualResult = item.actualResult;
|
||||
result.executeResult = item.executeResult;
|
||||
result.actualResult = this.testCase.steptResults[i].actualResult;
|
||||
result.executeResult = this.testCase.steptResults[i].executeResult;
|
||||
if (result.actualResult && result.actualResult.length > 300) {
|
||||
this.$warning(this.$t('test_track.plan_view.actual_result')
|
||||
+ this.$t('test_track.length_less_than') + '300');
|
||||
return;
|
||||
}
|
||||
param.results.push(result);
|
||||
});
|
||||
}
|
||||
|
||||
param.results = JSON.stringify(param.results);
|
||||
param.issues = JSON.stringify(this.testCase.issues);
|
||||
this.$post('/test/plan/case/edit', param, () => {
|
||||
|
|
Loading…
Reference in New Issue