Templates popup: most of the columns are empty (AIC zone is redundant) 30/100230/2
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>
Sun, 12 Jan 2020 09:37:12 +0000 (11:37 +0200)
committeryoav schneiderman <yoav.schneiderman@intl.att.com>
Sun, 12 Jan 2020 09:38:19 +0000 (09:38 +0000)
Issue-ID: VID-744
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: I2a3242649c7caae4b3047fd6db42987cc2f8fc68

vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts

index 168a936..dd51457 100644 (file)
@@ -94,7 +94,6 @@ describe('Template', () => {
     cy.get(`#header-instantiationStatus`).contains('Instantiation Status');
     cy.get(`#header-region`).contains('Region');
     cy.get(`#header-tenant`).contains('Tenant');
-    cy.get(`#header-aicZone`).contains('AIC Zone');
 
     // check table body row
     cy.getElementByDataTestsId(`userId-${templateJobIdFromE2EFile}`).contains('16807000');
@@ -104,7 +103,6 @@ describe('Template', () => {
     cy.getElementByDataTestsId(`summary-${templateJobIdFromE2EFile}`).contains('vnf: 1, vfModule: 2, volumeGroup: 1');
     cy.getElementByDataTestsId(`region-${templateJobIdFromE2EFile}`).contains('hvf3 (SOMENAME)');
     cy.getElementByDataTestsId(`tenant-${templateJobIdFromE2EFile}`).contains('greatTenant');
-    cy.getElementByDataTestsId(`aicZone-${templateJobIdFromE2EFile}`).contains('NFTJSSSS-NFT1');
 
 
     //check load button is disabled
index 84783c2..39c6da4 100644 (file)
@@ -56,7 +56,6 @@
             <th class="header-title" id="header-summary">Summary</th>
             <th class="header-title" id="header-region">Region</th>
             <th class="header-title" id="header-tenant">Tenant</th>
-            <th class="header-title" id="header-aicZone">AIC Zone</th>
           </tr>
           </thead>
           <tbody>
                 </custom-ellipsis>
               </div>
             </td>
-            <td>
-              <div>
-                <custom-ellipsis
-                  [dataTestId]="'aicZone-' + item.jobId"
-                  [id]="item.aicZone"
-                  [value]="item.aicZone"
-                  [breakWord]="true">
-                </custom-ellipsis>
-              </div>
-            </td>
           </tr>
           </tbody>
         </table>
index 78614c0..a479e0c 100644 (file)
@@ -17,9 +17,6 @@ class ActivatedRouteMock<T> {
   }
 }
 
-//
-
-
 class MockAppStore {}
 
 describe('instantiation templates modal service', () => {
@@ -123,7 +120,6 @@ describe('instantiation templates modal service', () => {
     expect(tableRows[0].instantiationStatus).toEqual('FAILED');
     expect(tableRows[0].region).toEqual('hvf6 (AAA1)');
     expect(tableRows[0].tenant).toEqual('AIN Web Tool-15-D-SSPtestcustome');
-    expect(tableRows[0].aicZone).toEqual('VSDKYUTP-BAN1');
     expect(tableRows[0].jobId).toEqual('9f88fdb5-bb47-4bf3-8c5f-98f1ad0ec87c');
   });
 
@@ -136,6 +132,14 @@ describe('instantiation templates modal service', () => {
     expect(result.region).toEqual('regionId (OWNER)');
   });
 
+  test('getRegion if null should return empty string', () => {
+    let result: InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({
+      owningEntityName: 'att-owner',
+      regionId: null
+    });
+    expect(result.region).toEqual('(OWNER)');
+  });
+
   test('getCloudOwner should not return owningEntityName if not exist', () => {
     let result: InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({owningEntityName: null, regionId: 'regionId'});
     expect(result.region).toEqual('regionId');
index f2eda9d..56f76b3 100644 (file)
@@ -10,7 +10,6 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{
   readonly summary?: string;
   readonly region?: string;
   readonly tenant?: string;
-  readonly aicZone?: string;
 
   constructor(data) {
     super(data);
@@ -21,7 +20,6 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{
     this.summary = this.convertRequestSummaryFromMapToString(data.requestSummary);
     this.region = this.getRegion(data.regionId, data.owningEntityName);
     this.tenant = !_.isNil(data.tenantName) ? data.tenantName : null;
-    this.aicZone = !_.isNil(data.aicZoneName) ? data.aicZoneName : null;
   }
 
 
@@ -36,7 +34,8 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{
 
   getRegion = (regionId: string, owningEntityName: string): string => {
     const convertOwning = !_.isNil(owningEntityName) ? `(${this.getCloudOwner(owningEntityName)})` : '';
-    return `${regionId} ${convertOwning}`.trim();
+    const region = !_.isNil(regionId) ? regionId : '';
+    return `${region} ${convertOwning}`.trim();
   };