Add Yangman modules loading testing robot suite 72/54772/8
authorDaša Šimková <dasa.simkova@pantheon.sk>
Wed, 12 Apr 2017 09:56:56 +0000 (11:56 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 25 May 2017 00:27:58 +0000 (00:27 +0000)
Add navigate to yangman url test step to 502 yangman test suite to
secure that yangman submenu url is navigated to when yangman is not
the only dluxapps feature installed.

Change-Id: I08e98b5665462c275400f19cc3162fd04c181e5c
Signed-off-by: Daša Šimková <dasa.simkova@pantheon.tech>
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/GUIKeywords.robot
csit/libraries/YangmanKeywords.robot
csit/suites/dluxapps/yangman/502__yangman.robot
csit/suites/dluxapps/yangman/505__yangmam_modules_loading.robot [new file with mode: 0644]
csit/variables/YangmanGUIVariables.robot

index 591e6cb386602523ae9d724f9662fd39971cf4e8..8b36382113cf64ea86068f2a599e0052fd558004 100644 (file)
@@ -9,7 +9,7 @@ Resource          ../variables/Variables.robot
 Resource          Utils.robot
 
 *** Variables ***
-${BROWSER}        chrome
+${BROWSER}        phantomjs
 ${BASE_URL}       http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/index.html
 ${LOGIN_URL}      ${BASE_URL}#/login
 ${XVFB_PORT}      99
index f337405cfad8f4364895953ed1fce0556eb45f67..16620fa284de5f566ea38ce2ca8514d20cfb2ea6 100644 (file)
@@ -58,6 +58,59 @@ Expand Operation Select Menu And Select Operation
     Expand Operation Select Menu
     Select Operation And Verify Operation Has Been Selected    ${operation_id}    ${selected_operation_name}
 
+Send Request
+    [Documentation]    Clicks Send request button and waits until progression bar disappears.
+    Selenium2Library.Click Element    ${SEND_BUTTON}
+    Selenium2Library.Wait Until Page Contains Element    ${HEADER_LINEAR_PROGRESSION_BAR_HIDDEN}
+
+Verify Request Status Code Matches Desired Code
+    [Arguments]    ${desired_code_regexp}
+    [Documentation]    Verifies that execution status code matches regexp provided as an argument.
+    ${request_status}=    BuiltIn.Wait Until Keyword Succeeds    30 s    5 s    Selenium2Library.Get Text    ${STATUS_VALUE}
+    BuiltIn.Should Match Regexp    ${request_status}    ${desired_code_regexp}
+
+Verify Request Execution Time Is Present
+    [Documentation]    Verifies that execution time value is present.
+    ${time_value}=    BuiltIn.Wait Until Keyword Succeeds    30 s    5 s    Selenium2Library.Get Text    ${TIME_VALUE}
+    BuiltIn.Should Contain    ${time_value}    ${MILLISECONDS_LABEL}
+
+Verify Request Execution Time Is Threedots
+    [Documentation]    Verifies that execution time value is threedots.
+    ${time_value}=    BuiltIn.Wait Until Keyword Succeeds    30 s    5 s    Selenium2Library.Get Text    ${TIME_VALUE}
+    BuiltIn.Should Contain    ${time_value}    ${THREE_DOTS_DEFAULT_STATUS_AND_TIME}
+
+Send Request And Verify Request Status Code Matches Desired Code
+    [Arguments]    ${desired_code_regexp}
+    [Documentation]    Sends request and verifies that execution status code matches regexp provided as an argument.
+    Send Request
+    Verify Request Status Code Matches Desired Code    ${desired_code_regexp}
+    Verify Request Execution Time Is Present
+
+Execute Chosen Operation From Form
+    [Arguments]    ${operation_id}    ${selected_operation_name}    ${selected_true_false}
+    [Documentation]    Selects operation, selects or unselects fill form with received data after execution checkbox.
+    Expand Operation Select Menu And Select Operation    ${operation_id}    ${selected_operation_name}
+    Select Fill Form With Received Data After Execution Checkbox    ${selected_true_false}
+    Send Request
+
+Execute Chosen Operation From Form And Check Status Code
+    [Arguments]    ${operation_id}    ${selected_operation_name}    ${selected_true_false}    ${desired_code_regexp}
+    [Documentation]    Selects operation, selects or unselects fill form with received data after execution checkbox and
+    ...    verifies that execution status matches regexp provided as an argument.
+    Expand Operation Select Menu And Select Operation    ${operation_id}    ${selected_operation_name}
+    Select Fill Form With Received Data After Execution Checkbox    ${selected_true_false}
+    Send Request
+    BuiltIn.Run Keyword If    "${desired_code_regexp}"=="${THREE_DOTS_DEFAULT_STATUS_AND_TIME}"    BuiltIn.Run Keywords    Verify Request Status Code Matches Desired Code    ${THREE_DOTS_DEFAULT_STATUS_AND_TIME}
+    ...    AND    Verify Request Execution Time Is Threedots
+    BuiltIn.Run Keyword If    "${desired_code_regexp}"!="${THREE_DOTS_DEFAULT_STATUS_AND_TIME}"    BuiltIn.Run Keywords    Verify Request Status Code Matches Desired Code    ${desired_code_regexp}
+    ...    AND    Verify Request Execution Time Is Present
+
+Return Labelled Api Path Input
+    [Arguments]    ${branch_label_without_curly_braces_part}
+    [Documentation]    Returns Xpath of labelled API path input field.
+    ${labelled_api_path_input}=    BuiltIn.Set Variable    ${API_PATH}//span[contains(text(), "/${branch_label_without_curly_braces_part}")]//parent::md-input-container//following-sibling::md-input-container[last()]/input
+    [Return]    ${labelled_api_path_input}
+
 Verify Yangman Home Page Elements
     [Documentation]    Verifies presence of Yangman home page elements.
     Selenium2Library.Wait Until Page Contains Element    ${YANGMAN_LOGO}
@@ -174,15 +227,36 @@ Return Indexed Module From Module Name
     ${module_list_item_indexed}=    Return Module List Indexed Module    ${module_id_index}
     [Return]    ${module_list_item_indexed}
 
+Return Module List Item Collapsed Indexed
+    [Arguments]    ${index}
+    [Documentation]    Returns Xpath of collapsed indexed module.
+    ${indexed_module}=    Return Module List Indexed Module    ${index}
+    ${module_list_item_collapsed_indexed}=    BuiltIn.Set Variable    ${indexed_module}//following-sibling::md-list[@aria-hidden="true"]
+    [Return]    ${module_list_item_collapsed_indexed}
+
+Return Module List Item Expanded Indexed
+    [Arguments]    ${index}
+    [Documentation]    Returns Xpath of expanded indexed module.
+    ${indexed_module}=    Return Module List Indexed Module    ${index}
+    ${module_list_item_expanded_indexed}=    BuiltIn.Set Variable    ${indexed_module}//following-sibling::md-list[@aria-hidden="false"]
+    [Return]    ${module_list_item_expanded_indexed}
+
+Return Indexed Module Expander Icon
+    [Arguments]    ${index}
+    [Documentation]    Returns xpath of indexed module expander icon.
+    ${indexed_module}=    Return Module List Indexed Module    ${index}
+    ${indexed_module_expander_icon}=    BuiltIn.Set Variable    ${indexed_module}/md-icon
+    [Return]    ${indexed_module_expander_icon}
+
 Expand Module
     [Arguments]    ${module_name}    ${module_id_index}
     [Documentation]    Clicks module list item in modules tab to expand the item and display its operations/ operational/ config items.
     ...    Arguments are either module name, or module id index, that is a number, or ${EMPTY}, if the option is not used.
     ${module_list_item_indexed}=    BuiltIn.Run Keyword If    "${module_name}"!= "${EMPTY}"    Return Indexed Module From Module Name    ${module_name}
     ${module_list_item_indexed}=    BuiltIn.Run Keyword If    "${module_id_index}"!= "${EMPTY}"    Return Module List Indexed Module    ${module_id_index}
-    Selenium2Library.Click Element    ${module_list_item_indexed}
-    ${module_list_item_collapsed_indexed}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="true"]
-    Selenium2Library.Page Should Not Contain Element    ${module_list_item_collapsed_indexed}
+    ${module_list_item_expanded_indexed}=    BuiltIn.Set Variable    ${module_list_item_indexed}//following-sibling::md-list[@aria-hidden="false"]
+    GUIKeywords.Mouse Down And Mouse Up Click Element    ${module_list_item_indexed}
+    Selenium2Library.Wait Until Page Contains Element    ${module_list_item_expanded_indexed}
 
 Expand Module And Click Module Operational Item
     [Arguments]    ${module_name}    ${module_id_index}
