From 0cb148e5432f18afec84e768a6f9c87f8500107e Mon Sep 17 00:00:00 2001 From: Dani Garcia Date: Thu, 24 Oct 2024 17:58:33 +0200 Subject: [PATCH] portal/brand: added clients block cypress tests --- .../RatingProfile/RatingProfile.cy.js | 29 +++ .../UsersAddress/UsersAddress.cy.js | 28 +++ .../Retails/RatingProfile/RatingProfile.cy.js | 29 +++ .../Retails/UsersAddress/UsersAdress.cy.js | 31 +++ .../BannedAddress/BannedAddress.cy.js | 26 +++ .../RatingProfile/RatingProfile.cy.js | 29 +++ .../UsersAddress/UsersAdress.cy.js | 31 +++ .../Administrator/Administrator.cy.js | 47 ++++ .../RatingProfile/RatingProfile.cy.js | 29 +++ .../Clients/Wholesales/Trusted/Trusted.cy.js | 103 +++++++++ .../e2e/Clients/Wholesales/Wholesales.cy.js | 28 +++ .../Clients/Wholesales/Wholesales.tests.js | 81 +++++++ .../e2e/Clients/common/RatingProfile.tests.js | 73 ++++++ .../e2e/Clients/common/UserAddress.tests.js | 77 +++++++ .../e2e/Clients/utils/PbxsValidator.ts | 58 +++++ .../fixtures/Kam/Trusted/getCollection.json | 17 ++ .../cypress/fixtures/Kam/Trusted/getItem.json | 16 ++ .../cypress/fixtures/Kam/Trusted/post.json | 29 +++ .../cypress/fixtures/Kam/Trusted/put.json | 29 +++ .../Kam/UsersAddresses/getCollection.json | 13 ++ .../fixtures/Kam/UsersAddresses/post.json | 26 +++ .../fixtures/Kam/UsersAddresses/put.json | 15 ++ .../Provider/BannedAddress/getCollection.json | 29 +++ .../Companies/Wholesales/getItem.json | 119 ++++++++++ .../Provider/Companies/Wholesales/post.json | 104 +++++++++ .../Provider/Companies/Wholesales/put.json | 98 +++++++++ .../Provider/Companies/getCollection.json | 25 +++ .../RatingPlanGroup/getCollections.json | 41 ++++ .../Provider/RatingProfile/getCollection.json | 27 +++ .../Provider/RatingProfile/postItem.json | 27 +++ .../Provider/RatingProfile/putItem.json | 23 ++ ...er-residential-client-rating-profiles.json | 106 +++++++++ ...er-residential-client-users-addresses.json | 77 +++++++ ...onsumer-retail-client-users-addresses.json | 104 +++++++++ ...nsumer-retails-client-rating-profiles.json | 106 +++++++++ ...-consumer-vpbx-client-rating-profiles.json | 106 +++++++++ ...-consumer-vpbx-client-users-addresses.json | 104 +++++++++ ...er-wholesale-brand-consumer-wholesale.json | 207 ++++++++++++++++++ ...and-consumer-wholesale-client-trusted.json | 112 ++++++++++ .../prepareGenericPactInterceptors.js | 25 +++ 40 files changed, 2284 insertions(+) create mode 100644 web/portal/brand/cypress/e2e/Clients/Residential/RatingProfile/RatingProfile.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Residential/UsersAddress/UsersAddress.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Retails/RatingProfile/RatingProfile.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Retails/UsersAddress/UsersAdress.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/VirtualPbxs/BannedAddress/BannedAddress.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/VirtualPbxs/RatingProfile/RatingProfile.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/VirtualPbxs/UsersAddress/UsersAdress.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Wholesales/Administrator/Administrator.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Wholesales/RatingProfile/RatingProfile.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Wholesales/Trusted/Trusted.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.cy.js create mode 100644 web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.tests.js create mode 100644 web/portal/brand/cypress/e2e/Clients/common/RatingProfile.tests.js create mode 100644 web/portal/brand/cypress/e2e/Clients/common/UserAddress.tests.js create mode 100644 web/portal/brand/cypress/fixtures/Kam/Trusted/getCollection.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/Trusted/getItem.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/Trusted/post.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/Trusted/put.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/UsersAddresses/getCollection.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/UsersAddresses/post.json create mode 100644 web/portal/brand/cypress/fixtures/Kam/UsersAddresses/put.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/BannedAddress/getCollection.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/getItem.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/post.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/put.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/RatingPlanGroup/getCollections.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/RatingProfile/getCollection.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/RatingProfile/postItem.json create mode 100644 web/portal/brand/cypress/fixtures/Provider/RatingProfile/putItem.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-residential-client-rating-profiles-brand-consumer-residential-client-rating-profiles.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-residential-client-users-addresses-brand-consumer-residential-client-users-addresses.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-retail-client-users-addresses-brand-consumer-retail-client-users-addresses.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-retails-client-rating-profiles-brand-consumer-retails-client-rating-profiles.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-vpbx-client-rating-profiles-brand-consumer-vpbx-client-rating-profiles.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-vpbx-client-users-addresses-brand-consumer-vpbx-client-users-addresses.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-wholesale-brand-consumer-wholesale.json create mode 100644 web/portal/brand/cypress/pacts/brand-provider-wholesale-client-trusted-brand-consumer-wholesale-client-trusted.json diff --git a/web/portal/brand/cypress/e2e/Clients/Residential/RatingProfile/RatingProfile.cy.js b/web/portal/brand/cypress/e2e/Clients/Residential/RatingProfile/RatingProfile.cy.js new file mode 100644 index 0000000000..a7e4db8d1c --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Residential/RatingProfile/RatingProfile.cy.js @@ -0,0 +1,29 @@ +import RatingProfiles from '../../../../fixtures/Provider/RatingProfile/getCollection.json'; +import { + deleteProfile, + postProfile, + putProfile, +} from '../../common/RatingProfile.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('residential-client-rating-profiles'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Virtual PBXs').click(); + + cy.get('header').should('contain', 'Virtual PBXs'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Rating Profiles').click(); + cy.get('header').should('contain', 'Rating Profiles'); + + cy.get('table').should('contain', RatingProfiles.body[0].ratingPlanGroup); + }); + + it('add RatingProfile', postProfile); + + it('edit RatingProfile', putProfile); + + it('delete RatingProfile', deleteProfile); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Residential/UsersAddress/UsersAddress.cy.js b/web/portal/brand/cypress/e2e/Clients/Residential/UsersAddress/UsersAddress.cy.js new file mode 100644 index 0000000000..f267b56d2e --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Residential/UsersAddress/UsersAddress.cy.js @@ -0,0 +1,28 @@ +import UsersAddresses from '../../../../fixtures/Kam/UsersAddresses/getCollection.json'; +import { + addUserAddress, + deleteUserAddress, +} from '../../common/UserAddress.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('residential-client-users-addresses'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Residentials').click(); + + cy.get('header').should('contain', 'Residentials'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root') + .contains(/^Authorized sources$/) + .click(); + cy.get('header').should('contain', 'Authorized sources'); + + cy.get('table').should('contain', UsersAddresses.body[0].description); + }); + + it('add UserAddress', addUserAddress); + + it('delete UserAddress', deleteUserAddress); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Retails/RatingProfile/RatingProfile.cy.js b/web/portal/brand/cypress/e2e/Clients/Retails/RatingProfile/RatingProfile.cy.js new file mode 100644 index 0000000000..7383a09d6e --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Retails/RatingProfile/RatingProfile.cy.js @@ -0,0 +1,29 @@ +import RatingProfiles from '../../../../fixtures/Provider/RatingProfile/getCollection.json'; +import { + deleteProfile, + postProfile, + putProfile, +} from '../../common/RatingProfile.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('retails-client-rating-profiles'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Retails').click(); + + cy.get('header').should('contain', 'Retails'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Rating Profiles').click(); + cy.get('header').should('contain', 'Rating Profiles'); + + cy.get('table').should('contain', RatingProfiles.body[0].ratingPlanGroup); + }); + + it('add RatingProfile', postProfile); + + it('edit RatingProfile', putProfile); + + it('delete RatingProfile', deleteProfile); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Retails/UsersAddress/UsersAdress.cy.js b/web/portal/brand/cypress/e2e/Clients/Retails/UsersAddress/UsersAdress.cy.js new file mode 100644 index 0000000000..5ae2bd073c --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Retails/UsersAddress/UsersAdress.cy.js @@ -0,0 +1,31 @@ +import UsersAddresses from '../../../../fixtures/Kam/UsersAddresses/getCollection.json'; +import { + addUserAddress, + deleteUserAddress, + editUserAddress, +} from '../../common/UserAddress.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('retail-client-users-addresses'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Retails').click(); + + cy.get('header').should('contain', 'Retails'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root') + .contains(/^Authorized sources$/) + .click(); + cy.get('header').should('contain', 'Authorized sources'); + + cy.get('table').should('contain', UsersAddresses.body[0].description); + }); + + it('add UsersAddress', addUserAddress); + + it('update UsersAddress', editUserAddress); + + it('delete UsersAddress', deleteUserAddress); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/BannedAddress/BannedAddress.cy.js b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/BannedAddress/BannedAddress.cy.js new file mode 100644 index 0000000000..96a3f51284 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/BannedAddress/BannedAddress.cy.js @@ -0,0 +1,26 @@ +import BannedAddresses from '../../../../fixtures/Provider/BannedAddress/getCollection.json'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('vpbx-client-banned-addresses'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Virtual PBXs').click(); + + cy.get('header').should('contain', 'Virtual PBXs'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Banned IP addresses').click(); + cy.get('header').should('contain', 'Banned IP addresses'); + + cy.get('table').should('contain', BannedAddresses.body[0].ip); + }); + + it('edit disabled', () => { + cy.get('[data-testid="EditIcon"]').should('not.be.enabled'); + }); + + it('delete disabled', () => { + cy.get('[data-testid="DeleteIcon"]').should('not.be.enabled'); + }); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/RatingProfile/RatingProfile.cy.js b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/RatingProfile/RatingProfile.cy.js new file mode 100644 index 0000000000..35c73783e6 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/RatingProfile/RatingProfile.cy.js @@ -0,0 +1,29 @@ +import RatingProfiles from '../../../../fixtures/Provider/RatingProfile/getCollection.json'; +import { + deleteProfile, + postProfile, + putProfile, +} from '../../common/RatingProfile.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('vpbx-client-rating-profiles'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Virtual PBXs').click(); + + cy.get('header').should('contain', 'Virtual PBXs'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Rating Profiles').click(); + cy.get('header').should('contain', 'Rating Profiles'); + + cy.get('table').should('contain', RatingProfiles.body[0].ratingPlanGroup); + }); + + it('add RatingProfile', postProfile); + + it('edit RatingProfile', putProfile); + + it('delete RatingProfile', deleteProfile); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/UsersAddress/UsersAdress.cy.js b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/UsersAddress/UsersAdress.cy.js new file mode 100644 index 0000000000..c5b867a0d8 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/VirtualPbxs/UsersAddress/UsersAdress.cy.js @@ -0,0 +1,31 @@ +import UsersAddresses from '../../../../fixtures/Kam/UsersAddresses/getCollection.json'; +import { + addUserAddress, + deleteUserAddress, + editUserAddress, +} from '../../common/UserAddress.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('vpbx-client-users-addresses'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Virtual PBXs').click(); + + cy.get('header').should('contain', 'Virtual PBXs'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root') + .contains(/^Authorized sources$/) + .click(); + cy.get('header').should('contain', 'Authorized sources'); + + cy.get('table').should('contain', UsersAddresses.body[0].description); + }); + + it('add UsersAddress', addUserAddress); + + it('edit UsersAddress', editUserAddress); + + it('delete UsersAddress', deleteUserAddress); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Wholesales/Administrator/Administrator.cy.js b/web/portal/brand/cypress/e2e/Clients/Wholesales/Administrator/Administrator.cy.js new file mode 100644 index 0000000000..24dd2407b6 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Wholesales/Administrator/Administrator.cy.js @@ -0,0 +1,47 @@ +import AdministratorCollection from '../../../../fixtures/Provider/Administrator/getCollection.json'; +import { + deleteAdministrator, + postAdministrator, + putActiveAdministratorEmptyPassword, + putAdministrator, +} from '../../../Administrator/Administrator.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('retail-client-administrator'); + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Retails').click(); + + cy.get('header').should('contain', 'Retails'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root') + .contains(/^Client's Administrators$/) + .click(); + cy.get('header').should('contain', "Client's Administrators"); + + cy.get('table').should('contain', AdministratorCollection.body[0].username); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Administrator', postAdministrator); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Administrator', putAdministrator); + + /////////////////////////////// + // PUT + /////////////////////////////// + it( + 'edit active Administrator with empty password', + putActiveAdministratorEmptyPassword + ); + /////////////////////// + // DELETE + /////////////////////// + it('delete Administrator', deleteAdministrator); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Wholesales/RatingProfile/RatingProfile.cy.js b/web/portal/brand/cypress/e2e/Clients/Wholesales/RatingProfile/RatingProfile.cy.js new file mode 100644 index 0000000000..35c73783e6 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Wholesales/RatingProfile/RatingProfile.cy.js @@ -0,0 +1,29 @@ +import RatingProfiles from '../../../../fixtures/Provider/RatingProfile/getCollection.json'; +import { + deleteProfile, + postProfile, + putProfile, +} from '../../common/RatingProfile.tests'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('vpbx-client-rating-profiles'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Virtual PBXs').click(); + + cy.get('header').should('contain', 'Virtual PBXs'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Rating Profiles').click(); + cy.get('header').should('contain', 'Rating Profiles'); + + cy.get('table').should('contain', RatingProfiles.body[0].ratingPlanGroup); + }); + + it('add RatingProfile', postProfile); + + it('edit RatingProfile', putProfile); + + it('delete RatingProfile', deleteProfile); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Wholesales/Trusted/Trusted.cy.js b/web/portal/brand/cypress/e2e/Clients/Wholesales/Trusted/Trusted.cy.js new file mode 100644 index 0000000000..33a2bdd015 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Wholesales/Trusted/Trusted.cy.js @@ -0,0 +1,103 @@ +import Trusteds from '../../../../fixtures/Kam/Trusted/getCollection.json'; +import TrustedItem from '../../../../fixtures/Kam/Trusted/getItem.json'; +import NewTrusted from '../../../../fixtures/Kam/Trusted/post.json'; +import EditTrusted from '../../../../fixtures/Kam/Trusted/put.json'; + +describe('in Administrator', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('wholesale-client-trusted'); + + cy.before(''); + cy.contains('Clients').click(); + cy.contains('Wholesales').click(); + + cy.get('header').should('contain', 'Wholesales'); + cy.get('td button svg[data-testid="MoreHorizIcon"]').eq(3).click(); + cy.get('li.MuiMenuItem-root').contains('Authorized Ip Addresses').click(); + cy.get('header').should('contain', 'Authorized Ip Addresses'); + + cy.get('table').should('contain', Trusteds.body[0].srcIp); + }); + + it('add Trusted', () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/trusteds*', + response: NewTrusted.response, + }, + 'postTrusteds' + ); + + cy.get('button').contains('Add').click(); + + cy.get('header').should('contain', 'New'); + + const { srcIp, description } = NewTrusted.body; + + cy.fillTheForm({ + srcIp, + description, + }); + + cy.usePactWait('postTrusteds').its('response.statusCode').should('eq', 201); + }); + + it('edit Trusted', () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/trusteds/1', + response: TrustedItem.response, + }, + 'getTrusteds-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: '**/api/brand/trusteds/1', + response: EditTrusted.response, + }, + 'putTrusteds-1' + ); + + cy.get('table [data-testid="EditIcon"]').click(); + + cy.usePactWait('getTrusteds-1') + .its('response.statusCode') + .should('eq', 200); + + const { srcIp, description } = EditTrusted.request; + cy.fillTheForm({ + srcIp: srcIp, + description: description, + }); + + cy.usePactWait(['putTrusteds-1']) + .its('response.statusCode') + .should('eq', 201); + }); + + it('delete Trusted', () => { + cy.usePactIntercept( + { + method: 'DELETE', + url: '**/api/brand/trusteds/1', + response: '200', + }, + 'deleteTrusted-1' + ); + + cy.get('table [data-testid="DeleteIcon"]').first().click(); + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click({ force: true }); + + cy.usePactWait('deleteTrusted-1') + .its('response.statusCode') + .should('eq', 200); + }); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.cy.js b/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.cy.js new file mode 100644 index 0000000000..fbcaf933c4 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.cy.js @@ -0,0 +1,28 @@ +import CompaniesCollection from '../../../fixtures/Provider/Companies/getCollection.json'; +import { postWebPortal } from '../Residential/Residentials.tests'; +import { deleteCompany, postCompany, putCompany } from './Wholesales.tests'; + +describe('in Wholesales Companies', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('wholesale'); + cy.before(); + + cy.get('svg[data-testid="MapsHomeWorkIcon"]').first().click(); + cy.contains('Wholesales').click(); + + cy.get('header').should('contain', 'Wholesales'); + + cy.get('table').should( + 'contain', + CompaniesCollection.body.find((element) => element.type === 'retail').id + ); + }); + + it('add Wholesale Companies', postCompany); + + it('edit Wholesale Companies', putCompany); + + it('delete Wholesale Companies', deleteCompany); + + it('post Web Portal', postWebPortal); +}); diff --git a/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.tests.js b/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.tests.js new file mode 100644 index 0000000000..da2d819723 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/Wholesales/Wholesales.tests.js @@ -0,0 +1,81 @@ +import CompaniesItem from '../../../fixtures/Provider/Companies/Wholesales/getItem.json'; +import newCompanies from '../../../fixtures/Provider/Companies/Wholesales/post.json'; +import editCompanies from '../../../fixtures/Provider/Companies/Wholesales/put.json'; +import { MODE, testPbx } from '../utils/PbxsValidator'; + +export const postCompany = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/companies*', + response: newCompanies.response, + matchingRules: newCompanies.matchingRules, + }, + 'createWholesaleCompanies' + ); + + cy.get('[aria-label=Add]').click(); + + testPbx({ ...newCompanies, mode: MODE.NEW }); + + cy.get('header').should('contain', 'Wholesales'); + + cy.usePactWait(['createWholesaleCompanies']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const putCompany = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/companies/5', + response: { ...CompaniesItem }, + }, + 'getWholesaleCompany-5' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/companies/${editCompanies.response.body.id}`, + response: editCompanies.response, + }, + 'editWholesaleCompanies' + ); + + cy.get('svg[data-testid="EditIcon"]').eq(4).click(); + + testPbx({ ...editCompanies, mode: MODE.EDIT }); + + cy.get('header').should('contain', 'Wholesales'); + + cy.usePactWait(['editWholesaleCompanies']) + .its('response.statusCode') + .should('eq', 200); +}; + +export const deleteCompany = () => { + cy.contains('Wholesales').click(); + + cy.get('td button svg[data-testid="MoreHorizIcon"]').first().click(); + cy.get('li.MuiMenuItem-root').contains('Delete').click(); + + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click({ force: true }); + + cy.get('header').should('contain', 'Wholesales'); +}; + +export const postWebPortal = () => { + cy.contains('Retails').click(); + + cy.get('td button svg[data-testid="MoreHorizIcon"]').first().click(); + cy.get('li.MuiMenuItem-root').contains('Administration Portals').click(); + cy.get('svg[data-testId="AddIcon"]').first().click(); + + cy.get('input[name="urlType"]').should('be.disabled'); +}; diff --git a/web/portal/brand/cypress/e2e/Clients/common/RatingProfile.tests.js b/web/portal/brand/cypress/e2e/Clients/common/RatingProfile.tests.js new file mode 100644 index 0000000000..d56b5f682a --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/common/RatingProfile.tests.js @@ -0,0 +1,73 @@ +import RatingProfiles from '../../../fixtures/Provider/RatingProfile/getCollection.json'; +import postItem from '../../../fixtures/Provider/RatingProfile/postItem.json'; +import updateItem from '../../../fixtures/Provider/RatingProfile/putItem.json'; + +export const postProfile = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/rating_profiles*', + response: postItem.response, + }, + 'postRatingProfile' + ); + + cy.contains('Add').click(); + cy.get('header').should('contain', 'New'); + + const { activationTime, ratingPlanGroup } = postItem.request; + const fixedActivationTime = activationTime.replace(' ', 'T'); + + cy.fillTheForm({ + activationTime: fixedActivationTime, + ratingPlanGroup: ratingPlanGroup, + }); + + cy.usePactWait('postRatingProfile') + .its('response.statusCode') + .should('eq', 201); +}; + +export const putProfile = () => { + const ratingProfile = RatingProfiles.body[0]; + cy.intercept('GET', '**/api/brand/rating_profiles/1', { + ...ratingProfile, + }).as('getRatingProfile-1'); + + cy.intercept('PUT', '**/api/brand/rating_profiles/1', { + ...updateItem.response, + }).as('putRatingProfile-1'); + + cy.get('table [data-testid="EditIcon"]').first().click(); + + const { activationTime, ratingPlanGroup } = updateItem.request; + const fixedActivationTime = activationTime.replace(' ', 'T'); + + cy.fillTheForm({ + activationTime: fixedActivationTime, + ratingPlanGroup: ratingPlanGroup, + }); + + cy.usePactWait('putRatingProfile-1') + .its('response.statusCode') + .should('eq', 200); +}; + +export const deleteProfile = () => { + cy.intercept('DELETE', '**/api/brand/rating_profiles/1', { + statusCode: 204, + }).as('deleteRatingProfile-1'); + + cy.get('table [data-testid="DeleteIcon"]').first().click(); + + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.usePactWait(['deleteRatingProfile-1']) + .its('response.statusCode') + .should('eq', 204); + + cy.get('header').should('contain', 'Rating Profiles'); +}; diff --git a/web/portal/brand/cypress/e2e/Clients/common/UserAddress.tests.js b/web/portal/brand/cypress/e2e/Clients/common/UserAddress.tests.js new file mode 100644 index 0000000000..7a8b5ead90 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Clients/common/UserAddress.tests.js @@ -0,0 +1,77 @@ +import UsersAddresses from '../../../fixtures/Kam/UsersAddresses/getCollection.json'; +import NewUsersAddress from '../../../fixtures/Kam/UsersAddresses/post.json'; +import EditUserAddress from '../../../fixtures/Kam/UsersAddresses/put.json'; + +export const addUserAddress = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/users_addresses*', + response: NewUsersAddress.response, + }, + 'postUsersAddress' + ); + + cy.contains('Add').click(); + cy.get('header').should('contain', 'New'); + + const data = NewUsersAddress.request; + delete data.company; + + cy.fillTheForm(data); + + cy.usePactWait(['postUsersAddress']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const editUserAddress = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/users_addresses/1', + response: UsersAddresses.body[0], + }, + 'getUsersAddress-1' + ); + cy.usePactIntercept( + { + method: 'PUT', + url: '**/api/brand/users_addresses/1', + response: EditUserAddress.response, + }, + 'putUsersAddress-1' + ); + cy.get('table [data-testid="EditIcon"]').first().click(); + + const { sourceAddress, description } = EditUserAddress.request; + cy.fillTheForm({ + sourceAddress: sourceAddress, + description: description, + }); + + cy.usePactWait('putUsersAddress-1') + .its('response.statusCode') + .should('eq', 204); +}; +export const deleteUserAddress = () => { + cy.usePactIntercept( + { + method: 'DELETE', + url: '**/api/brand/users_addresses/1', + response: '200', + }, + 'deleteUsersAddress-1' + ); + + cy.get('table [data-testid="DeleteIcon"]').first().click(); + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click({ force: true }); + + cy.usePactWait('deleteUsersAddress-1') + .its('response.statusCode') + .should('eq', 200); +}; diff --git a/web/portal/brand/cypress/e2e/Clients/utils/PbxsValidator.ts b/web/portal/brand/cypress/e2e/Clients/utils/PbxsValidator.ts index 43f893fa35..90d9d3aa2d 100644 --- a/web/portal/brand/cypress/e2e/Clients/utils/PbxsValidator.ts +++ b/web/portal/brand/cypress/e2e/Clients/utils/PbxsValidator.ts @@ -64,6 +64,9 @@ export const testPbx = (props: TestCompanyProps) => { case 'retail': _testRetailCompany(testCompanyProps); break; + case 'wholesale': + _testWholesaleCompany(testCompanyProps); + break; default: break; } @@ -233,6 +236,61 @@ const _testRetailCompany = (props: TestCompanyProps) => { cy.fillTheForm(form); }; +const _testWholesaleCompany = (props: TestCompanyProps) => { + const { + mode, + hasBillingFeature, + hasInvoicingFeature, + hasRecordingFeature, + removeFields, + request, + } = props; + const company = request; + + if (mode === MODE.NEW) { + removeFields.push( + ...[ + 'ipfilter', + 'featureIds', + 'codecIds', + 'onDemandRecord', + 'allowRecordingRemoval', + 'voicemailNotificationTemplate', + 'faxNotificationTemplate', + 'invoiceNotificationTemplate', + 'callCsvNotificationTemplate', + 'maxDailyUsageNotificationTemplate', + 'accessCredentialNotificationTemplate', + 'externallyextraopts', + 'showInvoices', + 'invoicing', + 'onDemandRecord', + 'onDemandRecordCode', + 'allowRecordingRemoval', + ] + ); + } + + if (!hasRecordingFeature) { + removeFields.push( + ...['onDemandRecord', 'onDemandRecordCode', 'allowRecordingRemoval'] + ); + } + + if (!hasInvoicingFeature) { + removeFields.push('invoicing', 'invoiceNotificationTemplate'); + } + + if (!hasBillingFeature) { + removeFields.push( + ...['externallyextraopts', 'maxDailyUsageNotificationTemplate'] + ); + } + + const form = _.omit(company, removeFields); + cy.fillTheForm(form); +}; + const _hasBillingFeature = (featureIds?: Array): boolean => { if (!featureIds) { return false; diff --git a/web/portal/brand/cypress/fixtures/Kam/Trusted/getCollection.json b/web/portal/brand/cypress/fixtures/Kam/Trusted/getCollection.json new file mode 100644 index 0000000000..42549bc3ea --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/Trusted/getCollection.json @@ -0,0 +1,17 @@ +{ + "body": [ + { + "srcIp": "194.30.6.32", + "description": null, + "id": 1 + } + ], + "headers": { + "x-first-page": "/api/brand/trusted?_page=1", + "x-last-page": "/api/brand/trusted?_page=1", + "x-next-page": "/api/brand/trusted?_page=1", + "x-total-items": "1", + "x-total-pages": "1" + }, + "statusCode": 200 +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/Trusted/getItem.json b/web/portal/brand/cypress/fixtures/Kam/Trusted/getItem.json new file mode 100644 index 0000000000..6471ef7675 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/Trusted/getItem.json @@ -0,0 +1,16 @@ +{ + "response": { + "body": { + "srcIp": "194.30.6.32", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": null, + "priority": 0, + "id": 1, + "company": "1" + }, + "statusCode": 200 + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/Trusted/post.json b/web/portal/brand/cypress/fixtures/Kam/Trusted/post.json new file mode 100644 index 0000000000..ec48996f4c --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/Trusted/post.json @@ -0,0 +1,29 @@ +{ + "body": { + "srcIp": "127.0.1.2", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "desc", + "priority": 0, + "company": 1 + }, + "response": { + "body": { + "srcIp": "127.0.1.2", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "desc", + "priority": 0, + "id": 2, + "company": 1 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 201 + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/Trusted/put.json b/web/portal/brand/cypress/fixtures/Kam/Trusted/put.json new file mode 100644 index 0000000000..25588303b8 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/Trusted/put.json @@ -0,0 +1,29 @@ +{ + "request": { + "srcIp": "194.30.6.88", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "new desc", + "priority": 1, + "company": 1 + }, + "response": { + "body": { + "srcIp": "127.0.1.2", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "desc", + "priority": 0, + "id": 2, + "company": 1 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 201 + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/getCollection.json b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/getCollection.json new file mode 100644 index 0000000000..9bf5959895 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/getCollection.json @@ -0,0 +1,13 @@ +{ + "body": [ + { + "sourceAddress": "127.0.0.1", + "description": "Irontec HQ", + "id": 1, + "company": 1 + } + ], + "headers": { + }, + "statusCode": 200 +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/post.json b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/post.json new file mode 100644 index 0000000000..e5508552ee --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/post.json @@ -0,0 +1,26 @@ +{ + "request": { + "sourceAddress": "127.0.0.8", + "description": "Test", + "company": 1 + }, + "response": { + "body": { + "username": "newUserName", + "pass": "*****", + "email": "modified@example.com", + "active": false, + "restricted": true, + "name": "Updated admin name", + "lastname": "a lastname", + "canImpersonate": true, + "id": 7, + "company": 1, + "timezone": 8 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 201 + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/put.json b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/put.json new file mode 100644 index 0000000000..93863acd74 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Kam/UsersAddresses/put.json @@ -0,0 +1,15 @@ +{ + "request": { + "sourceAddress": "127.0.0.7", + "description": "Updated Test", + "company": 1 + }, + "response": { + "body": { + "sourceAddress": "127.0.0.7", + "description": "Updated Test", + "company": 1 + }, + "statusCode": 204 + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/BannedAddress/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/BannedAddress/getCollection.json new file mode 100644 index 0000000000..d694dd1374 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/BannedAddress/getCollection.json @@ -0,0 +1,29 @@ +{ +"body": + [ + { + "ip": "8.8.8.8", + "blocker": "ipfilter", + "aor": "aor", + "lastTimeBanned": "2020-03-10 11:00:00", + "id": 2, + "company": 3 + }, + { + "ip": "8.8.8.9", + "blocker": "antibruteforce", + "aor": "aor", + "lastTimeBanned": "2020-03-10 11:00:00", + "id": 3, + "company": 3 + } + ], + "headers": { + "x-first-page": "/api/brand/banned_addresses?_page=1", + "x-last-page": "/api/brand/banned_addresses?_page=1", + "x-next-page": "/api/brand/banned_addresses?_page=1", + "x-total-items": "2", + "x-total-pages": "1" + }, + "statusCode": 200 +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/getItem.json b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/getItem.json new file mode 100644 index 0000000000..5b80152f3a --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/getItem.json @@ -0,0 +1,119 @@ +{ + "body": { + "type": "wholesale", + "name": "Wholesale Company", + "domainUsers": "wholesale.irontec.com", + "maxCalls": 0, + "maxDailyUsage": 1000000, + "currentDayUsage": 0, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": { + "iden": "es", + "id": 1, + "name": { + "en": "es", + "es": "es", + "ca": "es", + "it": "es" + } + }, + "defaultTimezone": { + "tz": "Europe/Madrid", + "comment": "mainland", + "id": 145, + "label": { + "en": "en", + "es": "es", + "ca": "ca", + "it": "it" + }, + "country": 68 + }, + "country": { + "code": "ES", + "countryCode": "+34", + "id": 68, + "name": { + "en": "Spain", + "es": "España", + "ca": "España", + "it": "Spagna" + }, + "zone": { + "en": "Europe", + "es": "Europa", + "ca": "Europa", + "it": "Europe" + } + }, + "currency": null, + "transformationRuleSet": { + "description": "Brand 1 transformation for Spain", + "internationalCode": "00", + "trunkPrefix": "", + "areaCode": "", + "nationalLen": 9, + "generateRules": false, + "id": 1, + "name": { + "en": "Brand 1 transformation for Spain", + "es": "Marca 1 tansformacion para España", + "ca": "Marca 1 tansformacion para España", + "it": "Brand 1 transformation for Spain" + }, + "country": 68, + "editable": true + }, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": { + "name": "Voicemail notification", + "type": "voicemail", + "id": 1 + }, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": { + "name": "BlueApSet", + "distributeMethod": "hash", + "description": "An Application Server Set", + "id": 1, + "applicationServers": null + }, + "mediaRelaySet": { + "name": "Default", + "description": "Default media relay set", + "id": 0 + }, + "domainName": null, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 200 +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/post.json b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/post.json new file mode 100644 index 0000000000..f427c63c45 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/post.json @@ -0,0 +1,104 @@ +{ + "request": { + "type": "wholesale", + "name": "Wholesale", + "maxCalls": 0, + "maxDailyUsage": 1000000, + "currentDayUsage": 0, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 2, + "defaultTimezone": 1, + "country": 3, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "response": { + "body": { + "type": "wholesale", + "name": "Wholesale", + "domainUsers": "wholesale.irontec.com", + "maxCalls": 0, + "maxDailyUsage": 1000000, + "currentDayUsage": 0, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 1, + "defaultTimezone": 145, + "country": 68, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 201 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/put.json b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/put.json new file mode 100644 index 0000000000..f7bfd6603b --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Companies/Wholesales/put.json @@ -0,0 +1,98 @@ +{ + "request": { + "type": "wholesale", + "name": "Renamed Wholesale", + "maxCalls": 2000, + "maxDailyUsage": 1000001, + "currentDayUsage": 153, + "maxDailyUsageEmail": null, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 2, + "defaultTimezone": 3, + "country": 1, + "currency": null, + "outgoingDdi": null, + "outgoingDdiRule": null, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "response": { + "body": { + "type": "wholesale", + "name": "Renamed Wholesale", + "domainUsers": "wholesale.irontec.com", + "maxCalls": 2000, + "maxDailyUsage": 1000001, + "currentDayUsage": 153, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 1, + "defaultTimezone": 145, + "country": 68, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 200 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/Companies/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/Companies/getCollection.json index bb7d8adc82..c892bf876d 100644 --- a/web/portal/brand/cypress/fixtures/Provider/Companies/getCollection.json +++ b/web/portal/brand/cypress/fixtures/Provider/Companies/getCollection.json @@ -99,6 +99,31 @@ 1 ], "codecIds": [] + }, + { + "type": "wholesale", + "name": "Wholesale Company", + "domainUsers": "wholesale.irontec.com", + "maxDailyUsage": 1000000, + "currentDayUsage": -1, + "billingMethod": "postpaid", + "balance": 0, + "id": 5, + "invoicing": { + "nif": "12345689-Z" + }, + "outgoingDdi": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "domainName": null, + "currencySymbol": "€", + "currentDayMaxUsage": "Unavailable", + "accountStatus": "Unavailable", + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] } ], "headers": { diff --git a/web/portal/brand/cypress/fixtures/Provider/RatingPlanGroup/getCollections.json b/web/portal/brand/cypress/fixtures/Provider/RatingPlanGroup/getCollections.json new file mode 100644 index 0000000000..8006b7e999 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RatingPlanGroup/getCollections.json @@ -0,0 +1,41 @@ +{ + "body": [ + { + "id": 1, + "name": { + "en": "Something", + "es": "Algo", + "ca": "Algo mes", + "it": "Più" + }, + "description": { + "en": "en", + "es": "es", + "ca": "ca", + "it": "it" + }, + "currency": 1 + }, + { + "id": 2, + "name": { + "en": "Something more", + "es": "Algo más", + "ca": "Algo mes", + "it": "Più" + }, + "description": { + "en": "en", + "es": "es", + "ca": "ca", + "it": "it" + }, + "currency": 1 + } + ], + "matchingRules": { + "$.body.id": { + "match": "true" + } + } +} diff --git a/web/portal/brand/cypress/fixtures/Provider/RatingProfile/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/getCollection.json new file mode 100644 index 0000000000..490459241d --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/getCollection.json @@ -0,0 +1,27 @@ +{ + "body": [ + { + "activationTime": "2018-02-02 21:20:20", + "id": 1, + "company": 1, + "carrier": 1, + "ratingPlanGroup": 1, + "routingTag": 1 + }, + { + "activationTime": "2018-02-02 21:20:20", + "id": 2, + "company": 1, + "carrier": null, + "ratingPlanGroup": 2, + "routingTag": 1 + } + ], + "headers": { + "x-first-page": "/api/brand/rating_profiles?_page=1", + "x-last-page": "/api/brand/rating_profiles?_page=1", + "x-next-page": "/api/brand/rating_profiles?_page=1", + "x-total-items": "2", + "x-total-pages": "1" + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/RatingProfile/postItem.json b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/postItem.json new file mode 100644 index 0000000000..063670a6a0 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/postItem.json @@ -0,0 +1,27 @@ +{ + "request": { + "activationTime": "2018-03-03 10:00:00", + "company": 1, + "carrier": null, + "ratingPlanGroup": 1 + }, + "response": { + "body": { + "activationTime": "2018-03-03 10:00:00", + "id": 3, + "company": 1, + "carrier": null, + "ratingPlanGroup": 1, + "routingTag": null + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 201 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } +} \ No newline at end of file diff --git a/web/portal/brand/cypress/fixtures/Provider/RatingProfile/putItem.json b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/putItem.json new file mode 100644 index 0000000000..eb4afd7f8a --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RatingProfile/putItem.json @@ -0,0 +1,23 @@ +{ + "request": { + "activationTime": "2018-03-03 20:30:30", + "id": 1, + "company": 3, + "carrier": null, + "ratingPlanGroup": 2 + }, + "response": { + "body": { + "activationTime": "2018-03-03 20:30:30", + "id": 1, + "company": 3, + "carrier": null, + "ratingPlanGroup": 2, + "routingTag": 1 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 200 + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-residential-client-rating-profiles-brand-consumer-residential-client-rating-profiles.json b/web/portal/brand/cypress/pacts/brand-provider-residential-client-rating-profiles-brand-consumer-residential-client-rating-profiles.json new file mode 100644 index 0000000000..49c785cdef --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-residential-client-rating-profiles-brand-consumer-residential-client-rating-profiles.json @@ -0,0 +1,106 @@ +{ + "consumer": { + "name": "brand-consumer-residential-client-rating-profiles" + }, + "provider": { + "name": "brand-provider-residential-client-rating-profiles" + }, + "interactions": [ + { + "description": "add RatingProfile", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/rating_profiles", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T10:00:00", + "company": 3, + "ratingPlanGroup": "1" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 10:00:00", + "id": 3, + "company": 1, + "carrier": null, + "ratingPlanGroup": 1, + "routingTag": null + } + } + }, + { + "description": "edit RatingProfile", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T20:30:30", + "company": 1, + "ratingPlanGroup": "2" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 20:30:30", + "id": 1, + "company": 3, + "carrier": null, + "ratingPlanGroup": 2, + "routingTag": 1 + } + } + }, + { + "description": "delete RatingProfile", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 204, + "headers": {}, + "body": "" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-residential-client-users-addresses-brand-consumer-residential-client-users-addresses.json b/web/portal/brand/cypress/pacts/brand-provider-residential-client-users-addresses-brand-consumer-residential-client-users-addresses.json new file mode 100644 index 0000000000..c9cc9bc87b --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-residential-client-users-addresses-brand-consumer-residential-client-users-addresses.json @@ -0,0 +1,77 @@ +{ + "consumer": { + "name": "brand-consumer-residential-client-users-addresses" + }, + "provider": { + "name": "brand-provider-residential-client-users-addresses" + }, + "interactions": [ + { + "description": "add UserAddress", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/users_addresses", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "62", + "content-type": "application/json" + }, + "body": { + "sourceAddress": "127.0.0.8", + "description": "Test", + "company": 3 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "username": "newUserName", + "pass": "*****", + "email": "modified@example.com", + "active": false, + "restricted": true, + "name": "Updated admin name", + "lastname": "a lastname", + "canImpersonate": true, + "id": 7, + "company": 1, + "timezone": 8 + } + } + }, + { + "description": "delete UserAddress", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/users_addresses/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 200, + "headers": {}, + "body": "200" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-retail-client-users-addresses-brand-consumer-retail-client-users-addresses.json b/web/portal/brand/cypress/pacts/brand-provider-retail-client-users-addresses-brand-consumer-retail-client-users-addresses.json new file mode 100644 index 0000000000..414ba2a1ad --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-retail-client-users-addresses-brand-consumer-retail-client-users-addresses.json @@ -0,0 +1,104 @@ +{ + "consumer": { + "name": "brand-consumer-retail-client-users-addresses" + }, + "provider": { + "name": "brand-provider-retail-client-users-addresses" + }, + "interactions": [ + { + "description": "add UsersAddress", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/users_addresses", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "62", + "content-type": "application/json" + }, + "body": { + "sourceAddress": "127.0.0.8", + "description": "Test", + "company": 3 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "username": "newUserName", + "pass": "*****", + "email": "modified@example.com", + "active": false, + "restricted": true, + "name": "Updated admin name", + "lastname": "a lastname", + "canImpersonate": true, + "id": 7, + "company": 1, + "timezone": 8 + } + } + }, + { + "description": "update UsersAddress", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/users_addresses/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "70", + "content-type": "application/json" + }, + "body": { + "sourceAddress": "127.0.0.7", + "description": "Updated Test", + "company": 1 + }, + "query": "" + }, + "response": { + "status": 204, + "headers": { + "content-type": "application/json" + }, + "body": "" + } + }, + { + "description": "delete UsersAddress", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/users_addresses/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 200, + "headers": {}, + "body": "200" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-retails-client-rating-profiles-brand-consumer-retails-client-rating-profiles.json b/web/portal/brand/cypress/pacts/brand-provider-retails-client-rating-profiles-brand-consumer-retails-client-rating-profiles.json new file mode 100644 index 0000000000..bdcf3fd126 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-retails-client-rating-profiles-brand-consumer-retails-client-rating-profiles.json @@ -0,0 +1,106 @@ +{ + "consumer": { + "name": "brand-consumer-retails-client-rating-profiles" + }, + "provider": { + "name": "brand-provider-retails-client-rating-profiles" + }, + "interactions": [ + { + "description": "add RatingProfile", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/rating_profiles", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T10:00:00", + "company": 3, + "ratingPlanGroup": "1" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 10:00:00", + "id": 3, + "company": 1, + "carrier": null, + "ratingPlanGroup": 1, + "routingTag": null + } + } + }, + { + "description": "edit RatingProfile", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T20:30:30", + "company": 1, + "ratingPlanGroup": "2" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 20:30:30", + "id": 1, + "company": 3, + "carrier": null, + "ratingPlanGroup": 2, + "routingTag": 1 + } + } + }, + { + "description": "delete RatingProfile", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 204, + "headers": {}, + "body": "" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-rating-profiles-brand-consumer-vpbx-client-rating-profiles.json b/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-rating-profiles-brand-consumer-vpbx-client-rating-profiles.json new file mode 100644 index 0000000000..3535e803ee --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-rating-profiles-brand-consumer-vpbx-client-rating-profiles.json @@ -0,0 +1,106 @@ +{ + "consumer": { + "name": "brand-consumer-vpbx-client-rating-profiles" + }, + "provider": { + "name": "brand-provider-vpbx-client-rating-profiles" + }, + "interactions": [ + { + "description": "add RatingProfile", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/rating_profiles", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T10:00:00", + "company": 3, + "ratingPlanGroup": "1" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 10:00:00", + "id": 3, + "company": 1, + "carrier": null, + "ratingPlanGroup": 1, + "routingTag": null + } + } + }, + { + "description": "edit RatingProfile", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "74", + "content-type": "application/json" + }, + "body": { + "activationTime": "2018-03-03T20:30:30", + "company": 1, + "ratingPlanGroup": "2" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "activationTime": "2018-03-03 20:30:30", + "id": 1, + "company": 3, + "carrier": null, + "ratingPlanGroup": 2, + "routingTag": 1 + } + } + }, + { + "description": "delete RatingProfile", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/rating_profiles/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 204, + "headers": {}, + "body": "" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-users-addresses-brand-consumer-vpbx-client-users-addresses.json b/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-users-addresses-brand-consumer-vpbx-client-users-addresses.json new file mode 100644 index 0000000000..de5828b5ba --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-vpbx-client-users-addresses-brand-consumer-vpbx-client-users-addresses.json @@ -0,0 +1,104 @@ +{ + "consumer": { + "name": "brand-consumer-vpbx-client-users-addresses" + }, + "provider": { + "name": "brand-provider-vpbx-client-users-addresses" + }, + "interactions": [ + { + "description": "add UsersAddress", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/users_addresses", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "62", + "content-type": "application/json" + }, + "body": { + "sourceAddress": "127.0.0.8", + "description": "Test", + "company": 3 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "username": "newUserName", + "pass": "*****", + "email": "modified@example.com", + "active": false, + "restricted": true, + "name": "Updated admin name", + "lastname": "a lastname", + "canImpersonate": true, + "id": 7, + "company": 1, + "timezone": 8 + } + } + }, + { + "description": "edit UsersAddress", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/users_addresses/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "70", + "content-type": "application/json" + }, + "body": { + "sourceAddress": "127.0.0.7", + "description": "Updated Test", + "company": 1 + }, + "query": "" + }, + "response": { + "status": 204, + "headers": { + "content-type": "application/json" + }, + "body": "" + } + }, + { + "description": "delete UsersAddress", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/users_addresses/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 200, + "headers": {}, + "body": "200" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-wholesale-brand-consumer-wholesale.json b/web/portal/brand/cypress/pacts/brand-provider-wholesale-brand-consumer-wholesale.json new file mode 100644 index 0000000000..741d4621a7 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-wholesale-brand-consumer-wholesale.json @@ -0,0 +1,207 @@ +{ + "consumer": { + "name": "brand-consumer-wholesale" + }, + "provider": { + "name": "brand-provider-wholesale" + }, + "interactions": [ + { + "description": "add Wholesale Companies", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/companies", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "297", + "content-type": "application/json" + }, + "body": { + "type": "wholesale", + "maxCalls": 0, + "maxDailyUsage": 1000000, + "billingMethod": "postpaid", + "language": 2, + "defaultTimezone": "1", + "country": 3, + "currency": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "routingTagIds": [], + "domainUsers": null, + "name": "Wholesale", + "maxDailyUsageEmail": "", + "transformationRuleSet": 1 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "type": "wholesale", + "name": "Wholesale", + "domainUsers": "wholesale.irontec.com", + "maxCalls": 0, + "maxDailyUsage": 1000000, + "currentDayUsage": 0, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 1, + "defaultTimezone": 145, + "country": 68, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Wholesale Companies", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/companies/5", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "630", + "content-type": "application/json" + }, + "body": { + "type": "wholesale", + "maxCalls": 2000, + "maxDailyUsage": 1000001, + "billingMethod": "postpaid", + "showInvoices": "0", + "language": 2, + "defaultTimezone": "3", + "country": 1, + "currency": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "routingTagIds": [], + "codecIds": [], + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "name": "Renamed Wholesale", + "domainUsers": null, + "maxDailyUsageEmail": "", + "externallyextraopts": "", + "transformationRuleSet": 1 + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "type": "wholesale", + "name": "Renamed Wholesale", + "domainUsers": "wholesale.irontec.com", + "maxCalls": 2000, + "maxDailyUsage": 1000001, + "currentDayUsage": 153, + "maxDailyUsageEmail": null, + "ipfilter": true, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": null, + "billingMethod": "postpaid", + "balance": 0, + "showInvoices": false, + "id": 5, + "invoicing": { + "nif": "12345689-Z", + "postalAddress": "", + "postalCode": "", + "town": "", + "province": "", + "countryName": "" + }, + "language": 1, + "defaultTimezone": 145, + "country": 68, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": null, + "accessCredentialNotificationTemplate": null, + "corporation": null, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + } + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/pacts/brand-provider-wholesale-client-trusted-brand-consumer-wholesale-client-trusted.json b/web/portal/brand/cypress/pacts/brand-provider-wholesale-client-trusted-brand-consumer-wholesale-client-trusted.json new file mode 100644 index 0000000000..9def96c5c7 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-wholesale-client-trusted-brand-consumer-wholesale-client-trusted.json @@ -0,0 +1,112 @@ +{ + "consumer": { + "name": "brand-consumer-wholesale-client-trusted" + }, + "provider": { + "name": "brand-provider-wholesale-client-trusted" + }, + "interactions": [ + { + "description": "add Trusted", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/trusteds", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "54", + "content-type": "application/json" + }, + "body": { + "srcIp": "127.0.1.2", + "description": "desc", + "company": 3 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "srcIp": "127.0.1.2", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "desc", + "priority": 0, + "id": 2, + "company": 1 + } + } + }, + { + "description": "edit Trusted", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/trusteds/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ", + "content-length": "62", + "content-type": "application/json" + }, + "body": { + "srcIp": "194.30.6.88", + "description": "new desc", + "company": "1" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "srcIp": "127.0.1.2", + "proto": "any", + "fromPattern": null, + "ruriPattern": null, + "tag": "1", + "description": "desc", + "priority": 0, + "id": 2, + "company": 1 + } + } + }, + { + "description": "delete Trusted", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/trusteds/1", + "headers": { + "accept": "application/json, text/plain, */*", + "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzU5ODA2MjAsImV4cCI6MTY3NTk4NDIyMCwicm9sZXMiOlsiUk9MRV9CUkFORF9BRE1JTiJdLCJ1c2VybmFtZSI6ImJyYW5kIn0.Sa-LdjAzOp2Q9d4__VyS9SA0z-caFuClUY7hVGxR0LqGjOwQdj7d-y3_3F381lRumS4FZbanE6KEWA8vdpE9mwdGN5yMXDqngyLuDzZaEUjrC2EHR_fujBpexJC3ZBn7_ew-gwRjsqcAmVfwo35LlzKGka0Df403cJGC-nIvAgfB8c74GgEowEe2wIPLO9rBMSA4f4a5BdNOhV-kH7bGtbnTguldYwR1kIT_touQjEPKVeA_iTes-7rfBeCmv3SLyv7nM0P2X78Xnf5cMQSxtWrkPSB4-siOOi6nrEdnGxmLxiqJ4w9RP0WRUEPAb5qzJMUodnZtAA2_yb38Rj1v-kzG_MXv9j3mkxBfKe1pMNIxml915D95_xquxDk05HKOkjz5cFdIuPxuOQBF3L6ExpRXrF_h1Hu8UIovn8EYxsRWnzxFMVrntroUWVAT3ZiSAA3pZqThAFyGDyZ1FZTgEqe3QHOUllHF1446WLj6LX9nG5zkWGfT1gQ-9INuZftUkfzZKH-E5lbN6VuLWCqsWuL6Nv8ErbH6EYxEQROLgjny1Rfl_nPyJD2xx_4iE-6C-Smzv6_uRGeKCTgTNxJtUkCiau6obRR8U1SRAxXvR-YL7MnnUCrtGFcGlUIcbVLU7Uklr-Qxctc6D_Hu_aeCdn4MvjR5LPGGq1NyM4VvhaQ" + }, + "body": "", + "query": "" + }, + "response": { + "status": 200, + "headers": {}, + "body": "200" + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +} diff --git a/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js b/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js index 8b644ba0c2..ef3af62fdd 100644 --- a/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js +++ b/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js @@ -1,10 +1,13 @@ import apiSpec from '../../fixtures/apiSpec.json'; +import TrustedCollection from '../../fixtures/Kam/Trusted/getCollection.json'; +import UsersAddressesCollection from '../../fixtures/Kam/UsersAddresses/getCollection.json'; import ActiveCallsItem from '../../fixtures/My/ActiveCalls/getActiveCalls.json'; import DashboardItem from '../../fixtures/My/Dashboard/getDashboard.json'; import ProfileItem from '../../fixtures/My/Profile/getProfile.json'; import ThemeItem from '../../fixtures/My/Theme/getTheme.json'; import AdministratorCollection from '../../fixtures/Provider/Administrator/getCollection.json'; import ApplicationServerSetsCollection from '../../fixtures/Provider/ApplicationServerSets/getCollection.json'; +import BannedAddressesCollection from '../../fixtures/Provider/BannedAddress/getCollection.json'; import BillableCallsCollection from '../../fixtures/Provider/BillableCalls/getCollection.json'; import CarriersCollection from '../../fixtures/Provider/Carriers/getCollection.json'; import CodecsCollection from '../../fixtures/Provider/Codecs/getCollection.json'; @@ -21,6 +24,8 @@ import NotificationTemplateContentsCollection from '../../fixtures/Provider/Noti import NotificationTemplatesCollection from '../../fixtures/Provider/NotificationTemplates/getCollection.json'; import OutgoingDdiRulesCollection from '../../fixtures/Provider/OutgoingDdiRules/getCollection.json'; import ProxyTrunksCollection from '../../fixtures/Provider/ProxyTrunks/getCollection.json'; +import RatingPlanGroupCollection from '../../fixtures/Provider/RatingPlanGroup/getCollections.json'; +import RatingProfilesCollection from '../../fixtures/Provider/RatingProfile/getCollection.json'; import RoutingTagsCollection from '../../fixtures/Provider/RoutingTags/getCollection.json'; import TimezonesCollection from '../../fixtures/Provider/Timezones/getCollection.json'; import TransformationRuleSetsCollection from '../../fixtures/Provider/TransformationRuleSets/getCollection.json'; @@ -156,5 +161,25 @@ Cypress.Commands.add( cy.intercept('GET', '**/api/brand/proxy_trunks?*', { ...ProxyTrunksCollection, }).as('getProxyTrunks'); + + cy.intercept('GET', '**/api/brand/users_addresses?*', { + ...UsersAddressesCollection, + }).as('getUserAddresses'); + + cy.intercept('GET', '**/api/brand/banned_address?*', { + ...BannedAddressesCollection, + }).as('getBannedAddresses'); + + cy.intercept('GET', '**/api/brand/rating_profiles?*', { + ...RatingProfilesCollection, + }).as('getRatingProfiles'); + + cy.intercept('GET', '**/api/brand/rating_plan_groups?*', { + ...RatingPlanGroupCollection, + }).as('getRatingPlanGroups'); + + cy.intercept('GET', '**/api/brand/trusteds?*', { + ...TrustedCollection, + }).as('getTrusteds'); } );