aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/clamp/UIs
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests/clamp/UIs')
-rw-r--r--test/csit/tests/clamp/UIs/01__Create_template.robot81
-rw-r--r--test/csit/tests/clamp/UIs/02__Create_model.robot (renamed from test/csit/tests/clamp/UIs/test1.robot)32
-rw-r--r--test/csit/tests/clamp/UIs/data/TCA_template_properties.yml51
3 files changed, 148 insertions, 16 deletions
diff --git a/test/csit/tests/clamp/UIs/01__Create_template.robot b/test/csit/tests/clamp/UIs/01__Create_template.robot
new file mode 100644
index 000000000..d740ac987
--- /dev/null
+++ b/test/csit/tests/clamp/UIs/01__Create_template.robot
@@ -0,0 +1,81 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Library Selenium2Library
+Library XvfbRobot
+
+
+*** Test Cases ***
+Get Requests health check ok
+ CreateSession clamp http://localhost:8080
+ ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Open Browser
+# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line.
+ Start Virtual Display 1920 1080
+ Open Browser http://localhost:8080/designer/index.html browser=firefox
+ Set Selenium Speed .2 seconds
+ Set Window Size 1920 1080
+ ${title}= Get Title
+ Should Be Equal CLDS ${title}
+
+Bad Login to Clamp UI and Verify not logged in
+ Input Text locator=username text=bad_login
+ Input Text locator=password text=This_is_bad_password
+ Press Key locator=password key=\\13
+ Wait Until Element Is Visible locator=username timeout=5
+ Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin*
+
+Good Login to Clamp UI and Verify logged in
+ Input Text locator=username text=admin
+ Input Text locator=password text=password
+ Press Key locator=password key=\\13
+ Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
+ Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
+
+Create Template from Menu
+ Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60
+ Click Element xpath=//*[@id="navbar"]/ul/li[1]/a
+ Wait Until Element Is Visible locator=Create Template timeout=60
+ Click Element locator=Create Template
+ Input Text locator=modelName text=template
+ Click Button locator=OK
+
+Drag and Drop Boxes for template
+ Wait Until Element Is Visible xpath=//*[@class="entry icon-collector-node"] timeout=60
+ Drag And Drop By Offset xpath=//*[@class="entry icon-collector-node"] 280 280
+ Drag And Drop By Offset xpath=//*[@class="entry icon-tca-node"] 550 280
+ Drag And Drop By Offset xpath=//*[@class="entry icon-policy-node"] 800 280
+ Drag And Drop By Offset xpath=//*[@class="entry icon-end-event-none"] 1000 280
+
+Drag and Drop Connectors for template
+ Click Element xpath=//*[starts-with(@data-element-id, "StartEvent_")]
+ Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div
+ Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div xpath=//*[starts-with(@data-element-id, "Collector_")]
+ Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div
+ Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "TCA_")]
+ Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div
+ Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "Policy_")]
+ Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div
+ Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "EndEvent_")]
+
+Add Template properties yaml from Menu
+ Click Element xpath=//*[@id="navbar"]/ul/li[1]/a
+ Wait Until Element Is Visible locator=Template Properties timeout=60
+ Click Element locator=Template Properties
+ ${data}= Get Binary File ${CURDIR}${/}data${/}TCA_template_properties.yml
+ Input Text locator=service text=${data}
+ Click Button locator=Close
+
+Save Template from Menu
+ Click Element xpath=//*[@id="navbar"]/ul/li[1]/a
+ Wait Until Element Is Visible locator=Save Template timeout=60
+ Click Element locator=Save Template
+ Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE
+
+Close Browser
+ Close Browser \ No newline at end of file
diff --git a/test/csit/tests/clamp/UIs/test1.robot b/test/csit/tests/clamp/UIs/02__Create_model.robot
index fafb00042..979a9802e 100644
--- a/test/csit/tests/clamp/UIs/test1.robot
+++ b/test/csit/tests/clamp/UIs/02__Create_model.robot
@@ -3,7 +3,6 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
-Library HttpLibrary.HTTP
Library Selenium2Library
Library XvfbRobot
@@ -18,17 +17,11 @@ Open Browser
# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line.
Start Virtual Display 1920 1080
Open Browser http://localhost:8080/designer/index.html browser=firefox
+ Set Selenium Speed .2 seconds
Set Window Size 1920 1080
${title}= Get Title
Should Be Equal CLDS ${title}
-Bad Login to Clamp UI and Verify not logged in
- Input Text locator=username text=bad_login
- Input Text locator=password text=This_is_bad_password
- Press Key locator=password key=\\13
- Wait Until Element Is Visible locator=username timeout=5
- Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin*
-
Good Login to Clamp UI and Verify logged in
Input Text locator=username text=admin
Input Text locator=password text=password
@@ -36,13 +29,20 @@ Good Login to Clamp UI and Verify logged in
Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60
Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin
-Create Template from Menu
- Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60
- Click Element xpath=//*[@id="navbar"]/ul/li[1]/a
- Wait Until Element Is Visible locator=Create Template timeout=60
- Click Element locator=Create Template
- Input Text locator=modelName text=template1
- Click Button locator=OK
+Create Model from Menu
+ Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60
+ Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
+ Wait Until Element Is Visible locator=Create CL timeout=60
+ Click Element locator=Create CL
+ Input Text locator=modelName text=model1
+ Click Button locator=Create
+
+Save Model from Menu
+ Click Element xpath=//*[@id="navbar"]/ul/li[2]/a
+ Wait Until Element Is Visible locator=Save CL timeout=60
+ Click Element locator=Save CL
+ Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE
Close Browser
- Close Browser \ No newline at end of file
+ Close Browser
diff --git a/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml b/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml
new file mode 100644
index 000000000..3e09fdad5
--- /dev/null
+++ b/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml
@@ -0,0 +1,51 @@
+tosca_definitions_version: cloudify_dsl_1_2
+
+imports:
+- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml
+- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml
+
+node_templates:
+ MTCA:
+ type: dcae.nodes.cdap_app
+ properties:
+ service_name: "cdap-mtca-central"
+ deployment_JSON: |-
+ {
+ "clusterService": {"$ref": "/services/vm-cdap-cluster-central/instances/rdm2c"},
+ "namespace": "MTCA",
+ "appNames": [ "cdap-mtca" ],
+ "flowNames": [ "cdap-mtca.TCAVESCollectorFlow" ],
+ "workerNames": ["cdap-mtca.TCADMaaPMRSubscriberWorker", "cdap-mtca.TCADMaaPMRPublisherWorker"],
+ "serviceNames" : [],
+ "apps": {
+ "cdap-mtca": {
+ "jarFile": "/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar",
+ "artifactName": "dcae-analytics-mtca",
+ "version": "1.0.0",
+ "appConfigFileContent": "{config:{ \"appName\":\"cdap-mtca\", \"appDescription\":\"DCAE Analytics Threshold Crossing Alert Application\", \"tcaSubscriberOutputStreamName\":\"TCASubscriberOutputStream\", \"thresholdCalculatorFlowletInstances\":2, \"tcaVESMessageStatusTableName\":\"TCAVESMessageStatusTable\", \"tcaVESMessageStatusTableTTLSeconds\":864000, \"tcaVESAlertsTableName\":\"TCAVESAlertsTable\", \"tcaVESAlertsTableTTLSeconds\":1728000 }}"
+ }
+ },
+
+ "configuration": {
+ "$class": "com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration",
+ "subscriberContentType": "",
+ "subscriberConsumerId": "c12",
+ "subscriberConsumerGroup": "OpenDCAE-c12",
+ "subscriberTimeoutMS": "-1",
+ "subscriberMessageLimit": "-1",
+ "subscriberPollingInterval": "20000",
+ "publisherContentType": "application/json",
+ "publisherMaxBatchSize": "10",
+ "publisherMaxRecoveryQueueSize": "100000",
+ "publisherPollingInterval": "20000",
+ "publisherAlertWindowingTime": "86400",
+ "policyName": "policy.dcae.configuration",
+ "policyScope": "pnf=eNodeB;type=configuration",
+ "policyVersion": "1.0.0",
+ "domain" : "measurementsForVfScaling",
+
+ "signatures" : {
+ }
+
+ }
+ }