@@ -283,6 +357,13 @@ Return Branch Label Without Curly Braces Part
     ${branch_label_without_curly_braces_part}=    String.Fetch From Left    ${branch_label}    ${SPACE}
     [Return]    ${branch_label_without_curly_braces_part}
 
+Return Branch Label Curly Braces Part Without Braces
+    [Arguments]    ${branch_label}
+    [Documentation]    Returns string - curly braces part of label of indexed branch in module detail without curly braces.
+    ${branch_label_curly_braces_part}=    String.Fetch From Right    ${branch_label}    ${SPACE}
+    ${branch_label_curly_braces_part}=    String.Strip String    ${branch_label_curly_braces_part}    characters={}
+    [Return]    ${branch_label_curly_braces_part}
+
 Return Labelled Branch Toggle Button
     [Arguments]    ${labelled_branch_xpath}
     [Documentation]    Returns xpath of toggle button of labelled branch in module detail.
@@ -303,6 +384,13 @@ Click Module Detail Branch Indexed
     Selenium2Library.Page Should Contain Element    ${module_detail_branch_indexed}
     GUIKeywords.Mouse Down And Mouse Up Click Element    ${module_detail_branch_indexed}
 
+Return And Click Module Detail Branch Indexed
+    [Arguments]    ${branch_label}
+    [Documentation]    Returns and click Click indexed branch in module detail.
+    ${branch_id}=    Return Module Detail Branch ID From Branch Label    ${branch_label}
+    ${module_detail_branch_indexed}=    Return Module Detail Branch Indexed    ${branch_id}
+    Click Module Detail Branch Indexed    ${module_detail_branch_indexed}
+
 Verify Module Detail Branch Is List Branch
     [Arguments]    ${module_detail_branch_indexed}
     [Documentation]    Returns status "True" if module detail branch is a list branch and "False" if module detail branch is not a list brnach.
