|
|
config:
|
|
|
name: ADMIN004-管理员高管设置是否正确
|
|
|
base_url: ${ENV(base_manager_url)}
|
|
|
|
|
|
teststeps:
|
|
|
- name: $phone 登录系统
|
|
|
variables:
|
|
|
phone: ${ENV(adminphone)}
|
|
|
testcase: testcases/common/m_login_testcases.yml
|
|
|
|
|
|
- name: 管理员列表
|
|
|
variables:
|
|
|
searchText: 'autotester'
|
|
|
api: api/m_api/admin/m_admin_list_api.yml
|
|
|
extract:
|
|
|
- totalRow: content.data.gridResult.totalRow
|
|
|
- adminid: content.data.gridResult.lists.0.id
|
|
|
validate:
|
|
|
- length_equals:
|
|
|
- content.data.gridResult.lists
|
|
|
- $totalRow
|
|
|
- equals:
|
|
|
- content.data.gridResult.lists.0.isSenior
|
|
|
- 1
|
|
|
|
|
|
- name: 查看用户详情
|
|
|
variables:
|
|
|
id: $adminid
|
|
|
api: api/m_api/admin/m_admin_detail_api.yml
|
|
|
validate:
|
|
|
- equals:
|
|
|
- content.data.isSenior
|
|
|
- 1
|
|
|
|
|
|
- name: 编辑用户,改为非高管
|
|
|
variables:
|
|
|
id: $adminid
|
|
|
isSenior: 2
|
|
|
api: api/m_api/admin/m_admin_update_api.yml
|
|
|
validate:
|
|
|
- equals:
|
|
|
- content.code
|
|
|
- 0
|
|
|
|
|
|
- name: 管理员列表
|
|
|
variables:
|
|
|
searchText: 'autotester'
|
|
|
api: api/m_api/admin/m_admin_list_api.yml
|
|
|
extract:
|
|
|
- totalRow: content.data.gridResult.totalRow
|
|
|
- adminid: content.data.gridResult.lists.0.id
|
|
|
validate:
|
|
|
- length_equals:
|
|
|
- content.data.gridResult.lists
|
|
|
- $totalRow
|
|
|
- equals:
|
|
|
- content.data.gridResult.lists.0.isSenior
|
|
|
- 2
|
|
|
|
|
|
- name: 查看用户详情
|
|
|
variables:
|
|
|
id: $adminid
|
|
|
api: api/m_api/admin/m_admin_detail_api.yml
|
|
|
validate:
|
|
|
- equals:
|
|
|
- content.data.isSenior
|
|
|
- 2 |
...
|
...
|
|