Files
apiautotest/interface/pms/projects/test_pms_top_project.yaml
2024-03-04 15:38:14 +08:00

80 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
case_common:
allure_epic: 项目管理
allure_feature: 项目
allure_story: 项目
case_markers:
- pms
- pms_project
- usefixtures: gitlink_login
common_dependence:
setup:
interface:
- pms_get_project_user_list_01
- pms_get_enterprise_user_list_01
case_info:
- id: pms_top_project_01
title: 企业下置顶项目接口
run: true
severity: critical
url: ${pms_host}/api/pms/${env_enterprise_identifier}/pmsProject
method: PUT
headers:
Content-Type: application/json; charset=utf-8;
cookies: ${cookies}
request_type: json
payload:
id: ${pms_project_id}
isTop: 1
files:
assert_response:
status_code: 200
assertMessage:
type_jsonpath: $.msg
expect_value: 操作成功
assert_type: ==
assert_sql:
extract:
case_dependence:
setup:
interface:
- pms_new_project_02
- pms_get_project_list_by_name_02
teardown:
interface:
- pms_delete_project_01
- id: pms_top_project_02
title: 企业下取消置顶项目接口
run: True
severity: critical
url: ${pms_host}/api/pms/${env_enterprise_identifier}/pmsProject
method: PUT
headers:
Content-Type: application/json; charset=utf-8;
cookies: ${cookies}
request_type: json
payload:
id: ${pms_project_id}
isTop: 0
files:
assert_response:
status_code: 200
assertMessage:
type_jsonpath: $.msg
expect_value: 操作成功
assert_type: ==
assert_sql:
extract:
# 正常情况下取消置顶的前提条件是存在一个已经置顶的项目。但是由于pms_top_project_01是置顶操作pms_top_project_01与pms_top_project_02在一个session内会用到pms_top_project_01的数据因此该接口可以直接执行不需要依赖。
# 但是如果想要该接口能够单独运行成功,还是需要执行全部的前置依赖接口。
case_dependence:
setup:
interface:
- pms_new_project_02
- pms_get_project_list_by_name_02
- pms_top_project_01
teardown:
interface:
- pms_delete_project_01