@@ -329,12 +417,25 @@ Return Form List Item With Index Or Key
     ${list_item_with_index_or_key}=    BuiltIn.Set Variable If    "${branch_label_curly_braces_part}"=="${EMPTY}"    ${FORM_TOP_ELEMENT_LIST_ITEM_LABEL}[contains(text(), "${branch_label_without_curly_braces_part}") and contains(text(), "[${index_or_key}]")]    ${FORM_TOP_ELEMENT_LIST_ITEM_LABEL}[contains(text(), "${branch_label_without_curly_braces_part}") and contains(text(), "${key_part}")]
     [Return]    ${list_item_with_index_or_key}
 
+Click Form List Item With Index Or Key
+    [Arguments]    ${branch_label}    ${id/ref/prefix_part}    ${index/key}
+    [Documentation]    Clicks form list item with given index or key is visible.
+    ${list_item_with_index_or_key}=    Return Form List Item With Index Or Key    ${branch_label}    ${id/ref/prefix_part}    ${index/key}
+    Selenium2Library.Click Element    ${list_item_with_index_or_key}
+
 Verify List Item With Index Or Key Is Visible
     [Arguments]    ${branch_label}    ${branch_label_curly_braces_part}    ${index_or_key}
     [Documentation]    Verifies that form list item with given index or key is visible.
     ${list_item_with_index_or_key}=    Return Form List Item With Index Or Key    ${branch_label}    ${branch_label_curly_braces_part}    ${index_or_key}
     Selenium2Library.Wait Until Element Is Visible    ${list_item_with_index_or_key}
 
+Load And Expand Network Topology In Form
+    [Documentation]    Loads and expands network-topology top element container.
+    Select Form View
+    YangmanKeywords.Return And Click Module Detail Branch Indexed    ${Network_Topology_Branch_Label}
+    Selenium2Library.Page Should Contain Element    ${FORM_TOP_ELEMENT_CONTAINER}
+    Selenium2Library.Click Element    ${FORM_TOP_ELEMENT_POINTER}
+
 Load Topology Topology Id Node In Form
     [Documentation]    Expands network-topology branch in testing module detail and clicks topology {topology-id} branch to load topology list node in form.
     Select Form View
@@ -344,6 +445,75 @@ Load Topology Topology Id Node In Form
     YangmanKeywords.Return Branch Toggle Button From Branch Label And Click    ${TOPOLOGY_TOPOLOGY_ID_LABEL}
     Verify List Item With Index Or Key Is Visible    ${TOPOLOGY_TOPOLOGY_ID_LABEL}    ${EMPTY}    0
 
