Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | ///<reference path="../../../node_modules/cypress/types/index.d.ts"/> |
| 2 | import { JsonBuilder } from '../../support/jsonBuilders/jsonBuilder'; |
| 3 | import { AsyncInstantiationModel } from '../../support/jsonBuilders/models/asyncInstantiation.model'; |
| 4 | |
| 5 | describe('Audit information modal', function () { |
| 6 | describe('basic UI tests', () => { |
| 7 | var jsonBuilderInstantiationBuilder : JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>(); |
| 8 | beforeEach(() => { |
| 9 | cy.window().then((win) => { |
| 10 | win.sessionStorage.clear(); |
| 11 | cy.setReduxState(); |
| 12 | cy.preventErrorsOnLoading(); |
| 13 | jsonBuilderInstantiationBuilder.basicMock('/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json', |
| 14 | Cypress.config('baseUrl') + "/asyncInstantiation**"); |
| 15 | cy.initAAIMock(); |
| 16 | cy.initVidMock(); |
| 17 | cy.login(); |
| 18 | }) |
| 19 | }); |
| 20 | |
| 21 | it(`should display 2 tables with information's`, function () { |
| 22 | |
| 23 | cy.openIframe('app/ui/#/instantiationStatus'); |
| 24 | cy.get('.instantiation-status-data tbody tr').each(function (row, index) { |
| 25 | cy.get('.icon-menu').eq(index).click() |
| 26 | .get('.audit-icon').click() |
| 27 | .get('#service-model-name').should('contain', row.find('#serviceModelName').text().trim()) |
| 28 | .getElementByDataTestsId('model-item-value-userId').should('contain', row.find('#userId').text().trim()) |
| 29 | .get('#service-instantiation-audit-info-vid').should('be.visible') |
| 30 | .get('#service-instantiation-audit-info-vid').find('#vidJobStatus').should('be.visible') |
| 31 | .get('#service-instantiation-audit-info-mso').should('be.visible') |
| 32 | .get('#service-instantiation-audit-info-mso').find('#msoJobStatus').should('be.visible') |
| 33 | .get('#cancelButton').click(); |
| 34 | }); |
| 35 | }); |
| 36 | }); |
| 37 | }); |