Projekt

Obecné

Profil

Stáhnout (1.84 KB) Statistiky
| Větev: | Tag: | Revize:
1 50b2342e Stanislav Král
*** Settings ***
2
Library   Browser
3
4
*** Variables ***
5
${url}  http://localhost:5000
6
${common_name}  Foo Bar CA
7
${common_name_field}    xpath=//input[@id='subject_CN']
8
${created_certificate_link}    xpath=//table//td[1]/a
9
${delete_button}    xpath=//button[contains(@class, 'certificate-control') and text()="Delete"]
10
${delete_button_modal}    xpath=//div[@id="deleteModal"]//button[text()="Delete"]
11
${table_rows}   xpath=//div[@id="certificateListingPage"]//table/tbody/tr
12
13
14
*** Test Cases ***
15
Example Test
16
    Setup Homepage
17 341a40f4 Stanislav Král
    Page Title Is    Certificate Listing
18 c1a7a041 Stanislav Král
    Certificate Table Is Empty
19 50b2342e Stanislav Král
    Click   "Create certificate"
20 341a40f4 Stanislav Král
    Page Title Is    Create Certificate
21
    Fill Common Name Field    ${common_name}
22 50b2342e Stanislav Král
    Click   "Create certificate"
23 341a40f4 Stanislav Král
    Page Title Is    Certificate Listing
24
    Certificate Table Has Number Of Entries     1
25
    First Certificate Table Entry Common Name Is     ${common_name}
26
    Click First Certificate Table Entry
27
    Click Delete Button
28
    Confirm Delete Dialog
29
    Page Title Is    Certificate Listing
30
    Certificate Table Is Empty
31 50b2342e Stanislav Král
32
33
*** Keywords ***
34
Setup Homepage
35 c1a7a041 Stanislav Král
    New Page    ${url}
36
37 341a40f4 Stanislav Král
Certificate Table Has Number Of Entries
38
    [Arguments]     ${number_of_entries}
39
    Get Element Count     ${table_rows}   ==  ${number_of_entries}
40
41 c1a7a041 Stanislav Král
Certificate Table Is Empty
42 341a40f4 Stanislav Král
    Certificate Table Has Number Of Entries     0
43
44
Page Title Is
45
    [Arguments]     ${title}
46
    Get Text    h1    contains    ${title}
47
48
Fill Common Name Field
49
    [Arguments]     ${common_name}
50
    Fill Text   ${common_name_field}    ${common_name}
51
52
First Certificate Table Entry Common Name Is
53
    [Arguments]     ${common_name}
54
    Get Text    ${created_certificate_link}  ==     ${common_name}
55
56
Click First Certificate Table Entry
57
    Click   ${created_certificate_link}
58
59
Click Delete Button
60
    Click   ${delete_button}
61
62
Confirm Delete Dialog
63
    Click   ${delete_button_modal}