+Load Node Node Id Node In Form
+    [Documentation]    Expands network-topology branch in testing module detail and clicks topology {topology-id} branch to load topology list node in form.
+    Select Form View
+    ${node_node_id_branch}=    Return Module Detail Labelled Branch Xpath    ${NODE_NODE_ID_LABEL}
+    ${node_branch_is_visible}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Element Should Be Visible    ${node_node_id_branch}
+    BuiltIn.Run Keyword If    "${node_branch_is_visible}"=="False"    Run Keywords    Load Topology Topology Id Node In Form
+    ...    AND    Return Branch Toggle Button From Branch Label And Click    ${TOPOLOGY_TOPOLOGY_ID_LABEL}
+    YangmanKeywords.Return And Click Module Detail Branch Indexed    ${NODE_NODE_ID_LABEL}
+    Verify List Item With Index Or Key Is Visible    ${NODE_NODE_ID_LABEL}    ${EMPTY}    0
+
+Return Labelled Element Yangmenu
+    [Arguments]    ${label}
+    [Documentation]    Returns xpath of labelled element yangmenu in form.
+    ${form_top_element_labelled}=    Return Form Top Element Labelled    ${label}
+    ${form_labelled_element_yangmenu}=    BuiltIn.Set Variable    ${form_top_element_labelled}//following::yang-form-menu
+    [Return]    ${form_labelled_element_yangmenu}
+
+Return And Click Labelled Element Yangmenu
+    [Arguments]    ${label}
+    [Documentation]    Returns xpath of labelled element yangmenu in form and clicks the yangmenu.
+    ${form_labelled_element_yangmenu}=    Return Labelled Element Yangmenu    ${label}
+    Selenium2Library.Element Should Be Visible    ${form_labelled_element_yangmenu}
+    GUIKeywords.Mouse Down And Mouse Up Click Element    ${form_labelled_element_yangmenu}
+
+Return Labelled Element Show Previous Item Arrow
+    [Arguments]    ${label}
+    [Documentation]    Returns xpath of labelled element show previous list item icon in form.
+    ${form_top_element_labelled}=    Return Form Top Element Labelled    ${label}
+    ${labelled_show_previous_item_arrow}=    BuiltIn.Set Variable    ${form_top_element_labelled}//following::md-prev-button[@aria-label="Previous Page"]
+    [Return]    ${labelled_show_previous_item_arrow}
+
+Return Labelled Element Show Next Item Arrow
+    [Arguments]    ${label}
+    [Documentation]    Returns xpath of labelled element show next list item icon.
+    ${form_top_element_labelled}=    Return Form Top Element Labelled    ${label}
+    ${labelled_show_next_item_arrow}=    BuiltIn.Set Variable    ${form_top_element_labelled}//following::md-next-button[@aria-label="Next Page"]
+    [Return]    ${labelled_show_next_item_arrow}
+
+Return Labelled Form Input Field
+    [Arguments]    ${branch_label_curly_braces_part}
+    [Documentation]    Returns xpath of labelled form input field.
+    ${labelled_input_field}=    BuiltIn.Set Variable    ${FORM_CONTENT}//span[contains(@class, "ng-binding ng-scope") and contains(text(), "${branch_label_curly_braces_part}")]//following::input
+    [Return]    ${labelled_input_field}
+
+Return Labelled Form Select
+    [Arguments]    ${branch_label_curly_braces_part}
+    [Documentation]    Returns labelled form input field.
+    ${labelled_select}=    BuiltIn.Set Variable    ${FORM_CONTENT}//span[contains(@class, "ng-binding ng-scope") and contains(text(), "${branch_label_curly_braces_part}")]//following::md-select
+    [Return]    ${labelled_select}
+
+Input Text To Labelled Form Input Field
+    [Arguments]    ${branch_label_curly_braces_part}    ${text}
+    [Documentation]    Returns labelled form input field and inputs the text provided as an argument into it.
+    ${labelled_input_field}=    Return Labelled Form Input Field    ${branch_label_curly_braces_part}
+    Selenium2Library.Input Text    ${labelled_input_field}    ${text}
+
+Verify Form Contains Error Message
+    [Arguments]    ${error_message}
+    [Documentation]    Verifies that the form contains error message that is provided as an argument.
+    ${form_error_message}=    BuiltIn.Set Variable    //p[contains(@id, "form-error-message") and contains (text(), "${error_message}")]
+    Selenium2Library.Page Should Contain Element    ${form_error_message}
+
+Verify No Data Are Displayed In Code Mirror Code
+    [Arguments]    ${code_mirror_code}
+    [Documentation]    Verifies that there are no data displayed in either sent or received data code mirror.
+    ...    Value for ${code_mirror_code} is either ${SENT_DATA_CODE_MIRROR_CODE} or ${RECEIVED_DATA_CODE_MIRROR_CODE}.
+    ${number_of_lines_in_code_mirror}=    Selenium2Library.Get Matching Xpath Count    ${code_mirror_code}/div
+    BuiltIn.Should Be Equal    ${number_of_lines_in_code_mirror}    1
+
 Verify Sent Data CM Is Displayed
     [Documentation]    Verifies that sent data code mirror is displayed.
     Selenium2Library.Wait Until Element Is Visible    ${SENT_DATA_CODE_MIRROR_DISPLAYED}
