DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Creates VID Service Instance |
| 3 | ... |
| 4 | ... Creates VID Service Instance |
| 5 | |
| 6 | Library ExtendedSelenium2Library |
| 7 | Library UUID |
| 8 | Library String |
| 9 | Library DateTime |
| 10 | |
| 11 | Resource ../mso_interface.robot |
| 12 | Resource vid_interface.robot |
| 13 | |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 14 | *** Keywords *** |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 15 | Create VID Service Instance |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 16 | [Documentation] Creates a service instance using VID |
| 17 | [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 18 | Go To VID HOME |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 19 | Wait Until Keyword Succeeds 300s 1s Wait For Model ${service_model_type} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 20 | Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13 |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 21 | ${uuid}= Generate UUID |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame^] | 22 | Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} |
| 23 | Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 24 | Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1 |
| 25 | Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 26 | Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 27 | Select From List WHen Enabled //select[@prompt='Select Service Type'] ${service_type} |
| 28 | Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm'] |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame^] | 29 | Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 30 | ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 31 | Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close'] |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 32 | ${request_id}= Parse Request Id ${response text} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 33 | ${service_instance_id}= Parse Instance Id ${response text} |
| 34 | Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE |
| 35 | [return] ${service_instance_id} |
| 36 | |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 37 | Wait For Model |
| 38 | [Documentation] Distributed model may not yet be available. Kepp trying until it shows up. |
| 39 | [Arguments] ${service_model_type} |
| 40 | Click Element partial link=Browse SDC Service |
| 41 | Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models'] |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame^] | 42 | Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] ${GLOBAL_VID_UI_TIMEOUT_LONG} |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 43 | Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type} |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame^] | 44 | Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] ${GLOBAL_VID_UI_TIMEOUT_SHORT} |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 45 | |
| 46 | Delete Service Instance By GUI |
| 47 | [Arguments] ${service_instance_id} ${customer_name} |
| 48 | Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame^] | 49 | Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] |
| 50 | Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 51 | ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] |
| 52 | ${request_id}= Parse Request Id ${response text} |
| 53 | Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 54 | |
| 55 | |
| 56 | Search Service Instance |
| 57 | [Arguments] ${service_instance_id} ${customer_name} |
| 58 | Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a |
| 59 | Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} |
| 60 | Click On Button When Enabled //button[text() = 'Submit'] |