refactor(接口测试): 增加接口用例保存并继续添加功能
--story=1013901 --user=赵勇 【接口测试】接口case新增“保存并继续添加”按钮 https://www.tapd.cn/55049933/s/1439638 Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
96c10cf472
commit
1de3e7302f
|
@ -42,18 +42,6 @@
|
|||
style="margin-left: -20px">
|
||||
{{ saveButtonText }}
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="!isXpack || !showUpdateRule"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="saveAndCreate()"
|
||||
v-prevent-re-click
|
||||
v-permission="['PROJECT_API_DEFINITION:READ+EDIT_CASE']"
|
||||
style="margin-left: 2px">
|
||||
{{ $t('home.dashboard.api_case.save_and_create') }}
|
||||
</el-button>
|
||||
|
||||
<el-dropdown
|
||||
v-else
|
||||
style="margin-left: -17px"
|
||||
|
@ -75,6 +63,17 @@
|
|||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
<el-button
|
||||
v-if="!isXpack || !showUpdateRule"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="saveAndCreate()"
|
||||
v-prevent-re-click
|
||||
v-permission="['PROJECT_API_DEFINITION:READ+EDIT_CASE']"
|
||||
style="margin-left: 2px">
|
||||
{{ $t('home.dashboard.api_case.save_and_create') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
|
|
@ -623,10 +623,10 @@ export default {
|
|||
data.method = data.protocol;
|
||||
}
|
||||
},
|
||||
addModule(row) {
|
||||
this.saveApi(row, 'default-module');
|
||||
addModule(row, created) {
|
||||
this.saveApi(row, 'default-module', created);
|
||||
},
|
||||
saveApi(row, module) {
|
||||
saveApi(row, module, created) {
|
||||
let data = this.api;
|
||||
data.name = this.apiCase.name;
|
||||
data.moduleId = module;
|
||||
|
@ -639,6 +639,9 @@ export default {
|
|||
row.apiDefinitionId = data.id;
|
||||
this.saveCase(row);
|
||||
}
|
||||
if (created) {
|
||||
this.$emit('addCase');
|
||||
}
|
||||
});
|
||||
},
|
||||
reload() {
|
||||
|
@ -761,7 +764,7 @@ export default {
|
|||
if (this.compare.indexOf(row.id) === -1) {
|
||||
this.compare.push(row.id);
|
||||
if (this.api.saved) {
|
||||
this.addModule(row);
|
||||
this.addModule(row, created);
|
||||
} else {
|
||||
this.api.source = 'editCase';
|
||||
if (!this.isSave) {
|
||||
|
|
|
@ -151,8 +151,8 @@ public abstract class SSLManager {
|
|||
JMeterContext threadContext = JMeterContextService.getContext();
|
||||
if (threadContext != null && threadContext.getCurrentSampler() != null) {
|
||||
String resourceId = threadContext.getCurrentSampler().getPropertyAsString("MS-RESOURCE-ID");
|
||||
log.info("重新加载认证文件{}", resourceId);
|
||||
if (StringUtils.isNotBlank(resourceId) && keyMap.containsKey(resourceId)) {
|
||||
log.info("重新加载认证文件{}", resourceId);
|
||||
KeystoreDTO dto = keyMap.get(resourceId);
|
||||
// 加载认证文件
|
||||
try (InputStream in = new FileInputStream(new File(dto.getPath()))) {
|
||||
|
@ -372,8 +372,8 @@ public abstract class SSLManager {
|
|||
JMeterContext threadContext = JMeterContextService.getContext();
|
||||
if (threadContext != null && threadContext.getCurrentSampler() != null) {
|
||||
String resourceId = threadContext.getCurrentSampler().getPropertyAsString("MS-RESOURCE-ID");
|
||||
log.info("重新加载认证文件{}", resourceId);
|
||||
if (StringUtils.isNotBlank(resourceId) && keyMap.containsKey(resourceId)) {
|
||||
log.info("重新加载认证文件{}", resourceId);
|
||||
KeystoreDTO dto = keyMap.get(resourceId);
|
||||
SSLManager.manager = new JsseSSLManager(null);
|
||||
SSLManager.manager.keyStore = null;
|
||||
|
|
Loading…
Reference in New Issue