ADMIN004_admin_isSenior_testcases.yml
1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
- name: 编辑用户,改为非高管
variables:
id: $adminid
isSenior: 1
api: api/m_api/admin/m_admin_update_api.yml
validate:
- equals:
- content.code
- 0