Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame^] | 1 | ///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" /> |
| 2 | |
| 3 | import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder"; |
| 4 | import {ServiceModel} from "../../support/jsonBuilders/models/service.model"; |
| 5 | |
| 6 | describe('Welcome page', function () { |
| 7 | var jsonBuilderAndMock : JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>(); |
| 8 | |
| 9 | //describe('Contact us', () => { |
| 10 | |
| 11 | beforeEach(() => { |
| 12 | cy.login(); |
| 13 | }); |
| 14 | |
| 15 | afterEach(() => { |
| 16 | cy.screenshot(); |
| 17 | }); |
| 18 | |
| 19 | it(`verifying Contact Us link"`, function () { |
| 20 | cy.visit('/welcome.htm'); |
| 21 | cy.get('A[href="mailto:portal@lists.onap.org"]').contains('Contact Us'); |
| 22 | }); |
| 23 | |
| 24 | it(`verifying VID version"`, function () { |
| 25 | |
| 26 | const APP_VERSION = "1902.1948"; |
| 27 | cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/version.json').then((res) => { |
| 28 | jsonBuilderAndMock.basicJson(res, |
| 29 | Cypress.config('baseUrl') + '/version', |
| 30 | 200, |
| 31 | 0, |
| 32 | 'app_version'); |
| 33 | }); |
| 34 | cy.visit('/welcome.htm'); |
| 35 | cy.getElementByDataTestsId('app-version').should("text", APP_VERSION); |
| 36 | }); |
| 37 | // }); |
| 38 | }); |
| 39 | |
| 40 | |