blob: 98d39ff8e30f644df80c3fcf5a98ca86af640ca2 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" />
2
3import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder";
4import {ServiceModel} from "../../support/jsonBuilders/models/service.model";
5
6describe('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