Merge "a-la-carte services e2e test - add more 2 VfModules"
[vid.git] / vid-webpack-master / cypress / integration / iFrames / collectionResource.e2e.ts
index 796755c..a9649fa 100644 (file)
@@ -6,15 +6,13 @@ import {ServiceModel} from "../../support/jsonBuilders/models/service.model";
 describe('Drawing board : Collection resource', function () {
 
   let jsonBuilderAndMock: JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();
-
+  const serviceModelId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
   beforeEach(() => {
-    cy.window().then((win) => {
-      win.sessionStorage.clear();
+      cy.clearSessionStorage();
       cy.preventErrorsOnLoading();
       cy.initAAIMock();
       cy.initVidMock();
       cy.login();
-    });
   });
 
   afterEach(() => {
@@ -24,7 +22,7 @@ describe('Drawing board : Collection resource', function () {
 
   describe('should show collection resource model correctly', () => {
     it('collection type + name', () => {
-      const serviceModelId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
+
       const collectionResourceName: string = "CR_sanity 0";
       initDrawingBoardWithColectionResource(serviceModelId, collectionResourceName);
       cy.get('.vf-type').contains('CR');
@@ -32,7 +30,6 @@ describe('Drawing board : Collection resource', function () {
     });
 
     it('collection resource component info', () => {
-      const serviceModelId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
       const collectionResourceName: string = "CR_sanity 0";
       const redux = initDrawingBoardWithColectionResource(serviceModelId, collectionResourceName)
       cy.getElementByDataTestsId(`node-${collectionResourceName}`).click().then(()=>{