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 | |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 6 | Library SeleniumLibrary |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 7 | Library UUID |
| 8 | Library String |
| 9 | Library DateTime |
| 10 | |
Brian Freeman | 391680a | 2018-08-11 15:20:58 -0500 | [diff] [blame] | 11 | Resource ../so_interface.robot |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 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 |
bdfreeman1421 | 7f58ef1 | 2018-05-06 12:12:27 -0400 | [diff] [blame] | 17 | [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name} ${project_name} ${owning_entity} |
Brian Freeman | dcdc785 | 2019-03-16 12:48:47 -0500 | [diff] [blame] | 18 | Wait Until Keyword Succeeds 180s 15s Wait For Model ${service_model_type} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 19 | 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] | 20 | ${uuid}= Generate UUID |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame] | 21 | Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} |
| 22 | Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} |
Brian Freeman | 6737be5 | 2018-07-19 17:07:31 -0500 | [diff] [blame] | 23 | Click On Element When Visible //select[@prompt='Select Subscriber Name'] |
Jerry Flood | 81d33fb | 2017-11-21 16:21:21 -0500 | [diff] [blame] | 24 | Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
bdfreeman1421 | 7f58ef1 | 2018-05-06 12:12:27 -0400 | [diff] [blame] | 25 | Select From List When Enabled //select[@prompt='Select Service Type'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
| 26 | Select From List When Enabled //select[@prompt='Select Project Name'] ${project_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
| 27 | Select From List When Enabled //select[@prompt='Select Owning Entity'] ${owning_entity} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 28 | Capture Page Screenshot |
DR695H | 910097e | 2019-05-08 13:55:32 -0400 | [diff] [blame] | 29 | Page Should Contain Element //input[@parameter-name='Instance Name'] limit=1 |
| 30 | Set Focus To Element //input[@parameter-name='Instance Name'] |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 31 | Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} |
| 32 | Capture Page Screenshot |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 33 | Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm'] |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 34 | Wait Until Element Contains xpath=//pre[@class= 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} |
| 35 | Wait Until Page Contains "requestState": "COMPLETE" timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG} |
bdfreeman1421 | 7f58ef1 | 2018-05-06 12:12:27 -0400 | [diff] [blame] | 36 | ${response text}= Get Text xpath=//pre[@class = 'log ng-binding'] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 37 | Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close'] |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 38 | ${request_id}= Parse Request Id ${response text} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 39 | ${service_instance_id}= Parse Instance Id ${response text} |
| 40 | Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE |
| 41 | [return] ${service_instance_id} |
| 42 | |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 43 | Wait For Model |
| 44 | [Documentation] Distributed model may not yet be available. Kepp trying until it shows up. |
| 45 | [Arguments] ${service_model_type} |
Brian Freeman | dcdc785 | 2019-03-16 12:48:47 -0500 | [diff] [blame] | 46 | # Need to refresh browser json data Home -> Browse Service Models cycle does that |
| 47 | Go To VID Home |
| 48 | Go To VID Browse Service Models |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 49 | Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models'] |
Brian Freeman | f940ee9 | 2018-05-25 21:09:05 -0500 | [diff] [blame] | 50 | Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] ${GLOBAL_VID_UI_TIMEOUT_MEDIUM} |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 51 | Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type} |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame] | 52 | 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] | 53 | |
| 54 | Delete Service Instance By GUI |
| 55 | [Arguments] ${service_instance_id} ${customer_name} |
| 56 | Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove'] |
Jerry Flood | f67ce0e | 2017-03-20 16:59:23 -0400 | [diff] [blame] | 57 | Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true'] |
| 58 | 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] | 59 | ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] |
| 60 | ${request_id}= Parse Request Id ${response text} |
| 61 | Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE |
jf9860 | ca5693c | 2017-03-08 16:17:56 -0500 | [diff] [blame] | 62 | |
| 63 | |
| 64 | Search Service Instance |
| 65 | [Arguments] ${service_instance_id} ${customer_name} |
| 66 | Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a |
| 67 | Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} |
| 68 | Click On Button When Enabled //button[text() = 'Submit'] |