Remove trailing spaces in robot scripts
[testsuite.git] / robot / resources / vid / create_vid_vnf.robot
index 2180387..f945db4 100644 (file)
@@ -14,6 +14,10 @@ Create VID VNF
     [Documentation]    Creates a VNF instance using VID for passed instance id with the passed service instance name
     [Arguments]    ${service_instance_id}    ${service_instance_name}    ${product_family}    ${lcp_region}    ${tenant}   ${vnf_type}   ${customer}   ${line_of_business}=LOB-Demonstration   ${platform}=Platform-Demonstration    ${cloud_owner_uc}=${GLOBAL_AAI_CLOUD_OWNER}
     Go To VID HOME
+    ##### TEST BIGGER WINDOW TO AVOID MASKED ITEMS PROBLEM #####
+    ${width}    ${height}=      Get Window Size
+    Set Window Size        2000   1000
+    ${width}    ${height}=      Get Window Size
     Click Link       xpath=//div[@heading = 'Search for Existing Service Instances']/a
     Wait Until Page Contains    Please search by    timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
 
@@ -31,7 +35,9 @@ Create VID VNF
     #01681d02-2304-4c91-ab2d 0
     # This is where firefox breaks. Th elink never becomes visible when run with the script.
     ${dataTestsId}=    Catenate   AddVNFOption-${vnf_type}
-    Sleep   10s
+    Sleep   15s
+    Wait Until Element Is Enabled   xpath=//a[contains(text(), '${vnf_type}')]
+    Wait Until Element Is Visible   xpath=//a[contains(text(), '${vnf_type}')]
     Click Element    xpath=//a[contains(text(), '${vnf_type}')]
     Wait Until Page Contains Element    xpath=//input[@parameter-id='instanceName']    ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
     Wait Until Element Is Enabled    xpath=//input[@parameter-id='instanceName']    ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -52,7 +58,7 @@ Create VID VNF
        Should Not Contain    ${response text}    FAILED
     Click On Button When Enabled    //button[contains(text(),'Close')]
     ${instance_id}=    Parse Instance Id     ${response text}
-    # sometimes the page refreshes - a reload is required on timeout but next step for VF Module does that 
+    # sometimes the page refreshes - a reload is required on timeout but next step for VF Module does that
     Run Keyword And Ignore Error   Wait Until Page Contains    ${service_instance_name}    ${GLOBAL_VID_UI_TIMEOUT_LONG}
     [Return]     ${instance_id}
 
@@ -119,7 +125,8 @@ Create VID VNF module
 
     ### end volume stuff ###
 
-    Click Element     xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
+    #Click Element     xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
+    Click On Element When Visible      //div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')]
     ${instance_id}=     Fill Module Form And Submit    ${vf_module_name}    ${lcp_region}    ${TENANT}    ${VNF_TYPE}    cloud_owner_uc=${cloud_owner_uc}    volume_group=${vf_module_volume_name}
     [Return]     ${instance_id}
 
@@ -163,8 +170,8 @@ Fill Module Form And Submit
 
 Wait For Add VF Module
     [Documentation]   Retry by refresh if the ADD VF-Module is not visible
-    Wait Until Page Contains    View/Edit Service Instance     timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}  
-    
+    Wait Until Page Contains    View/Edit Service Instance     timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+
     ${status}   ${value}   Run Keyword And Ignore Error   Wait Until Element Is Visible    //button[contains(text(),'Add VF-Module')]   timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT}
     Return From Keyword If   '${status}' == 'PASS'
     Reload Page