change management cypress 32/94832/2
authorEinat Vinouze <einat.vinouze@intl.att.com>
Tue, 3 Sep 2019 11:52:13 +0000 (14:52 +0300)
committerIttay Stern <ittay.stern@att.com>
Tue, 3 Sep 2019 12:58:52 +0000 (12:58 +0000)
This is the very first cypress test for change management

Issue-ID: VID-596
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Change-Id: Ib3ddc5d88504392281dbd25c3d6688714a01a643

vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html
vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html
vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts [new file with mode: 0644]

index 3f4a94e..de0ec40 100644 (file)
@@ -24,7 +24,7 @@
     <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">&times;</span>
     <div ng-if="vm.errorMsg!==''"><font color='red'>{{vm.errorMsg.message}}</font></div>
 </div>
-<form class="form-create" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate>
+<form class="form-create" data-tests-id="newChangeManagementForm" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate>
     <div class="modal-body step1" ng-show="vm.wizardStep === 1" >
         <div class="form-group">
             <label class="control-label">Subscriber</label>
index 1d8b39c..194df6e 100644 (file)
@@ -25,7 +25,7 @@
     <div class="header">
         <span id="change-management-headline">VNF Changes</span>
         <span class="separator"></span>
-        <div class="button-container" ng-click="vm.createNewChange()">
+        <div data-tests-id="create-new-change-management" class="button-container" ng-click="vm.createNewChange()">
             <div class="icon-svg" id="change-management-new-button">
             <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 55.47337 55.63023"><path class="icon-filling" d="M27.7367.07843A27.73669,27.73669,0,1,0,55.4734,27.81512,27.73757,27.73757,0,0,0,27.7367.07843ZM40.18824,29.6178H29.53938V40.26666a1.80267,1.80267,0,0,1-3.60535,0V29.6178H15.28516a1.80267,1.80267,0,0,1,0-3.60535H25.934V15.36359a1.80267,1.80267,0,0,1,3.60535,0V26.01245H40.18824a1.80267,1.80267,0,1,1,0,3.60535Z"/></svg>
         </div>
diff --git a/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/changeManagement.e2e.ts
new file mode 100644 (file)
index 0000000..b5a01be
--- /dev/null
@@ -0,0 +1,39 @@
+///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" />
+
+import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder";
+import {AAISubDetailsModel} from "../../support/jsonBuilders/models/aaiSubDetails.model";
+
+describe('Change management AKA VNF changes', function () {
+  var jsonBuilderAAISubDetailsModel: JsonBuilder<AAISubDetailsModel> = new JsonBuilder<AAISubDetailsModel>();
+
+  //describe('Contact us', () => {
+
+  beforeEach(() => {
+    cy.login();
+    cy.initAAIMock();
+
+    cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/defect710619/aaiSubDetailsE2E.json').then((res) => {
+      jsonBuilderAAISubDetailsModel.basicJson(
+        res,
+        Cypress.config('baseUrl') + "/aai_sub_details/e433710f-9217-458d-a79d-1c7aff376d89**",
+        200,
+        0,
+        "aai-sub-details")
+    });
+
+  });
+
+  afterEach(() => {
+    cy.screenshot();
+  });
+
+  it(`verifying + VNF changes`, function () {
+    cy.visit('/serviceModels.htm#/change-management');
+    cy.getElementByDataTestsId('create-new-change-management').click();
+    cy.getElementByDataTestsId('newChangeManagementForm');
+    cy.selectDropdownOptionByText('subscriberName', 'SILVIA ROBBINS');
+    cy.selectDropdownOptionByText('serviceType', 'TYLER SILVIA');
+  });
+});
+
+