summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/welcomePage.e2e.ts
blob: 5b34ee57fc58e6eba17ead9d5c7205fde40c3056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" />

import {JsonBuilder} from "../../support/jsonBuilders/jsonBuilder";
import {ServiceModel} from "../../support/jsonBuilders/models/service.model";

describe('Welcome page', function () {
  var jsonBuilderAndMock : JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();

  //describe('Contact us', () => {

    beforeEach(() => {
      cy.login();
    });

  afterEach(() => {
    cy.screenshot();
  });

    it(`verifying Contact Us link"`, function () {
    cy.visit('/welcome.htm');
    cy.get('A[href="mailto:VID-Tier4@list.att.com"]').contains('Contact Us');
      });

  it(`verifying VID version"`, function () {

    const APP_VERSION = "1902.1948";
    cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/version.json').then((res) => {
      jsonBuilderAndMock.basicJson(res,
        Cypress.config('baseUrl') + '/version',
        200,
        0,
        'app_version');
    });
    cy.visit('/welcome.htm');
    cy.getElementByDataTestsId('app-version').should("text", APP_VERSION);
  });
  //  });
  });