1 ///<reference path="../../../node_modules/cypress/types/index.d.ts"/>
2 /// <reference types="Cypress" />
3 import {JsonBuilder} from '../../support/jsonBuilders/jsonBuilder';
4 import {AsyncInstantiationModel} from '../../support/jsonBuilders/models/asyncInstantiation.model';
6 describe('Spinner', function () {
7 describe('spinner', () => {
8 var jsonBuilderInstantiationBuilder : JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
10 cy.clearSessionStorage();
12 cy.preventErrorsOnLoading();
22 it('spinner should display after api call', function () {
23 const timeBomb:Date = new Date(2018,6,10,0,0,0); //month 6 is July
24 if (new Date(Date.now()) > timeBomb) {
26 cy.readFile('cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json').then((res) => {
28 jsonBuilderInstantiationBuilder.basicJson(res,
29 Cypress.config('baseUrl') + "/asyncInstantiation**",
32 "error 500 asyncInstantiation");
33 cy.openIframe('app/ui/#/instantiationStatus');
35 cy.get('.custom-loader')