blob: 2ea01ce20100782abc0fcf70cb537507c48a99f5 [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
14*** Keywords ***
15Create VID Service Instance
16 [Documentation] Creates a service instance using VID
17 [Arguments] ${customer_name} ${service_model_type} ${service_type} ${service_name}
18 Go To VID HOME
19 Click Element partial link=Browse SDC Service
20 Page Should Contain Element xpath=//div/h1[text() = 'Browse SDC Service Models']
21 Wait Until Page Contains Element xpath=//button[text() = 'Deploy'] 240s
22 Input Text When Enabled //input[@ng-model='searchString'] ${service_model_type}
23 Wait Until Element Is Visible xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')] 300000
24 Press Key xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)] \\13
25 ${uuid}= Generate UUID
26 Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] 120s
27 Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] 120s
28 Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1
29 Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name}
30 Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name}
31 Select From List WHen Enabled //select[@prompt='Select Service Type'] ${service_type}
32 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm']
33 Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120s
34 ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
35 Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close']
36 ${request_id}= Parse Request Id ${response text}
37 ${service_instance_id}= Parse Instance Id ${response text}
38 Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
39 [return] ${service_instance_id}
40
41
42Delete Service Instance By GUI
43 [Arguments] ${service_instance_id} ${customer_name}
44 Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove']
45 Click On Button When Visible xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
46 Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=120s
47 ${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
48 ${request_id}= Parse Request Id ${response text}
49 Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
50
51
52Search Service Instance
53 [Arguments] ${service_instance_id} ${customer_name}
54 Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a
55 Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
56 Click On Button When Enabled //button[text() = 'Submit']
57