blob: 6c7f8a03ab74266bbf182fb33528e4eea8cf1a31 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation Creates VID Service Instance
3...
4... Creates VID Service Instance
5
6Library ExtendedSelenium2Library
7Library UUID
8Library String
9Library DateTime
10
11Resource ../mso_interface.robot
12Resource vid_interface.robot
13
jf9860ca5693c2017-03-08 16:17:56 -050014*** Keywords ***
DR695Hccff30b2017-02-17 18:44:24 -050015Create VID Service Instance
jf9860ca5693c2017-03-08 16:17:56 -050016 [Documentation] Creates a service instance using VID
17 [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name}
Jerry Floodedbeafb2017-06-01 17:05:42 -040018 Go To VID Browse Service Models
jf9860ca5693c2017-03-08 16:17:56 -050019 Wait Until Keyword Succeeds 300s 1s Wait For Model ${service_model_type}
DR695Hccff30b2017-02-17 18:44:24 -050020 Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13
jf9860ca5693c2017-03-08 16:17:56 -050021 ${uuid}= Generate UUID
Jerry Floodf67ce0e2017-03-20 16:59:23 -040022 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}
DR695Hccff30b2017-02-17 18:44:24 -050024 Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1
25 Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name}
jf9860ca5693c2017-03-08 16:17:56 -050026 Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name}
Jerry Flood80ff9852017-08-11 06:47:14 -040027 Select From List WHen Enabled //select[@prompt='Select Service Type'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
DR695Hccff30b2017-02-17 18:44:24 -050028 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm']
Jerry Floodf67ce0e2017-03-20 16:59:23 -040029 Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
jf9860ca5693c2017-03-08 16:17:56 -050030 ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
DR695Hccff30b2017-02-17 18:44:24 -050031 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close']
jf9860ca5693c2017-03-08 16:17:56 -050032 ${request_id}= Parse Request Id ${response text}
DR695Hccff30b2017-02-17 18:44:24 -050033 ${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
jf9860ca5693c2017-03-08 16:17:56 -050037Wait For Model
38 [Documentation] Distributed model may not yet be available. Kepp trying until it shows up.
39 [Arguments] ${service_model_type}
jf9860ca5693c2017-03-08 16:17:56 -050040 Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models']
Jerry Floodf67ce0e2017-03-20 16:59:23 -040041 Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] ${GLOBAL_VID_UI_TIMEOUT_LONG}
jf9860ca5693c2017-03-08 16:17:56 -050042 Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type}
Jerry Floodf67ce0e2017-03-20 16:59:23 -040043 Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
jf9860ca5693c2017-03-08 16:17:56 -050044
45Delete Service Instance By GUI
46 [Arguments] ${service_instance_id} ${customer_name}
47 Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove']
Jerry Floodf67ce0e2017-03-20 16:59:23 -040048 Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
49 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}
DR695Hccff30b2017-02-17 18:44:24 -050050 ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
51 ${request_id}= Parse Request Id ${response text}
52 Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
jf9860ca5693c2017-03-08 16:17:56 -050053
54
55Search Service Instance
56 [Arguments] ${service_instance_id} ${customer_name}
57 Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
58 Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
59 Click On Button When Enabled //button[text() = 'Submit']