///<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('Retry Page', function () {
  let jsonBuilderAndMock: JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();
  beforeEach(() => {
    cy.window().then((win) => {
      win.sessionStorage.clear();
      cy.preventErrorsOnLoading();
      cy.initAAIMock();
      jsonBuilderAndMock.basicMock('/cypress/support/jsonBuilders/mocks/jsons/serviceModels/ecompNamingFalseModel.json',
        Cypress.config('baseUrl') + "/rest/models/services/6b528779-44a3-4472-bdff-9cd15ec93450");
      cy.initVidMock();
      cy.initZones();
      cy.permissionVidMock();
      cy.login();
    });
  });

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

  it(`RETRY - drawing board mode - should show correct failed icon with children + Retry button / Mock Data`,  ()=> {
    const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
    const SERVICE_TYPE: string = "TYLER SILVIA";
    const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
    const SERVICE_MODEL_ID: string = '6b528779-44a3-4472-bdff-9cd15ec93450';
    const JOB_ID: string = '123456-44a3-4472-bdff-9cd15ec12345';
    cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json').then((res) => {
      // Service with isFailed.
      res.isFailed= true;
      res.action = 'Create';
      res.statusMessage = 'Service instantiation has failed.'
      // Adding VNF with isFailed.
      res.vnfs["2017-388_ADIOD-vPE 0"].isFailed = true;
      res.vnfs["2017-488_ADIOD-vPE 0"].isFailed = true;
      res.vnfs["2017-488_ADIOD-vPE 0"].statusMessage = 'VNF instantiation failed message';
      res.vnfs["2017-388_ADIOD-vPE 0"].action = 'Create';
      res.vnfs["2017-488_ADIOD-vPE 0"].action = 'Create';
      res.networks["ExtVL 0"].action = 'Create';
      res.networks["ExtVL 0"].statusMessage = 'Network instantiation failed message';

      // Adding VFModule with isFailed.
      res.vnfs["2017-488_ADIOD-vPE 0"].vfModules["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0"]["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0uvfot"].isFailed = true;
      res.vnfs["2017-488_ADIOD-vPE 0"].vfModules["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0"]["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0uvfot"].statusMessage = 'Short vfModule Failure Message';
      res.vnfs["2017-488_ADIOD-vPE 0"].vfModules["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0"]["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0uvfot"].action = 'Create';

      jsonBuilderAndMock.basicJson(
        res,
        Cypress.config('baseUrl') + "/asyncInstantiation/bulkForRetry/" + JOB_ID,
        200, 0,
        "initServiceInstanceRetryTopology",
      )
    });

    cy.openIframe(`app/ui/#/servicePlanning/RETRY_EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&jobId=${JOB_ID}`);

    cy.getElementByDataTestsId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_ADIOD-vPE 0').click();

    cy.get('.failed-msg').should('have.length', 5);
    cy.get('.newIcon').should('have.length', 4);

    //cy.drawingBoardNumberOfExistingElementsShouldContains(4);
    cy.get('.toggle-children-wrapper.toggle-children-wrapper-expanded').eq(0).click().then(()=>{
      cy.get('.failed-msg').should('have.length', 5);
      cy.get('.newIcon').should('have.length', 4);
    });

    cy.drawingBoardTreeOpenContextMenuByElementDataTestId('node-afacccf6-397d-45d6-b5ae-94c39734b168-2017-388_ADIOD-vPE 0')
      .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
      .getElementByDataTestsId('cancelButton').click({force: true});
    cy.drawingBoardTreeOpenContextMenuByElementDataTestId('node-afacccf6-397d-45d6-b5ae-94c39734b168-2017-388_ADIOD-vPE 0')
      .drawingBoardTreeClickOnContextMenuOptionByName('Remove');

    cy.get('.newIcon').should('have.length', 2);
    cy.getElementByDataTestsId('isViewOnly-status-test').contains('IN EDITING');

    cy.getElementByDataTestsId("openMenuBtn").click({force: true})
      .getElementByDataTestsId("context-menu-header-edit-item").click({force: true})
      .getElementByDataTestsId("serviceName").should('have.text','mCaNkinstancename')
      .getElementByDataTestsId("subscriberName")
      .getElementByDataTestsId("serviceType")
      .getElementByDataTestsId("owningEntity")
      .getElementByDataTestsId("project")
      .getElementByDataTestsId("rollback")
      .getElementByDataTestsId('cancelButton').click({force: true});
    cy.getElementByDataTestsId("openMenuBtn").click({force: true})
      .getElementByDataTestsId("context-menu-header-audit-item");
    // button should be RETRY
    cy.getElementByDataTestsId('deployBtn').should('contain', 'REDEPLOY');
    cy.getElementByDataTestsId('deployBtn').should('not.have.attr', 'disabled');

    cy.checkPopoverContentOnMouseEvent('service-failed-msg',  '.popover-content.popover-body','mouseenter', 0)
      .should('contain', 'Service instantiation has failed');
  });

  it(`RETRY - view mode- should show failed icon with no actions enabled`, ()=> {
    const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
    const SERVICE_TYPE: string = "TYLER SILVIA";
    const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
    const SERVICE_MODEL_ID: string = '6b528779-44a3-4472-bdff-9cd15ec93450';
    const JOB_ID: string = '123456-44a3-4472-bdff-9cd15ec12345';
    cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json').then((res) => {

      // Adding VNF with isFailed.
      res.vnfs["2017-388_ADIOD-vPE 0"].isFailed = true;
      res.vnfs["2017-488_ADIOD-vPE 0"].isFailed = true;
      res.vnfs["2017-388_ADIOD-vPE 0"].action = 'Create';
      res.vnfs["2017-488_ADIOD-vPE 0"].action = 'Create';
      res.vnfs["2017-488_ADIOD-vPE 0"].statusMessage = 'Very long message that checks the popoverwindow can show very very long messagewithout problem.as-erfderfd-rfghthth-yjyjyj-ukuk. For more details go to audit show window';
      // Adding VFModule with isFailed.
      res.vnfs["2017-488_ADIOD-vPE 0"].vfModules["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0"]["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0uvfot"].isFailed = true;
      res.vnfs["2017-488_ADIOD-vPE 0"].vfModules["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0"]["2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0uvfot"].action = 'Create';

      cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/responceForFailedInstance.json').then((res) => {
        jsonBuilderAndMock.basicJson(
          res,
          Cypress.config('baseUrl') + "/asyncInstantiation/auditStatusForRetry**",
          200,
          0,
          "msoStatusForFailedInstance",
        )
      });

      jsonBuilderAndMock.basicJson(
        res,
        Cypress.config('baseUrl') + "/asyncInstantiation/bulkForRetry/" + JOB_ID,
        200, 0,
        "initServiceInstanceRetryTopology",
      )
    });

    cy.openIframe(`app/ui/#/servicePlanning/RETRY?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&jobId=${JOB_ID}`);

    cy.getElementByDataTestsId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_ADIOD-vPE 0').click();

    cy.get('.failed-msg').should('have.length', 4);
    cy.get('.newIcon').should('have.length', 4);

    cy.get('.toggle-children-wrapper.toggle-children-wrapper-expanded').eq(0).click().then(()=>{
      cy.get('.failed-msg').should('have.length', 4);
      cy.get('.newIcon').should('have.length', 4);
    });
    cy.assertMenuItemsForNode(['showAuditInfo'],'node-afacccf6-397d-45d6-b5ae-94c39734b168-2017-388_ADIOD-vPE 0-menu-btn');
    cy.getElementByDataTestsId('isViewOnly-status-test').contains('VIEW ONLY');

    // deploy button should be 'REDEPLOY' and disabled.
    cy.getElementByDataTestsId('editBtn').should('contain', 'REDEPLOY').should('have.attr', 'disabled');

    cy.checkPopoverContentOnMouseEvent('failed-error-message',  '.popover-content.popover-body','mouseenter', 0)
      .should('not.be.visible');
    cy.checkPopoverContentOnMouseEvent('failed-error-message',  '.popover-content.popover-body','mouseenter', 1)
      .should('contain', 'Very long');

  });

  it(`RETRY - drawing board mode - should show correct failed icon + Retry button`, function () {
    const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
    const SERVICE_TYPE: string = "TYLER SILVIA";
    const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
    const SERVICE_MODEL_ID: string = '6b528779-44a3-4472-bdff-9cd15ec93450';
    const JOB_ID: string = '123456-44a3-4472-bdff-9cd15ec12345';
    let expectedResult: JSON;

    cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json').then((res) => {

      jsonBuilderAndMock.basicJson(
        res,
        Cypress.config('baseUrl') + "/asyncInstantiation/bulkForRetry/" + JOB_ID,
        200, 0,
        "initServiceInstanceRetryTopology",
      )
    });

    //TODO - join this to correct API test



    cy.openIframe(`app/ui/#/servicePlanning/RETRY_EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&jobId=${JOB_ID}`);

    cy.get('.failed-msg').should('have.length', 1);
    cy.get('.newIcon').should('have.length', 1);
    //TODO

    cy.getElementByDataTestsId('deployBtn').should('not.have.attr', 'disabled');

    // button should be RETRY
    cy.getElementByDataTestsId('deployBtn').should('contain', 'REDEPLOY').click();


    //TODO - join this to correct API test


  });

});
