Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation New VNF Change local workflows |
| 3 | Library Process |
| 4 | Library Selenium2Library |
| 5 | Library Collections |
| 6 | Library String |
| 7 | Library RequestsLibrary |
| 8 | Library OperatingSystem |
| 9 | Resource ../../common.robot |
| 10 | Resource ../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 *** |
| 16 | add new VNF Change in VID GUI From Local worfkow |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 17 | Setup Browser |
| 18 | Go To ${VID_LOGIN_URL} |
| 19 | |
Bartosz Gardziejewski | 0ff0ed1 | 2019-04-30 12:23:05 +0200 | [diff] [blame] | 20 | |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 21 | Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} |
| 22 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
| 23 | |
| 24 | Title Should Be Login |
| 25 | Input Text xpath=//input[@id='loginId'] ${GLOBAL_VID_USERNAME} |
| 26 | Input Password xpath=//input[@id='password'] ${GLOBAL_VID_PASSWORD} |
| 27 | Click Button xpath=//input[@id='loginBtn'] |
| 28 | Wait Until Page Contains Welcome to VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
| 29 | |
Bartosz Gardziejewski | 0ff0ed1 | 2019-04-30 12:23:05 +0200 | [diff] [blame] | 30 | Run Process ${CURDIR}/../resources/scripts/SetFeatureFlag.sh FLAG_HANDLE_SO_WORKFLOWS false shell=True cwd=${CURDIR}/../resources/scripts/ |
| 31 | Reload Page |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 32 | Wait Until Page Contains VNF Changes ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
| 33 | Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} |
| 34 | |
| 35 | [Documentation] create VNF Change from local workflows |
| 36 | CreateSession vid ${VID_ENDPOINT} |
| 37 | ${headers}= Create Dictionary Accept-Encoding=gzip Accept-Encoding=deflate Content-Type=application/json |
| 38 | ${response}= Post Request vid /vid/change-management/vnf_workflow_relation headers=${headers} data=${body} |
| 39 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 40 | Wait Until Element Is Visible xpath=//div[@heading='VNF Changes']//a[1] |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 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 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 47 | Select From List By Label xpath=//select[@name='subscriber'] CAR_2020_ER |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 48 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 49 | Select From List By Label xpath=//select[@name='serviceType'] gNB |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 50 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 51 | Select From List By Label xpath=//select[@name='vnfType'] vLBMS |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 52 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 53 | Select From List By Label xpath=//select[@name='fromVNFVersion'] 3.0 |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 54 | |
| 55 | Click Element xpath=//multiselect[@name='vnfName'] |
| 56 | Click Element xpath=//a[contains(text(),'vnf-ws')] |
| 57 | |
Ittay Stern | ce7e070 | 2020-03-09 15:41:23 +0200 | [diff] [blame] | 58 | Select From List By Label xpath=//select[@name='workflow'] VNF In Place Software Update |
Bartosz Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 59 | |
| 60 | Wait Until Page Contains Operations timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} |
Ittay Stern | f07134a | 2019-07-29 14:07:45 +0300 | [diff] [blame] | 61 | 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 Gardziejewski | 867288f | 2019-04-18 11:21:50 +0200 | [diff] [blame] | 64 | |
| 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} |