summaryrefslogtreecommitdiffstats
path: root/docs/tox.ini
blob: edac8c35fc8963a1a5784c660bb7472fb6b67bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[tox]
minversion = 1.6
envlist = docs,
skipsdist = true

[testenv:docs]
basepython = python3
deps = -r{toxinidir}/requirements-docs.txt
commands =
    sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html
    echo "Generated docs available in {toxinidir}/_build/html"
whitelist_externals =
    echo
    git
    sh

[testenv:docs-linkcheck]
basepython = python3
#deps = -r{toxinidir}/requirements-docs.txt
commands = echo "Link Checking not enforced"
#commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck
whitelist_externals = echo
und-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
declare namespace Cypress {
  interface Chainable {
    initAAIMock: typeof initAAIMock;
    initAlaCarteService : typeof initAlaCarteService;
    initZones : typeof initZones;
    initTenants : typeof initTenants;
    initSearchVNFMemebers : typeof  initSearchVNFMemebers;
    initActiveNetworks : typeof  initActiveNetworks;
    initActiveVPNs : typeof  initActiveVPNs;
    initGetAAISubDetails : typeof  initGetAAISubDetails;
    initAAIServices: typeof initAAIServices;
  }
}

function initGetSubscribers(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/subscribers.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_subscribers**",
        response : response ? response : res
      }).as('initGetSubscribers')
  });
}

function initAaiGetFullSubscribers(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/subscribers.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_full_subscribers**",
        response : response ? response : res
      }).as('initGetSubscribers')
  });
}

function initGetAAISubDetails(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/aaiSubDetails.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status: 200,
        url: Cypress.config('baseUrl') + "/aai_sub_details/**",
        response: response ? response : res
      }).as('aai-sub-details')
  });
}

function initAlaCarteService(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/a-la-carteService.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status: 200,
        url: Cypress.config('baseUrl') + "/rest/models/services**",
        response: response ? response : res
      }).as('initAlaCarteService')
  });
}





function initTenants(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/tenants.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status: 200,
        url: Cypress.config('baseUrl') + "/aai_get_tenants/**",
        response: response ? response : res
      }).as('initTenants')
  });
}

function initAAIServices(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/aaiServices.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_services**",
        response : response ? response : res
      }).as(('initAAIServices'));
  });
}

function initZones(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/zones.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_aic_zones**",
        response : response ? response : res
      }).as(('zones'));
  });
}

//Mock of vnf's that members for VNF Group
function initSearchVNFMemebers(response? : JSON) : void {
  cy.readFile('../vid-automation/src/test/resources/VnfGroup/searchMembersResponse.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_search_group_members/**",
        response : response ? response : res
      }).as(('searchVNFMembers'));
  });
}

function initActiveNetworks(response? : JSON) : void {
  cy.readFile('../vid-automation/src/test/resources/viewEdit/aaiGetActiveNetworks.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_active_networks/**",
        response : response ? response : res
      }).as(('getActiveNetworks'));
  });
}

function initActiveVPNs(response? : JSON) : void {
  cy.readFile('cypress/support/jsonBuilders/mocks/jsons/aaiActiveVPNs.json').then((res) => {
    cy.server()
      .route({
        method: 'GET',
        status : 200,
        url : Cypress.config('baseUrl') + "/aai_get_vpn_list/**",
        response : response ? response : res
      }).as(('getVPNs'));
  });
}

function initAAIMock(): void {
  initAaiGetFullSubscribers();
  initGetSubscribers();
  initAAIServices();
  initTenants();

}


Cypress.Commands.add('initAAIMock', initAAIMock);
Cypress.Commands.add('initAlaCarteService', initAlaCarteService);
Cypress.Commands.add('initZones', initZones);
Cypress.Commands.add('initTenants', initTenants);
Cypress.Commands.add('initAaiGetFullSubscribers', initAaiGetFullSubscribers);
Cypress.Commands.add('initGetAAISubDetails', initGetAAISubDetails);
Cypress.Commands.add('initSearchVNFMemebers', initSearchVNFMemebers);
Cypress.Commands.add('initActiveNetworks', initActiveNetworks);
Cypress.Commands.add('initActiveVPNs', initActiveVPNs);
Cypress.Commands.add('initAAIServices', initAAIServices);