summaryrefslogtreecommitdiffstats
path: root/robot/resources/vid/teardown_vid.robot
diff options
context:
space:
mode:
authorJerry Flood <jf9860@att.com>2017-03-20 16:59:23 -0400
committerJerry Flood <jf9860@att.com>2017-03-20 17:36:31 -0400
commitf67ce0e39027a92c99c7cca39b5a7d5e32dd17fa (patch)
tree291d937fbfcc5b3bac365c8358b40f3081cb01f6 /robot/resources/vid/teardown_vid.robot
parent078edfaf9be7da48abfd9f1f484b13d6c58b7f25 (diff)
TEST-5 - stack deployment timeout
Change-Id: I62e2dc40016d5cded99e39eec1b4e6d380bfbffa Signed-off-by: Jerry Flood <jf9860@att.com>
Diffstat (limited to 'robot/resources/vid/teardown_vid.robot')
-rw-r--r--robot/resources/vid/teardown_vid.robot59
1 files changed, 29 insertions, 30 deletions
diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot
index 88408546..b57cd1d4 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -4,7 +4,7 @@ Library ExtendedSelenium2Library
Library Collections
Library String
Library StringTemplater
-Library UUID
+Library UUID
Resource vid_interface.robot
Resource create_vid_vnf.robot
Resource create_service_instance.robot
@@ -14,21 +14,21 @@ ${VID_ENV} /vid
${VID_SERVICE_MODELS_SEARCH_CUST} ${GLOBAL_VID_SERVER}${VID_ENV}/serviceModels.htm#/instances/subdetails?selectedSubscriber=\${customer_id}
${VID_SERVICE_MODELS_SEARCH_URL} ${GLOBAL_VID_SERVER}${VID_ENV}/serviceModels.htm#/instances/services
*** Keywords ***
-
-Teardown VID
+
+Teardown VID
[Documentation] Teardown the VID This assumes that the any runnign stacks have been torn down
- [Arguments] ${service_instance_id} ${lcp_region} ${tenant}
- Return From Keyword If len('${service_instance_id}') == 0
+ [Arguments] ${service_instance_id} ${lcp_region} ${tenant}
+ Return From Keyword If len('${service_instance_id}') == 0
# Keep going to the VID service instance until we get the pop-up alert that there is no service instance
Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant}
-
-Delete VID
+
+Delete VID
[Documentation] Teardown the next VID entity that has a Remove icon.
[Arguments] ${service_instance_id} ${lcp_region} ${tenant}
- # For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first.
+ # For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first.
${remove_order}= Create List vDNS_Ete Vfmodule_Ete
-
+
# FAIL status is returned in ${vfmodule} because FAIL are ignored during teardown
${status} ${vfmodule}= Run Keyword and Ignore Error Delete Next VID Entity ${service_instance_id} ${lcp_region} ${tenant} ${remove_order}
Return From Keyword If '${status}' == 'FAIL'
@@ -37,41 +37,41 @@ Delete VID
Run Keyword If 'Vfmodule_Ete' in '${vfmodule}' Execute Reverse Heatbridge
Fail Continue with Next Remove
-Delete Next VID Entity
+Delete Next VID Entity
[Documentation] Teardown the next VID entity that has a Remove icon.
- [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order}
+ [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order}
${vfmodule}= Catenate
Go To ${VID_SERVICE_MODELS_SEARCH_URL}
- 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
-
- # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
+ 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}
+ 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}
# When Handle alert detects a pop-up. it will return FAIL and we are done
# Return from Keyword is required because FAIL is inored during teardown
${status} ${value} Run Keyword And Ignore Error Handle Alert
Return From Keyword If '${status}' == 'FAIL' ${status}
- ${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=60s
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Return From Keyword If '${status}' == 'FAIL' ${status}
- Click Element link=View/Edit
- Wait Until Page Contains View/Edit Service Instance timeout=60s
- Wait Until Element Is Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] timeout=120s
-
- :for ${remove_first} in @{remove_order}
+ Click Element link=View/Edit
+ Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+ Wait Until Element Is Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+
+ :for ${remove_first} in @{remove_order}
\ ${remove_xpath}= Set Variable //li/div[contains(.,'${remove_first}')]/a/span[@class='glyphicon glyphicon-remove']
\ ${status} ${data}= Run Keyword And Ignore Error Page Should Contain Element xpath=${remove_xpath}
- \ Exit For Loop If '${status}' == 'PASS'
+ \ Exit For Loop If '${status}' == 'PASS'
\ ${remove_xpath}= Set Variable //li/div/a/span[@class='glyphicon glyphicon-remove']
- Click On Element When Visible xpath=${remove_xpath}
+ Click On Element When Visible xpath=${remove_xpath}
${status} ${value}= Run Keyword and Ignore Error Wait Until Page Contains Element xpath=//select[@parameter-id='lcpRegion']
- Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region}
+ Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region}
Run Keyword If '${status}'=='PASS' Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant}
- ${status} ${vfmodule}= Run Keyword And Ignore Error Get Text xpath=//td[contains(text(), 'Vf Module Name')]/../td[2]
+ ${status} ${vfmodule}= Run Keyword And Ignore Error Get Text xpath=//td[contains(text(), 'Vf Module Name')]/../td[2]
Click Element xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
#//*[@id="mContent"]/div/div/div/div/table/tbody/tr/td/div/div[2]/div/div[1]/div[5]/button[1]
Wait Until Page Contains 100 % 300s
@@ -80,12 +80,11 @@ Delete Next VID Entity
Click Element xpath=//div[@class='ng-scope']/div[@class = 'buttonRow']/button[text() = 'Close']
Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
[Return] ${vfmodule}
-
+
Handle Alert
[Documentation] When service instance has been deleted, an alert will be triggered on the search to end the loop
... The various Alert keywords did not prevent the alert exception on the Click ELement, hence this roundabout way of handling the alert
- Run Keyword And Ignore Error Click Element button=Submit
+ Run Keyword And Ignore Error Click Element button=Submit
${status} ${t}= Run Keyword And Ignore Error Get Alert Message
- Return From Keyword If '${status}' == 'FAIL'
+ Return From Keyword If '${status}' == 'FAIL'
Fail ${t}
- \ No newline at end of file