index e3b321283f9bc171398a7e04de021d5bfe4d5c9d..d9418df22b09caeb534847f7fad0d069dda02a23 100644 (file)
@@ -12,6 +12,7 @@ Open dlux and login and verify yangman submenu has been loaded
     GUIKeywords.Open Or Launch DLUX Page And Log In To DLUX
 
 Verify yangman submenu elements
+    GUIKeywords.Navigate To URL    ${YANGMAN_SUBMENU_URL}
     YangmanKeywords.Verify Yangman Home Page Elements
     Verify Operations Presence In Operation Select Menu
     YangmanKeywords.Exit Opened Application Dialog
diff --git a/csit/suites/dluxapps/yangman/505__yangmam_modules_loading.robot b/csit/suites/dluxapps/yangman/505__yangmam_modules_loading.robot
new file mode 100644 (file)
index 0000000..bbc8cc2
--- /dev/null
@@ -0,0 +1,124 @@
+*** Settings ***
+Documentation     Verification that Yangman Modules tab contains at least 1 module loaded.
+...               Verification that each loaded module can be expanded and collapsed.
+...               Verification that each module contains operations, or operational, or config list items when it is extended.
+...               Verification that when operations or operational or config of in modules list is clicked, the name of the module in module detail is the same as the name of the module in module list.
+...               Verification that when operations or operational or config is clicked, module detail tab contains chosen tab in selected mode.
+Suite Setup       YangmanKeywords.Open DLUX And Login And Navigate To Yangman URL
+Suite Teardown    Close Browser
+Resource          ${CURDIR}/../../../libraries/YangmanKeywords.robot
+
+*** Variables ***
+
+*** Test Cases ***
+Verify that any module has been loaded
+    ${number_of_modules}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
+    Set Suite Variable    ${number_of_modules}
+    YangmanKeywords.Verify Any Module Is Loaded
+
+Verify that each loaded module can be expanded and collapsed
+    Verify Each Loaded Module Is Collapsed
+    Expand Each Loaded Module    ${number_of_modules}
+    Verify Each Loaded Module Is Expanded
+    Collapse Each Expanded Module    ${number_of_modules}
+    Verify Each Loaded Module Is Collapsed
+
+Verify that each loaded module contains either operations, or operational and config, when expanded
+    Expand Each Loaded Module    ${number_of_modules}
+    Verify Each Loaded Module Contains Operational Or Config Or Operations    ${number_of_modules}
+    Compare Module Name In Module List And Module Detail    ${number_of_modules}
+
+Verify that when operations or operational and config in modules list is clicked, module detail with chosen tab is displayed
+    Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab Is Selected    ${number_of_modules}
+
+*** Keywords ***
+Verify Each Loaded Module Is Collapsed
+    ${number_of_modules_loaded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
+    ${number_of_modules_loaded_collapsed}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM_COLLAPSED}
+    BuiltIn.Should Be Equal    ${number_of_modules_loaded}    ${number_of_modules_loaded_collapsed}
+
+Verify Each Loaded Module Is Expanded
+    ${number_of_modules_loaded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM}
+    ${number_of_modules_loaded_expanded}=    YangmanKeywords.Return Number Of Modules Loaded    ${MODULE_LIST_ITEM_EXPANDED}
+    BuiltIn.Should Be Equal    ${number_of_modules_loaded}    ${number_of_modules_loaded_expanded}
+
+Expand Each Loaded Module
+    [Arguments]    ${number_of_modules_loaded}
+    : FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
+    \    ${module_list_item_collapsed_indexed}=    YangmanKeywords.Return Module List Item Collapsed Indexed    ${index}
+    \    ${indexed_module_expander_icon}=    YangmanKeywords.Return Indexed Module Expander Icon    ${index}
+    \    ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${module_list_item_collapsed_indexed}
+    \    BuiltIn.Run Keyword If    "${status}"=="True"    GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+    \    Selenium2Library.Wait Until Page Does Not Contain Element    ${module_list_item_collapsed_indexed}
+
+Collapse Each Expanded Module
+    [Arguments]    ${number_of_modules_loaded}
+    : FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
+    \    ${module_list_item_expanded_indexed}=    YangmanKeywords.Return Module List Item Expanded Indexed    ${index}
+    \    ${indexed_module_expander_icon}=    YangmanKeywords.Return Indexed Module Expander Icon    ${index}
+    \    ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${module_list_item_expanded_indexed}
+    \    BuiltIn.Run Keyword If    "${status}"=="True"    Run Keyword    GUIKeywords.Focus And Click Element    ${indexed_module_expander_icon}
+    \    Selenium2Library.Wait Until Page Does Not Contain Element    ${module_list_item_expanded_indexed}
+
+Verify Each Loaded Module Contains Operational Or Config Or Operations
+    [Arguments]    ${number_of_modules_loaded}
+    : FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
+    \    ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
+    \    ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
+    \    ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
+    \    ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operational}
+    \    ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operations}
+    \    ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_config}
+    \    @{states}=    BuiltIn.Create List    "${contains_operational}"    "${contains_operations}"    "${contains_config}"
+    \    Collections.List Should Contain Value    ${states}    "True"
+
+Compare Module Name In Module List And Module Detail
+    [Arguments]    ${number_of_modules_loaded}
+    : FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
+    \    ${indexed_module}=    YangmanKeywords.Return Module List Indexed Module    ${index}
+    \    ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
+    \    ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
+    \    ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
+    \    ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operational}
+    \    ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operations}
+    \    ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_config}
+    \    ${module_list_module_name}=    Selenium2Library.Get Text    ${indexed_module}//p
+    \    BuiltIn.Run Keyword If    "${contains_operations}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_operations}
+    \    ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_operations}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    BuiltIn.Run Keyword If    "${contains_operations}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operations}
+    \    ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_operational}
+    \    BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_operational}
+    \    ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_operational}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operational}
+    \    ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Page Should Contain Element    ${indexed_module_config}
+    \    BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    GUIKeywords.Focus And Click Element    ${indexed_module_config}
+    \    ...    AND    Selenium2Library.Wait Until Page Contains Element    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    ${module_detail_module_name}=    BuiltIn.Run Keyword If    "${contains_config}"=="True"    Selenium2Library.Get Text    ${MODULE_DETAIL_MODULE_NAME_LABEL}
+    \    BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    BuiltIn.Should Contain    ${module_detail_module_name}    ${module_list_module_name}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_config}
+
+Click Operations Or Operational And Config Of All Modules And Verify Chosen Tab Is Selected
+    [Arguments]    ${number_of_modules_loaded}
+    : FOR    ${index}    IN RANGE    0    ${number_of_modules_loaded}
+    \    ${indexed_module_operations}=    YangmanKeywords.Return Indexed Module Operations Label    ${index}
+    \    ${indexed_module_operational}=    YangmanKeywords.Return Indexed Module Operational Label    ${index}
+    \    ${indexed_module_config}=    YangmanKeywords.Return Indexed Module Config Label    ${index}
+    \    ${contains_operational}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operational}
+    \    ${contains_operations}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_operations}
+    \    ${contains_config}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Wait Until Page Contains Element    ${indexed_module_config}
+    \    BuiltIn.Run Keyword If    "${contains_operations}"=="True"    Run Keywords    YangmanKeywords.Click Indexed Module Operations To Load Module Detail Operations Tab    ${index}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operations}
+    \    BuiltIn.Run Keyword If    "${contains_operational}"=="True"    BuiltIn.Run Keywords    YangmanKeywords.Click Indexed Module Operational To Load Module Detail Operational Tab    ${index}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_operational}
+    \    BuiltIn.Run Keyword If    "${contains_config}"=="True"    BuiltIn.Run Keywords    YangmanKeywords.Click Indexed Module Config To Load Module Detail Config Tab    ${index}
+    \    ...    AND    YangmanKeywords.Toggle Module Detail To Modules Or History Or Collections Tab
+    \    ...    AND    Selenium2Library.Wait Until Element Is Visible    ${indexed_module_config}
index 041ea1931c3dedc2dd45e00e67b3f570f356dacc..4fee1f105e1b49bea881b6b775458541f9f85663 100644 (file)
@@ -54,9 +54,27 @@ ${NODE_NODE_ID_LABEL}    node {node-id}
 ${LINK_LINK_ID_LABEL}    link {link-id}
 ${BRANCH_ID_LABEL}    branch-
 ${MODULE_DETAIL_BRANCH}    ${MODULE_DETAIL_ACTIVE_TAB_CONTENT}//md-list-item[contains(@id, "${BRANCH_ID_LABEL}")]
