Add ToolsSystem.robot
[integration/test.git] / csit / suites / dluxapps / yangman / 502__yangman.robot
1 *** Settings ***
2 Documentation     Verification that DLUX cotains Yangman submenu when logged in.
3 ...               Verification that when Yangman submenu entered, there are certain elements displayed.
4 ...               Verification that the selected operation is displayed and relevant code mirror(s) is/are displayed.
5 Suite Teardown    Close Browser
6 Resource          ${CURDIR}/../../../libraries/YangmanKeywords.robot
7
8 *** Variables ***
9
10 *** Test Cases ***
11 Open dlux and login and verify yangman submenu has been loaded
12     GUIKeywords.Open Or Launch DLUX Page And Log In To DLUX
13
14 Verify yangman submenu elements
15     GUIKeywords.Navigate To URL    ${YANGMAN_SUBMENU_URL}
16     YangmanKeywords.Verify Yangman Home Page Elements
17     Verify Operations Presence In Operation Select Menu
18     YangmanKeywords.Exit Opened Application Dialog
19
20 Verify operation selection and code mirror displaying works correctly
21     Select Each Operation And Verify That Code Mirrors Has Been Displayed Correctly
22
23 Verify that selecting/deselecting show data checkboxes in json view results in displaying/hiding the corresponding code mirror
24     Verify Displaying And Hiding Of CMs When Selecting Show Data Checkboxes
25
26 *** Keywords ***
27 Verify Operations Presence In Operation Select Menu
28     YangmanKeywords.Expand Operation Select Menu
29     Selenium2Library.Wait Until Page Contains Element    ${GET_OPTION}
30     Selenium2Library.Wait Until Page Contains Element    ${PUT_OPTION}
31     Selenium2Library.Wait Until Page Contains Element    ${POST_OPTION}
32     Selenium2Library.Wait Until Page Contains Element    ${DELETE_OPTION}
33
34 Select Each Operation And Verify That Code Mirrors Has Been Displayed Correctly
35     ${operation_ids}=    YangmanKeywords.Return List Of Operation IDs
36     ${operation_names}=    YangmanKeywords.Return List Of Operation Names
37     : FOR    ${i}    IN RANGE    0    len(${operation_ids})
38     \    ${operation_id}=    Collections.Get From List    ${operation_ids}    ${i}
39     \    ${operation_name}=    Collections.Get From List    ${operation_names}    ${i}
40     \    YangmanKeywords.Expand Operation Select Menu And Select Operation    ${operation_id}    ${operation_name}
41     \    Run Keyword If    "${operation_name}"=="PUT" or "${operation_name}"=="POST"    BuiltIn.Run Keywords    YangmanKeywords.Verify Sent Data CM Is Displayed
42     \    ...    AND    YangmanKeywords.Verify Received Data CM Is Displayed
43     \    Run Keyword If    "${operation_name}"=="GET" or "${operation_name}"=="DELETE"    YangmanKeywords.Verify Received Data CM Is Displayed
44
45 Verify Displaying And Hiding Of CMs When Selecting Show Data Checkboxes
46     YangmanKeywords.Select Json View
47     YangmanKeywords.Expand Operation Select Menu And Select Operation    ${GET_OPTION}    GET
48     YangmanKeywords.Verify Sent Data CM Is Not Displayed
49     YangmanKeywords.Verify Received Data CM Is Displayed
50     GUIKeywords.Patient Click    ${SHOW_SENT_DATA_CHECKBOX_UNSELECTED}    ${SHOW_SENT_DATA_CHECKBOX_SELECTED}
51     YangmanKeywords.Verify Sent Data CM Is Displayed
52     YangmanKeywords.Verify Received Data CM Is Displayed
53     GUIKeywords.Patient Click    ${SHOW_RECEIVED_DATA_CHECKBOX_SELECTED}    ${SHOW_RECEIVED_DATA_CHECKBOX_UNSELECTED}
54     YangmanKeywords.Verify Sent Data CM Is Displayed
55     YangmanKeywords.Verify Received Data CM Is Not Displayed
56     GUIKeywords.Patient Click    ${SHOW_SENT_DATA_CHECKBOX_SELECTED}    ${SHOW_SENT_DATA_CHECKBOX_UNSELECTED}
57     YangmanKeywords.Verify Sent Data CM Is Not Displayed
58     YangmanKeywords.Verify Received Data CM Is Not Displayed