diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-04-18 11:21:50 +0200 |
---|---|---|
committer | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-04-18 12:38:37 +0200 |
commit | 867288fc5ce094fb70b85ec40ad9a1e33428238a (patch) | |
tree | 6b1565f2515a765ea5f78d3985c4c7eef102c76b /tests/vid/newVNFChange | |
parent | a6795420765b4455dbc761bfc4a70ecb457693ad (diff) |
changing simulator and endpoints for change management testing
Change-Id: I18d92c130181f6440cf2b68cfd864de686833c67
Issue-ID: VID-462
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Diffstat (limited to 'tests/vid/newVNFChange')
-rw-r--r-- | tests/vid/newVNFChange/__init__.robot | 2 | ||||
-rw-r--r-- | tests/vid/newVNFChange/test1.robot | 68 | ||||
-rw-r--r-- | tests/vid/newVNFChange/test2.robot | 49 | ||||
-rw-r--r-- | tests/vid/newVNFChange/test3.robot | 47 |
4 files changed, 166 insertions, 0 deletions
diff --git a/tests/vid/newVNFChange/__init__.robot b/tests/vid/newVNFChange/__init__.robot new file mode 100644 index 00000000..146e60cb --- /dev/null +++ b/tests/vid/newVNFChange/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation VID - New VNF Change
\ No newline at end of file diff --git a/tests/vid/newVNFChange/test1.robot b/tests/vid/newVNFChange/test1.robot new file mode 100644 index 00000000..4737c3af --- /dev/null +++ b/tests/vid/newVNFChange/test1.robot @@ -0,0 +1,68 @@ +*** Settings *** +Documentation New VNF Change local workflows +Library Process +Library Selenium2Library +Library Collections +Library String +Library RequestsLibrary +Library OperatingSystem +Resource ../../common.robot +Resource ../resources/keywords/login_vid_keywords.robot + +*** Variables *** +${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"}}]} + +*** Test Cases *** +add new VNF Change in VID GUI From Local worfkow + [Documentation] Logs in to VID GUI + Setup Browser + Go To ${VID_LOGIN_URL} + + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + + Title Should Be Login + Input Text xpath=//input[@id='loginId'] ${GLOBAL_VID_USERNAME} + Input Password xpath=//input[@id='password'] ${GLOBAL_VID_PASSWORD} + Click Button xpath=//input[@id='loginBtn'] + Wait Until Page Contains Welcome to VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + + Wait Until Page Contains VNF Changes ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + + [Documentation] create VNF Change from local workflows + CreateSession vid ${VID_ENDPOINT} + ${headers}= Create Dictionary Accept-Encoding=gzip Accept-Encoding=deflate Content-Type=application/json + ${response}= Post Request vid /vid/change-management/vnf_workflow_relation headers=${headers} data=${body} + + Click Element xpath=//div[@heading='VNF Changes']//a[1] + + Click Element xpath=//div[@ng-click='vm.createNewChange()'] + + Wait Until Page Contains New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + + Select From List xpath=//select[@name='subscriber'] CAR_2020_ER + + Select From List xpath=//select[@name='serviceType'] gNB + + Select From List xpath=//select[@name='vnfType'] vLBMS + + Select From List xpath=//select[@name='fromVNFVersion'] 3.0 + + Click Element xpath=//multiselect[@name='vnfName'] + Click Element xpath=//a[contains(text(),'vnf-ws')] + + Select From List xpath=//select[@name='workflow'] VNF In Place Software Update + #temp solution + #Click Button xpath=//button[@id='cancel'] + + Wait Until Page Contains Operations timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Input Text xpath=//input[@id='internal-workflow-parameter-text-2'] 10 + Input Text xpath=//input[@id='internal-workflow-parameter-text-3'] test + Input Text xpath=//input[@id='internal-workflow-parameter-text-4'] test + + Wait Until Element Is Enabled xpath=//button[@id='submit'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button xpath=//button[@id='submit'] + + + Wait Until Page Does Not Contain New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
\ No newline at end of file diff --git a/tests/vid/newVNFChange/test2.robot b/tests/vid/newVNFChange/test2.robot new file mode 100644 index 00000000..1af2ae79 --- /dev/null +++ b/tests/vid/newVNFChange/test2.robot @@ -0,0 +1,49 @@ +*** Settings *** +Documentation New VNF Change SO workflows +Library Process +Library Selenium2Library +Library Collections +Library String +Library RequestsLibrary +Library OperatingSystem +Resource ../../common.robot +Resource ../resources/keywords/login_vid_keywords.robot + +*** Variables *** + +*** Test Cases *** +add new VNF Change in VID GUI From SO NATIVE worfkow + [Documentation] create VNF Change from SO NATIVE workflows + + Run Process ${CURDIR}/../resources/scripts/SetFeatureFlag.sh FLAG_HANDLE_SO_WORKFLOWS true shell=True cwd=${CURDIR}/../resources/scripts/ + Reload Page + Wait Until Page Contains VNF Changes ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + + Click Element xpath=//div[@heading='VNF Changes']//a[1] + + Click Element xpath=//div[@ng-click='vm.createNewChange()'] + + Wait Until Page Contains New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + + Select From List xpath=//select[@name='subscriber'] CAR_2020_ER + + Select From List xpath=//select[@name='serviceType'] gNB + + Select From List xpath=//select[@name='vnfType'] vLBMS + + Select From List xpath=//select[@name='fromVNFVersion'] 3.0 + + Click Element xpath=//multiselect[@name='vnfName'] + Click Element xpath=//a[contains(text(),'vnf-ws')] + + Select From List xpath=//select[@name='workflow'] VNF In Place Software Update + + Wait Until Page Contains Operations timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Input Text xpath=//input[@id='so-workflow-parameter-operations_timeout'] 10 + Input Text xpath=//input[@id='so-workflow-parameter-existing_software_version'] test + Input Text xpath=//input[@id='so-workflow-parameter-new_software_version'] test + + Wait Until Element Is Enabled xpath=//button[@id='submit'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button xpath=//button[@id='submit'] + + Wait Until Page Does Not Contain New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT}
\ No newline at end of file diff --git a/tests/vid/newVNFChange/test3.robot b/tests/vid/newVNFChange/test3.robot new file mode 100644 index 00000000..30244f99 --- /dev/null +++ b/tests/vid/newVNFChange/test3.robot @@ -0,0 +1,47 @@ +*** Settings *** +Documentation New VNF Change SO workflows +Library Process +Library Selenium2Library +Library Collections +Library String +Library RequestsLibrary +Library OperatingSystem +Resource ../../common.robot +Resource ../resources/keywords/login_vid_keywords.robot + +*** Variables *** + + +*** Test Cases *** +add new VNF Change in VID GUI From SO SDC worfkow + [Documentation] create VNF Change from SO SDC workflows + + Click Element xpath=//div[@heading='VNF Changes']//a[1] + + Click Element xpath=//div[@ng-click='vm.createNewChange()'] + + Wait Until Page Contains New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + + Select From List xpath=//select[@name='subscriber'] CAR_2020_ER + + Select From List xpath=//select[@name='serviceType'] gNB + + Select From List xpath=//select[@name='vnfType'] vLBMS + + Select From List xpath=//select[@name='fromVNFVersion'] 3.0 + + Click Element xpath=//multiselect[@name='vnfName'] + Click Element xpath=//a[contains(text(),'vnf-ws')] + + Select From List xpath=//select[@name='workflow'] inPlaceSoftwareUpdate + + Wait Until Page Contains Operations Timeout ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Input Text xpath=//input[@id='so-workflow-parameter-operations_timeout'] 10 + Input Text xpath=//input[@id='so-workflow-parameter-existing_software_version'] test + Input Text xpath=//input[@id='so-workflow-parameter-new_software_version'] test + + Wait Until Element Is Enabled xpath=//button[@id='submit'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button xpath=//button[@id='submit'] + + Wait Until Page Does Not Contain New VNF Change ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + [Teardown] Close Browser
\ No newline at end of file |