aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
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/integration/iFrames/instantiationStatus.e2e.ts
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/integration/iFrames/instantiationStatus.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts37
1 files changed, 37 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");