blob: b2093451518c4662b1e92ec92d964d9ff6c073c9 [file] [log] [blame]
Bartosz Gardziejewski867288f2019-04-18 11:21:50 +02001*** Settings ***
2Documentation New VNF Change local workflows
3Library Process
4Library Selenium2Library
5Library Collections
6Library String
7Library RequestsLibrary
8Library OperatingSystem
9Resource ../../common.robot
10Resource ../resources/keywords/login_vid_keywords.robot
11
12*** Variables ***
13${body}= {"workflowsDetails":[{"workflowName":"VNF In Place Software Update","vnfDetails":{"UUID":"103b4a1b-4a15-4559-a019-1ff132180c7c","invariantUUID":"88a71d72-ec80-4357-808e-f288823cb353"}}, {"workflowName":"VNF Scale Out","vnfDetails":{"UUID":"103b4a1b-4a15-4559-a019-1ff132180c7c","invariantUUID":"88a71d72-ec80-4357-808e-f288823cb353"}}]}
14
15*** Test Cases ***
16add new VNF Change in VID GUI From Local worfkow
17 [Documentation] Logs in to VID GUI
18 Setup Browser
19 Go To ${VID_LOGIN_URL}
20
Bartosz Gardziejewski0ff0ed12019-04-30 12:23:05 +020021
Bartosz Gardziejewski867288f2019-04-18 11:21:50 +020022 Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
23 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
24
25 Title Should Be Login
26 Input Text xpath=//input[@id='loginId'] ${GLOBAL_VID_USERNAME}
27 Input Password xpath=//input[@id='password'] ${GLOBAL_VID_PASSWORD}
28 Click Button xpath=//input[@id='loginBtn']
29 Wait Until Page Contains Welcome to VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
30
Bartosz Gardziejewski0ff0ed12019-04-30 12:23:05 +020031 Run Process ${CURDIR}/../resources/scripts/SetFeatureFlag.sh FLAG_HANDLE_SO_WORKFLOWS false shell=True cwd=${CURDIR}/../resources/scripts/
32 Reload Page
Bartosz Gardziejewski867288f2019-04-18 11:21:50 +020033 Wait Until Page Contains VNF Changes ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
34 Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
35
36 [Documentation] create VNF Change from local workflows
37 CreateSession vid ${VID_ENDPOINT}
38 ${headers}= Create Dictionary Accept-Encoding=gzip Accept-Encoding=deflate Content-Type=application/json
39 ${response}= Post Request vid /vid/change-management/vnf_workflow_relation headers=${headers} data=${body}
40
41 Click Element xpath=//div[@heading='VNF Changes']//a[1]
42
43 Click Element xpath=//div[@ng-click='vm.createNewChange()']
44
45 Wait Until Page Contains New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
46
47 Select From List xpath=//select[@name='subscriber'] CAR_2020_ER
48
49 Select From List xpath=//select[@name='serviceType'] gNB
50
51 Select From List xpath=//select[@name='vnfType'] vLBMS
52
53 Select From List xpath=//select[@name='fromVNFVersion'] 3.0
54
55 Click Element xpath=//multiselect[@name='vnfName']
56 Click Element xpath=//a[contains(text(),'vnf-ws')]
57
58 Select From List xpath=//select[@name='workflow'] VNF In Place Software Update
Bartosz Gardziejewski867288f2019-04-18 11:21:50 +020059
60 Wait Until Page Contains Operations timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
Ittay Sternf07134a2019-07-29 14:07:45 +030061 Input Text xpath=//input[@id='internal-workflow-parameter-text-2-operations-timeout'] 10
62 Input Text xpath=//input[@id='internal-workflow-parameter-text-3-existing-software-version'] test
63 Input Text xpath=//input[@id='internal-workflow-parameter-text-4-new-software-version'] test
Bartosz Gardziejewski867288f2019-04-18 11:21:50 +020064
65 Wait Until Element Is Enabled xpath=//button[@id='submit'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
66 Click Button xpath=//button[@id='submit']
67
68
69 Wait Until Page Does Not Contain New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}