summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2020-05-21 18:16:57 +0300
committerAmichai Hemli <amichai.hemli@intl.att.com>2020-05-25 13:19:12 +0000
commit5b5e0bba604cd6dc41e6bd90b7399d82db7d0cb8 (patch)
tree68aec333e9f831970d8f5efe0be860e6b26d9810 /vid-webpack-master/cypress
parentf151db2210c86dcd87e2341041dde1c2710e95d2 (diff)
Set JobStatus as COMPLETED_AND_PAUSED when needed so we can present it on instantiationStatus - cypress test
Issue-ID: VID-821 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Change-Id: Iaddff3c0b030888535beae8047c1af20f47bc6bc
Diffstat (limited to 'vid-webpack-master/cypress')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts37
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json37
2 files changed, 74 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index 56a2491e5..8d19bc90d 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -3,6 +3,17 @@
import {JsonBuilder} from '../../support/jsonBuilders/jsonBuilder';
import {AsyncInstantiationModel} from '../../support/jsonBuilders/models/asyncInstantiation.model';
+import {
+ COMPLETED_WITH_ERRORS,
+ INPROGRESS,
+ PAUSE,
+ PAUSE_UPON_COMPLETION,
+ PENDING,
+ STOPPED,
+ SUCCESS_CIRCLE,
+ UNKNOWN,
+ X_O
+} from "../../../src/app/instantiationStatus/instantiationStatus.component.service";
describe('Instantiation status', function () {
var jsonBuilderInstantiationBuilder : JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
@@ -33,6 +44,9 @@ describe('Instantiation status', function () {
const serviceAction:any = {INSTANTIATE : 'Instantiate', DELETE: 'Delete', UPDATE: 'Update', UPGRADE: 'Upgrade'};
cy.openIframe('app/ui/#/instantiationStatus');
for(let i = 0 ; i < asyncRes.length; i++){
+ cy.getTableRowByIndex('instantiation-status', i).get(`td custom-icon#jobStatusIcon-${i} div`)
+ .should('have.class', `__${getJobIconClass(asyncRes[i].jobStatus)}`);
+
if(asyncRes[i].project){
cy.getTableRowByIndex('instantiation-status', i).get('td#project span').contains(asyncRes[i].project);
}
@@ -60,6 +74,29 @@ describe('Instantiation status', function () {
}
});
+ function getJobIconClass(status: string) : string{
+ switch(`${status}`.toUpperCase()) {
+ case 'PENDING' :
+ return PENDING;
+ case 'IN_PROGRESS' :
+ return INPROGRESS;
+ case 'PAUSED' :
+ return PAUSE;
+ case 'FAILED' :
+ return X_O;
+ case 'COMPLETED' :
+ return SUCCESS_CIRCLE;
+ case 'STOPPED' :
+ return STOPPED;
+ case 'COMPLETED_WITH_ERRORS' :
+ return COMPLETED_WITH_ERRORS;
+ case 'COMPLETED_AND_PAUSED' :
+ return PAUSE_UPON_COMPLETION;
+ default:
+ return UNKNOWN;
+ }
+ }
+
it('should filter rows by filter text', function () {
cy.openIframe('app/ui/#/instantiationStatus');
cy.getElementByDataTestsId("instantiation-status-filter").type("ComplexService");
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
index 2a8c7e882..f2bb9d1c7 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
@@ -303,5 +303,42 @@
"serviceModelName": "action-data",
"serviceModelVersion": "1.0",
"createdBulkDate": 1524663233000
+ },
+ {
+ "id": 11,
+ "created": 1524663233000,
+ "modified": 1524663236000,
+ "action": "INSTANTIATE",
+ "createdId": null,
+ "modifiedId": null,
+ "rowNum": null,
+ "auditUserId": null,
+ "auditTrail": null,
+ "jobId": "850dc7d2-5240-437f-9bcd-b1ed7dc339d9",
+ "templateId": "262fccc5-cae9-4258-b522-540c4010e0a9",
+ "userId": "16807000",
+ "aLaCarte": true,
+ "msoRequestId": "c0011670-0e1a-4b74-945d-8bf5aede1d44",
+ "jobStatus": "COMPLETED_AND_PAUSED",
+ "statusModifiedDate": 1524663233000,
+ "hidden": false,
+ "pause": false,
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "owningEntityName": "WayneHolland",
+ "project": "WATKINS",
+ "aicZoneId": "NFT1",
+ "aicZoneName": "NFTJSSSS-NFT1",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "tenantName": "AIN Web Tool-15-D-testalexandria",
+ "regionId": "hvf6",
+ "regionName": null,
+ "serviceType": "TYLER SILVIA",
+ "subscriberName": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "serviceInstanceId": null,
+ "serviceInstanceName": "sPenLiZXXpqzsVck instance name_01",
+ "serviceModelId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceModelName": "action-data",
+ "serviceModelVersion": "1.0",
+ "createdBulkDate": 1524663233000
}
]