fix 断言支持配置失败后是否继续执行和 定时任务配置完成后,有下次执行时间,保存重新进来后没有下次执行时间
This commit is contained in:
@@ -190,6 +190,25 @@ export default {
|
||||
this.getTestCaseData()
|
||||
this.getTestDetailData()
|
||||
},
|
||||
watch: {
|
||||
// 监听 crontab 和 crontabStatus 的变化
|
||||
'addForm.crontab': {
|
||||
handler(newVal) {
|
||||
if (newVal && this.addForm.crontabStatus === 1) {
|
||||
this.updateExecutionTimes();
|
||||
}
|
||||
}
|
||||
},
|
||||
'addForm.crontabStatus': {
|
||||
handler(newVal) {
|
||||
if (newVal === 1 && this.addForm.crontab) {
|
||||
this.updateExecutionTimes();
|
||||
} else if (newVal === 0) {
|
||||
this.nextExecutionTime = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 校验
|
||||
validationForm() {
|
||||
@@ -306,19 +325,11 @@ export default {
|
||||
getTestDetail(this.$route.query.id).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.addForm = res.data
|
||||
this.addForm.crontabStatus = parseInt(res.data.crontabStatus)
|
||||
res.data.performanceTestCaseVOList.forEach(item => {
|
||||
item.status = String(item.status)
|
||||
})
|
||||
this.changeList = res.data.performanceTestCaseVOList
|
||||
this.sceneList.forEach(row => {
|
||||
this.changeList.forEach(item => {
|
||||
if (row.id === item.testCaseId) {
|
||||
this.multipleSelection.push(row)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.addForm.rpsStatus = String(res.data.rpsStatus)
|
||||
// 如果有定时任务,更新下次执行时间
|
||||
if (this.addForm.crontabStatus === 1 && this.addForm.crontab) {
|
||||
this.updateExecutionTimes();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -400,6 +400,7 @@
|
||||
<el-option key="2" label="否" value="2"></el-option>
|
||||
</el-select>
|
||||
<el-input v-model="content.expectations" placeholder="请输入期望弹窗文本" style="width: 300px;"></el-input>
|
||||
<el-checkbox v-model="content.isFailedAbort" :true-label="'1'" :false-label="'0'">失败终止</el-checkbox>
|
||||
</div>
|
||||
<div class="time-right">
|
||||
<el-switch v-model="content.isDisabled" :active-value="1" :inactive-value="0"></el-switch>
|
||||
@@ -467,13 +468,16 @@
|
||||
<el-option key="10" label="元素文本包含期望(InText)" value="10"></el-option>
|
||||
<el-option key="11" label="元素文本不包含期望(NotInText)" value="11"></el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="content.expectations"
|
||||
placeholder="请输入期望值"
|
||||
class="select"
|
||||
:disabled="['1','2','3','4','5','6'].includes(content.assertionMode)"
|
||||
style="width: 100%;">
|
||||
</el-input>
|
||||
<div style="display: flex; align-items: center; width: 100%;">
|
||||
<el-input
|
||||
v-model="content.expectations"
|
||||
placeholder="请输入期望值"
|
||||
class="select"
|
||||
:disabled="['1','2','3','4','5','6'].includes(content.assertionMode)"
|
||||
style="flex: 1;">
|
||||
</el-input>
|
||||
<el-checkbox v-model="content.isFailedAbort" :true-label="'1'" :false-label="'0'" style="margin-left: 10px;">失败终止</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -529,7 +533,10 @@
|
||||
<el-option key="2" label="下拉框选项显示的文本等于期望(SelectedLabel) " value="2"></el-option>
|
||||
<el-option key="3" label="所选元素的值不等于期望(NotSelectedValue) " value="3"></el-option>
|
||||
</el-select>
|
||||
<el-input v-model="content.expectations" placeholder="请输入期望值" class="select" style="width: 100%;"></el-input>
|
||||
<div style="display: flex; align-items: center; width: 100%;">
|
||||
<el-input v-model="content.expectations" placeholder="请输入期望值" class="select" style="flex: 1;"></el-input>
|
||||
<el-checkbox v-model="content.isFailedAbort" :true-label="'1'" :false-label="'0'" style="margin-left: 10px;">失败终止</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -539,6 +546,7 @@
|
||||
<div v-for="(content, index2) in item.assertionQOList.webTitles" class="time">
|
||||
<div class="time-left">
|
||||
<el-input v-model="content.expectations" placeholder="请输入期望的网页标题" style="width: 300px;"></el-input>
|
||||
<el-checkbox v-model="content.isFailedAbort" :true-label="'1'" :false-label="'0'" style="margin-left: 10px;">失败终止</el-checkbox>
|
||||
</div>
|
||||
<div class="time-right">
|
||||
<el-switch v-model="content.isDisabled" :active-value="1" :inactive-value="0"></el-switch>
|
||||
@@ -879,6 +887,7 @@ export default {
|
||||
expectations: null, // 期望值
|
||||
assertionMode: null, // 断言方式
|
||||
isPopText: null,
|
||||
isFailedAbort: '0', // 初始化失败终止属性为'0',使用字符串类型
|
||||
}
|
||||
|
||||
switch (this.saveForm.assertionType) {
|
||||
|
||||
Reference in New Issue
Block a user