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