1 |
8b739bef
|
Stanislav Král
|
*** Settings ***
|
2 |
|
|
Library Browser
|
3 |
7294a1db
|
Stanislav Král
|
Test Setup Setup Homepage
|
4 |
|
|
Test Teardown Delete Root Certificate Authority Teardown
|
5 |
8b739bef
|
Stanislav Král
|
|
6 |
|
|
*** Variables ***
|
7 |
|
|
${url} http://localhost:5000
|
8 |
b0917325
|
Jan Pašek
|
${root_ca_common_name} Root CA
|
9 |
8b739bef
|
Stanislav Král
|
${inter_ca_common_name} Inter CA
|
10 |
7294a1db
|
Stanislav Král
|
${end_cert_common_name} Foo Certificate
|
11 |
b0917325
|
Jan Pašek
|
${no_certificate_found} No certificate found
|
12 |
8b739bef
|
Stanislav Král
|
${common_name_field} xpath=//input[@id='subject_CN']
|
13 |
|
|
${created_certificate_link} xpath=//table//td[1]/a
|
14 |
|
|
${delete_button} xpath=//button[contains(@class, 'certificate-control') and text()="Delete"]
|
15 |
|
|
${delete_button_modal} xpath=//div[@id="deleteModal"]//button[text()="Delete"]
|
16 |
|
|
${table_rows} xpath=//div[@id="certificateListingPage"]//table/tbody/tr
|
17 |
7294a1db
|
Stanislav Král
|
${table_rows_count} xpath=count(//div[@id="certificateListingPage"]//table/tbody/tr)
|
18 |
8b739bef
|
Stanislav Král
|
${create_cert_select} xpath=//select[@id="CA"]
|
19 |
|
|
${revocation_reason_select} xpath=//select[@id="reasonSelect"]
|
20 |
|
|
${revoke_button_modal} xpath=//div[@id="revokeModal"]//button[text() = "Revoke"]
|
21 |
|
|
${certificate_status_span} xpath=//table//td[2]/h5/span
|
22 |
|
|
|
23 |
|
|
*** Test Cases ***
|
24 |
|
|
User Can Manage Certificate Authorities
|
25 |
7294a1db
|
Stanislav Král
|
Page Title Is Certificate Listing # FR 1.1 - root CA
|
26 |
8b739bef
|
Stanislav Král
|
Certificate Table Is Empty
|
27 |
|
|
Create Root Certificate Authority ${root_ca_common_name}
|
28 |
|
|
Page Title Is Certificate Listing
|
29 |
|
|
Certificate Table Has Number Of Entries 1
|
30 |
|
|
Verify Certificate Is A Certificate Authority ${root_ca_common_name}
|
31 |
7294a1db
|
Stanislav Král
|
Create Intermediate Certificate Authority ${root_ca_common_name} ${inter_ca_common_name} # FR 1.1 - inter CA
|
32 |
8b739bef
|
Stanislav Král
|
Certificate Table Has Number Of Entries 2
|
33 |
|
|
Verify Certificate Is A Certificate Authority ${inter_ca_common_name}
|
34 |
7294a1db
|
Stanislav Král
|
Open Certificate Detail ${inter_ca_common_name} # FR 1.3 - validity
|
35 |
8b739bef
|
Stanislav Král
|
Page Title Is Certificate Detailed View
|
36 |
|
|
Certificate Status Is Valid
|
37 |
7294a1db
|
Stanislav Král
|
Revoke Certificate keyCompromise # FR 1.2 - revocation
|
38 |
8b739bef
|
Stanislav Král
|
Check Certificate Is Revoked
|
39 |
7294a1db
|
Stanislav Král
|
Click Delete Button # FR 1.3 - deletion
|
40 |
8b739bef
|
Stanislav Král
|
Confirm Delete Dialog
|
41 |
|
|
Page Title Is Certificate Listing
|
42 |
|
|
Certificate Table Has Number Of Entries 1
|
43 |
|
|
First Certificate Table Entry Common Name Is ${root_ca_common_name}
|
44 |
|
|
|
45 |
7294a1db
|
Stanislav Král
|
User Can Manage Certificates
|
46 |
|
|
Page Title Is Certificate Listing # root CA required
|
47 |
|
|
Certificate Table Is Empty
|
48 |
|
|
Create Root Certificate Authority ${root_ca_common_name}
|
49 |
|
|
Create Certificate ${root_ca_common_name} ${end_cert_common_name} # FR 2.1
|
50 |
|
|
Certificate Table Has Number Of Entries 2
|
51 |
|
|
Open Certificate Detail ${end_cert_common_name} # FR 2.3
|
52 |
|
|
Certificate Status Is Valid
|
53 |
|
|
Revoke Certificate keyCompromise # FR 2.2
|
54 |
|
|
Check Certificate Is Revoked
|
55 |
|
|
|
56 |
8b739bef
|
Stanislav Král
|
*** Keywords ***
|
57 |
7294a1db
|
Stanislav Král
|
Delete Root Certificate Authority Teardown
|
58 |
8b739bef
|
Stanislav Král
|
Setup Homepage
|
59 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
60 |
7294a1db
|
Stanislav Král
|
Page Title Is Certificate Listing
|
61 |
|
|
Open Certificate Detail ${root_ca_common_name}
|
62 |
|
|
# deleting the root CA deletes all of it's children
|
63 |
|
|
Click Delete Button
|
64 |
|
|
Confirm Delete Dialog
|
65 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
66 |
7294a1db
|
Stanislav Král
|
Certificate Table Is Empty
|
67 |
8b739bef
|
Stanislav Král
|
|
68 |
|
|
Create Root Certificate Authority
|
69 |
|
|
[Arguments] ${common_name}
|
70 |
|
|
Click "+"
|
71 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
72 |
8b739bef
|
Stanislav Král
|
Page Title Is Create Certificate
|
73 |
|
|
Fill Common Name Field ${common_name}
|
74 |
|
|
Click "Create certificate"
|
75 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
76 |
7294a1db
|
Stanislav Král
|
Page Title Is Certificate Listing
|
77 |
8b739bef
|
Stanislav Král
|
|
78 |
|
|
Create Intermediate Certificate Authority
|
79 |
|
|
[Arguments] ${issuer_common_name} ${common_name}
|
80 |
|
|
Click "+"
|
81 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
82 |
8b739bef
|
Stanislav Král
|
Page Title Is Create Certificate
|
83 |
|
|
Select Issuer ${issuer_common_name}
|
84 |
|
|
Fill Common Name Field ${common_name}
|
85 |
|
|
Check Checkbox "CA"
|
86 |
|
|
Click "Create certificate"
|
87 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
88 |
8b739bef
|
Stanislav Král
|
Page Title Is Certificate Listing
|
89 |
|
|
|
90 |
7294a1db
|
Stanislav Král
|
Create Certificate
|
91 |
|
|
[Arguments] ${issuer_common_name} ${common_name}
|
92 |
|
|
Click "+"
|
93 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
94 |
7294a1db
|
Stanislav Král
|
Page Title Is Create Certificate
|
95 |
|
|
Select Issuer ${issuer_common_name}
|
96 |
|
|
Fill Common Name Field ${common_name}
|
97 |
|
|
Click "Create certificate"
|
98 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
99 |
7294a1db
|
Stanislav Král
|
Page Title Is Certificate Listing
|
100 |
|
|
|
101 |
8b739bef
|
Stanislav Král
|
Open Certificate Detail
|
102 |
|
|
[Arguments] ${common_name}
|
103 |
|
|
Click xpath=//td/a[string() = "${common_name}"]
|
104 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
105 |
8b739bef
|
Stanislav Král
|
|
106 |
|
|
Revoke Certificate
|
107 |
|
|
[Arguments] ${reason}
|
108 |
|
|
Click Revoke Button
|
109 |
|
|
Select Revocation Reason ${reason}
|
110 |
|
|
Confirm Revoke Dialog
|
111 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
112 |
8b739bef
|
Stanislav Král
|
|
113 |
|
|
Verify Certificate Is A Certificate Authority
|
114 |
|
|
[Arguments] ${common_name}
|
115 |
|
|
Open Certificate Detail ${common_name}
|
116 |
b0917325
|
Jan Pašek
|
Wait Until Network Is Idle
|
117 |
8b739bef
|
Stanislav Král
|
Get Checkbox State xpath=//input[@id="isCA"] == checked
|
118 |
|
|
Go Back
|
119 |
|
|
|
120 |
|
|
Setup Homepage
|
121 |
|
|
New Page ${url}
|
122 |
|
|
|
123 |
|
|
Certificate Table Has Number Of Entries
|
124 |
|
|
[Arguments] ${number_of_entries}
|
125 |
|
|
Get Element Count ${table_rows} == ${number_of_entries}
|
126 |
|
|
|
127 |
|
|
Certificate Table Is Empty
|
128 |
b0917325
|
Jan Pašek
|
Certificate Table Has Number Of Entries 1
|
129 |
|
|
Get Text ${table_rows} == ${no_certificate_found}
|
130 |
8b739bef
|
Stanislav Král
|
|
131 |
|
|
Page Title Is
|
132 |
|
|
[Arguments] ${title}
|
133 |
|
|
Get Text h1 contains ${title}
|
134 |
|
|
|
135 |
|
|
Fill Common Name Field
|
136 |
|
|
[Arguments] ${common_name}
|
137 |
|
|
Fill Text ${common_name_field} ${common_name}
|
138 |
|
|
|
139 |
|
|
First Certificate Table Entry Common Name Is
|
140 |
|
|
[Arguments] ${common_name}
|
141 |
|
|
Get Text ${created_certificate_link} == ${common_name}
|
142 |
|
|
|
143 |
|
|
Click First Certificate Table Entry
|
144 |
|
|
Click ${created_certificate_link}
|
145 |
|
|
|
146 |
|
|
Click Delete Button
|
147 |
|
|
Click ${delete_button}
|
148 |
|
|
|
149 |
|
|
Confirm Delete Dialog
|
150 |
|
|
Click ${delete_button_modal}
|
151 |
|
|
|
152 |
|
|
Select Issuer
|
153 |
|
|
[Arguments] ${issuer_name}
|
154 |
|
|
Select Options By ${create_cert_select} Label ${issuer_name}
|
155 |
|
|
|
156 |
|
|
Click Revoke Button
|
157 |
|
|
Click "Revoke"
|
158 |
|
|
|
159 |
|
|
Confirm Revoke Dialog
|
160 |
|
|
Click ${revoke_button_modal}
|
161 |
|
|
|
162 |
|
|
Select Revocation Reason
|
163 |
|
|
[Arguments] ${revocation_reason}
|
164 |
|
|
Get Element ${revocation_reason_select}
|
165 |
|
|
Select Options By ${revocation_reason_select} Label ${revocation_reason}
|
166 |
|
|
|
167 |
|
|
Revocation Success Messsage Is Shown
|
168 |
|
|
Get Element xpath=//div[@class="alert alert-success" and contains(string(), "Certificate revocation successful.")]
|
169 |
|
|
|
170 |
|
|
Certificate Status Is
|
171 |
|
|
[Arguments] ${certificate_status}
|
172 |
|
|
Get Text ${certificate_status_span} == ${certificate_status}
|
173 |
|
|
|
174 |
|
|
Check Certificate Is Revoked
|
175 |
|
|
Revocation Success Messsage Is Shown
|
176 |
|
|
Certificate Status Is Revoked
|