Skip to content

Commit

Permalink
fix(接口测试): 修复复制的场景无法添加前后置脚本的缺陷
Browse files Browse the repository at this point in the history
--bug=1026590 --user=王孝刚 [接口测试]
github#24667最新版MS的接口自动化-场景导入-场景复制后,无法进行前后置脚本编写
https://www.tapd.cn/55049933/s/1377035
  • Loading branch information
wxg0103 committed May 30, 2023
1 parent 29a054f commit 793c972
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@
UNION
SELECT project_id
FROM load_test_report
WHERE id = #{resourceId}
UNION
SELECT project_id
FROM api_test_environment
WHERE id = #{resourceId})
LIMIT 1
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ public UserDTO.PlatformInfo getCurrentPlatformInfo(String workspaceId) {
public void updateCurrentUserByResourceId(String resourceId) {
Project project = extProjectMapper.selectProjectByResourceId(resourceId);
if (project == null) {
return;
MSException.throwException(Translator.get("select_resource_error_and_check"));
}
SessionUser user = SessionUtils.getUser();
user.setLastProjectId(project.getId());
Expand Down
1 change: 1 addition & 0 deletions backend/src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ issue_jira_info_error=
case_status_not_exist=
jira_auth_error=
file_name_error=
select_resource_error_and_check=
3 changes: 2 additions & 1 deletion backend/src/main/resources/i18n/messages_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,5 @@ tcp_mock_not_unique=This tcp port is be used
no_tcp_mock_port=No idle tcp port, please contact administrators.
name_already_exists_in_module=Name already exists in same module
plan_warning=There is no associated executable use case under the test plan
file_name_error=Illegal file name
file_name_error=Illegal file name
select_resource_error_and_check=Select the resource error, check it please
1 change: 1 addition & 0 deletions backend/src/main/resources/i18n/messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,4 @@ no_tcp_mock_port=无可用的TCP端口号,请联系管理员
name_already_exists_in_module=同层级下已经存在
plan_warning=测试计划下没有关联可以执行的用例
file_name_error=文件名非法
select_resource_error_and_check=查找资源出错,请检查资源是否存在
3 changes: 2 additions & 1 deletion backend/src/main/resources/i18n/messages_zh_TW.properties
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,5 @@ tcp_mock_not_unique=該TCP端口號已被使用
no_tcp_mock_port=無可用的TCP端口號,請聯繫管理員
name_already_exists_in_module=同層級下已存在
plan_warning=測試計劃下沒有關聯可以執行的用例
file_name_error=文件名非法
file_name_error=文件名非法
select_resource_error_and_check=查找資源出錯,請檢查資源是否存在
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export default {
for (let i in arr) {
arr[i].disabled = disabled;
arr[i].projectId = this.calcProjectId(arr[i].projectId, id);
arr[i].notAddStep = true;
// 处理子请求环境
let typeArray = ["JDBCPostProcessor", "JDBCSampler", "JDBCPreProcessor"]
if (typeArray.indexOf(arr[i].type) !== -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:value="item.id">
</el-option>
</el-select>
<el-button size="mini" @click="add" type="primary" v-if="tabType !== 'assertionsRule'" :disabled="request.notAddStep">
<el-button size="mini" @click="add" type="primary" v-if="tabType !== 'assertionsRule'">
{{ $t('api_test.request.assertions.add') }}
</el-button>
</p>
Expand Down

0 comments on commit 793c972

Please sign in to comment.