+${MODULE_DETAIL_BRANCH_BUTTON}    ${MODULE_DETAIL_BRANCH}/button
 ${MODULE_DETAIL_BRANCH_LABEL}    ${MODULE_DETAIL_BRANCH}//span[contains(@class, "indented tree-label ng-binding flex") and contains(text(), "${BRANCH_LABEL}")]
 #History Tab Left Panel
+${HISTORY_SEARCH_INPUT}    //input[@id="search-history"]
+${SAVE_HISTORY_REQUEST_TO_COLLECTION_BUTTON}    //button[@id="history-save-requests"]
+${DELETE_HISTORY_REQUEST_MENU}    //button[@id="history-delete-menu"]
+${DELETE_SELECTED_HISTORY_REQUEST_BUTTON}    //button[@id="history-delete-selected"]
+${DELETE_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-delete-all"]
+${SELECT_HISTORY_REQUEST_MENU}    //button[@id="history-select-menu"]
+${SELECT_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-select-all"]
+${DESELECT_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-deselect-all"]
 #Collections Tab Left Panel
+${COLLECTIONS_SEARCH_INPUT}    //input[@id="search-collections"]
+${SAVE_SELECTED_REQUEST_TO_COLLECTION_BUTTON}    //button[@id="collections-save-selected"]
+${IMPORT_COLLECTION_BUTTON}    //button[@id="importCollection"]
+${DELETE_HISTORY_REQUEST_MENU}    //button[@id="history-delete-menu"]
+${DELETE_SELECTED_HISTORY_REQUEST_BUTTON}    //button[@id="history-delete-selected"]
+${DELETE_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-delete-all"]
+${SELECT_HISTORY_REQUEST_MENU}    //button[@id="history-select-menu"]
+${SELECT_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-select-all"]
+${DESELECT_ALL_HISTORY_REQUESTS_BUTTON}    //button[@id="history-deselect-all"]
 #Right Panel Header
 ${OPERATION_NAME}    EMPTY
 ${OPERATION_SELECT_INPUT}    //md-select[@id="request-selected-operation"]
@@ -85,19 +103,35 @@ ${SHOW_RECEIVED_DATA_CHECKBOX_UNSELECTED}    //md-checkbox[@id="show-received-da
 ${MILLISECONDS_LABEL}    ms
 ${STATUS_LABEL}    //span[contains(text(), "Status:")]
 ${STATUS_VALUE}    //span[@id="info-request-status"]
+${THREE_DOTS_DEFAULT_STATUS_AND_TIME}    ...
+${20X_REQUEST_CODE_REGEX}    .*([2][0][0-6]).*
+${40X_REQUEST_CODE_REGEX}    .*([4][0-1][0-9]).*
+${20X_OR_40X_REQUEST_CODE_REGEX}    .*([24][0-1][0-9]).*
 ${TIME_LABEL}     //span[contains(text(), "Time:")]
 ${TIME_VALUE}     //span[@id="info-request-execution-time"]
+${API_PATH}       //section[contains(@class, "yangmanModule__right-panel__header")]//section[@class="layout-wrap layout-row flex"]
+${HEADER_LINEAR_PROGRESSION_BAR_HIDDEN}    //section[contains(@class, "yangmanModule__right-panel__header")]/md-progress-linear[@aria-hidden="true"]
 #Right Panel Json Content
 ${SENT_DATA_CODE_MIRROR_DISPLAYED}    //div[@id="sentData" and @aria-hidden="false"]
+${SENT_DATA_CODE_MIRROR_CODE}    ${SENT_DATA_CODE_MIRROR_DISPLAYED}//div[@class="CodeMirror-code"]
 ${SENT_DATA_LABEL}    ${SENT_DATA_CODE_MIRROR_DISPLAYED}//h5[contains(text(), Sent data)]
 ${SENT_DATA_ENLARGE_FONT_SIZE_BUTTON}    ${SENT_DATA_CODE_MIRROR_DISPLAYED}//button[contains(@aria-label, arrow_drop_up)]
 ${SENT_DATA_REDUCE_FONT_SIZE_BUTTON}    ${SENT_DATA_CODE_MIRROR_DISPLAYED}//button[contains(@aria-label, arrow_drop_down)]
 ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}    //div[@id="ReceiveData" and @aria-hidden="false"]
+${RECEIVED_DATA_CODE_MIRROR_CODE}    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}//div[@class="CodeMirror-code"]
 ${RECEIVED_DATA_LABEL}    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}//h5[contains(text(), Received data)]
 ${RECEIVED_DATA_ENLARGE_FONT_SIZE_BUTTON}    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}//button[contains(@aria-label, arrow_drop_up)]
 ${RECEIVED_DATA_REDUCE_FONT_SIZE_BUTTON}    ${RECEIVED_DATA_CODE_MIRROR_DISPLAYED}//button[contains(@aria-label, arrow_drop_down)]
+${JSON_ERROR_MESSAGE_INPUT_IS_MISSING}    Error parsing input: Input is missing some of the keys of
+${JSON_ERROR_MESSAGE_CONTENT_DOES_NOT_EXIST}    Request could not be completed because the relevant data model content does not exist
+${JSON_ERROR_MESSAGE_DATA_DOES_NOT_EXIST_FOR_PATH}    Data does not exist for path
+${JSON_ERROR_MESSAGE_INPUT_IS_REQUIRED}    Input is required.
 # Right Panel Form Content
+${TOPOLOGY_ID_LABEL}    topology-id
+${FORM_ERROR_MESSAGE}    ${EMPTY}
 ${FORM_CONTENT}    //section[contains(@class, "yangmanModule__right-panel__form bottom-content ng-scope") and contains(@aria-hidden, "false")]
+${ERROR_MESSAGE_IDENTIFIERS_IN_PATH_REQUIRED}    Identifiers in path are required. Please fill empty identifiers for successful request execution.
+${FORM_ERROR_MESSAGE_XPATH}    //p[contains(@id, "form-error-message") and contains (text(), "${FORM_ERROR_MESSAGE}")]
 ${FORM_TOP_ELEMENT_CONTAINER}    ${FORM_CONTENT}//div[contains(@class, "yangmanModule__right-panel__form__element-container ng-scope")]
 ${FORM_TOP_ELEMENT_POINTER}    ${FORM_TOP_ELEMENT_CONTAINER}//p[contains(@class, "top-element pointer")]
 ${FORM_TOP_ELEMENT_LABEL_XPATH}    ${FORM_TOP_ELEMENT_POINTER}//span[contains(@class, "ng-binding ng-scope")]
@@ -105,3 +139,8 @@ ${FORM_TOP_ELEMENT_YANGMENU}    ${FORM_TOP_ELEMENT_CONTAINER}//yang-form-menu
 ${FORM_TOP_ELEMENT_LIST_ITEM_ROW}    ${FORM_TOP_ELEMENT_CONTAINER}//section[@class="yangmanModule__right-panel__form__list__paginator ng-scope layout-column flex"]
 ${FORM_TOP_ELEMENT_LIST_ITEM}    ${FORM_TOP_ELEMENT_LIST_ITEM_ROW}//md-tab-item[contains(@class, "md-tab ng-scope ng-isolate-scope md-ink-ripple")]
 ${FORM_TOP_ELEMENT_LIST_ITEM_LABEL}    ${FORM_TOP_ELEMENT_LIST_ITEM}/span
+${YANGMENU_ADD_LIST_ITEM_BUTTON}    ${FORM_CONTENT}//yang-form-menu//button[@ng-click="addListItemFunc(); closeMenu();"]
+${YANGMENU_SHOW_ALL_LIST_ITEMS}    ${FORM_CONTENT}//yang-form-menu//button[@ng-click="switchSection('items'); setItemList();"]
+${YANGMENU_AUGMENTATIONS_BUTTON}    ${FORM_CONTENT}//yang-form-menu//button[ng-click="switchSection('augmentations')"]
+${FORM_SHOW_PREVIOUS_ITEM_ARROW}    //md-prev-button[@aria-label="Previous Page"]
+${FORM_SHOW_NEXT_ITEM_ARROW}    //md-next-button[@aria-label="Next Page"]