summaryrefslogtreecommitdiffstats
path: root/robot/resources/vid/create_vid_vnf.robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/vid/create_vid_vnf.robot')
-rw-r--r--robot/resources/vid/create_vid_vnf.robot65
1 files changed, 36 insertions, 29 deletions
diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot
index 7417772f..371ad708 100644
--- a/robot/resources/vid/create_vid_vnf.robot
+++ b/robot/resources/vid/create_vid_vnf.robot
@@ -17,24 +17,20 @@ Create VID VNF
[Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type}
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
- Wait Until Page Contains Please search by timeout=60s
- #Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s
- #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s
+ Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
Click Button button=Submit
- Wait Until Page Contains Element link=View/Edit timeout=60s
+ Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element xpath=//a[contains(text(), 'View/Edit')]
- Wait Until Page Contains View/Edit Service Instance timeout=60s
- #Wait Until Page Contains Element xpath=//div[@class='statusLine aaiVisible'] timeout=120s
- #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiVisible'] timeout=60s
+ Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element button=Add VNF
# This is where firefox breaks. Th elink never becomes visible when run with the script.
Click Element link=${vnf_type}
- Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] 20s
- Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] 20s
+ Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
## Without this sleep, the input text below gets immediately wiped out.
## Wait Until Angular Ready just sleeps for its timeout value
@@ -44,12 +40,12 @@ Create VID VNF
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region}
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
Click Element button=Confirm
- Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Status: OK (200) timeout=120
+ Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Status: OK (200) timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
Should Not Contain ${response text} FAILED
Click Element button=Close
${instance_id}= Parse Instance Id ${response text}
- Wait Until Page Contains ${service_instance_name} 60s
+ Wait Until Page Contains ${service_instance_name} ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
[Return] ${instance_id}
Delete VID VNF
@@ -57,21 +53,21 @@ Delete VID VNF
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
Wait Until Page Contains Please search by timeout=60s
- Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s
- Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s
+ Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
Click Button button=Submit
- Wait Until Page Contains Element link=View/Edit timeout=60s
+ Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
- Wait Until Page Contains View/Edit Service Instance timeout=60s
- Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s
- Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=60s
+ Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+ Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
- Click On Element When Visible xpath=//li/div[contains(.,'${vnf_instance_id}')]/a/span[@class='glyphicon glyphicon-remove'] timeout=120s
+ Click On Element When Visible xpath=//li/div[contains(.,'${vnf_instance_id}')]/a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region}
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
Click Element xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
@@ -85,24 +81,25 @@ Create VID VNF module
[Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE}
Go To VID HOME
Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
- Wait Until Page Contains Please search by timeout=60s
- Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=60s
+ Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
Click Button button=Submit
- Wait Until Page Contains Element link=View/Edit timeout=60s
+ Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
- Wait Until Page Contains View/Edit Service Instance timeout=60s
- Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s
- Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s
- Wait Until Element Is Visible button=Add VF-Module timeout=120s
+ Wait Until Keyword Succeeds 300s 5s Wait For Add VF Module
+ #Wait Until Page Contains View/Edit Service Instance timeout=60s
+ #Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s
+ #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s
+ #Wait Until Element Is Visible button=Add VF-Module timeout=120s
Click Element button=Add VF-Module
# This is where firefox breaks. Th elink never becomes visible when run with the script.
Click Element link=${vnf_type}
- Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] 20s
- Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] 20s
+ Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
## Without this sleep, the input text below gets immediately wiped out.
## Wait Until Angular Ready just sleeps for its timeout value
@@ -111,7 +108,7 @@ Create VID VNF module
Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region}
Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
Click Element button=Confirm
- Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120
+ Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
Click Element button=Close
${instance_id}= Parse Instance Id ${response text}
@@ -119,4 +116,14 @@ Create VID VNF module
${request_id}= Parse Request Id ${response text}
Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
- [Return] ${instance_id} \ No newline at end of file
+ [Return] ${instance_id}
+
+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 Element xpath=//div[@class='statusLine'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible button=Add VF-Module timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Return From Keyword If '${status}' == 'PASS'
+ Reload Page
+ Fail Retry