Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 341a40f4

Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)

Re #8703 - Improved sample.robot test by adding various keywords

Zobrazit rozdíly:

robot_tests/sample.robot
14 14
*** Test Cases ***
15 15
Example Test
16 16
    Setup Homepage
17
    Get Text    h1    contains    Certificate Listing
17
    Page Title Is    Certificate Listing
18 18
    Certificate Table Is Empty
19 19
    Click   "Create certificate"
20
    Get Text    h1    contains    Create Certificate
21
    Fill Text   ${common_name_field}    ${common_name}
20
    Page Title Is    Create Certificate
21
    Fill Common Name Field    ${common_name}
22 22
    Click   "Create certificate"
23
    Get Text    h1    contains    Certificate Listing
24
    Get Element Count     ${table_rows}   ==  1
25
    Get Text    ${created_certificate_link}  ==     ${common_name}
26
    Click   ${created_certificate_link}
27
    Click   ${delete_button}
28
    Click   ${delete_button_modal}
29
    Get Text    h1    contains    Certificate Listing
30
    Get Element Count     ${table_rows}   ==  0
23
    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 31

  
32 32

  
33 33
*** Keywords ***
34 34
Setup Homepage
35 35
    New Page    ${url}
36 36

  
37
Certificate Table Has Number Of Entries
38
    [Arguments]     ${number_of_entries}
39
    Get Element Count     ${table_rows}   ==  ${number_of_entries}
40

  
37 41
Certificate Table Is Empty
38
    Get Element Count     ${table_rows}   ==  0
42
    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}
64

  

Také k dispozici: Unified diff