diff --git a/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.cy.js b/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.cy.js new file mode 100644 index 0000000000..036a3c99b3 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.cy.js @@ -0,0 +1,36 @@ +import CarrierServerCollection from '../../../../fixtures/Provider/CarrierServer/getCollection.json'; +import { + deleteCarrierServer, + postCarrierServer, + putCarrierServer, +} from './CarrierServer.tests'; + +describe('in Carrier Servers', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('Carriers-Carrier-Server'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('Carriers').click(); + cy.get('svg[data-testid="StorageIcon"]').first().click(); + + cy.get('header').should('contain', 'Carrier servers'); + + cy.get('table').should('contain', CarrierServerCollection.body[0].id); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Carrier Server', postCarrierServer); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Carrier Server', putCarrierServer); + + /////////////////////////////// + // DELETE + /////////////////////////////// + it('delete Carrier Server', deleteCarrierServer); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.tests.js b/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.tests.js new file mode 100644 index 0000000000..0612dbe761 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/Carriers/CarrierServer/CarrierServer.tests.js @@ -0,0 +1,86 @@ +import CarrierItem from '../../../../fixtures/Provider/Carriers/getItem.json'; +import CarrierServerItem from '../../../../fixtures/Provider/CarrierServer/getItem.json'; +import newCarrierServer from '../../../../fixtures/Provider/CarrierServer/post.json'; +import editCarriersServer from '../../../../fixtures/Provider/CarrierServer/put.json'; + +export const postCarrierServer = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/carrier_servers*', + response: newCarrierServer.response, + matchingRules: newCarrierServer.matchingRules, + }, + 'createCarrierServer' + ); + + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/carriers/1*', + response: { ...CarrierItem }, + }, + 'getCompanies-1' + ); + cy.get('[aria-label=Add]').click(); + const { authUser, outboundProxy, sipProxy } = newCarrierServer.request; + cy.fillTheForm({ + authUser, + outboundProxy, + sipProxy, + }); + cy.get('header li.MuiBreadcrumbs-li:last').should( + 'contain', + 'Carrier servers' + ); + + cy.usePactWait(['createCarrierServer']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const putCarrierServer = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/carrier_servers/1', + response: { ...CarrierServerItem }, + }, + 'getCarrier-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/carrier_servers/${editCarriersServer.response.body.id}`, + response: editCarriersServer.response, + }, + 'editCarriers' + ); + cy.get('svg[data-testid="EditIcon"]').eq(0).click(); + const { authUser, outboundProxy } = editCarriersServer.request; + cy.fillTheForm({ + authUser, + outboundProxy, + }); + cy.get('header').should('contain', 'Carriers'); + cy.usePactWait(['editCarriers']).its('response.statusCode').should('eq', 200); +}; + +export const deleteCarrierServer = () => { + cy.intercept('DELETE', '**/api/brand/carrier_servers/*', { + statusCode: 204, + }).as('deleteCarrierServer'); + cy.get('td button > svg[data-testid="DeleteIcon"]').first().click(); + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'Carrier servers'); + + cy.usePactWait(['deleteCarrierServer']) + .its('response.statusCode') + .should('eq', 204); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.cy.js b/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.cy.js new file mode 100644 index 0000000000..6f5eab8566 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.cy.js @@ -0,0 +1,26 @@ +import CarriersCollection from '../../../fixtures/Provider/Carriers/getCollection.json'; +import { postCarrier, putCarrier } from './Carriers.tests'; + +describe('in Carriers', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('Carriers'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('Carriers').click(); + + cy.get('header').should('contain', 'Carriers'); + + cy.get('table').should('contain', CarriersCollection.body[0].name); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Carrier', postCarrier); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Carrier', putCarrier); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.tests.js b/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.tests.js new file mode 100644 index 0000000000..4f96e10ae2 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/Carriers/Carriers.tests.js @@ -0,0 +1,57 @@ +import CarrierItem from '../../../fixtures/Provider/Carriers/getItem.json'; +import newCarrier from '../../../fixtures/Provider/Carriers/post.json'; +import editCarriers from '../../../fixtures/Provider/Carriers/put.json'; +import CompaniesItem from '../../../fixtures/Provider/Companies/VirtualPbxs/getItem.json'; + +export const postCarrier = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/carriers*', + response: newCarrier.response, + matchingRules: newCarrier.matchingRules, + }, + 'createDdi' + ); + + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/companies/1*', + response: { ...CompaniesItem }, + }, + 'getCompanies-1' + ); + cy.get('[aria-label=Add]').click(); + const { description, name, transformationRuleSet, mediaRelaySet } = + newCarrier.request; + cy.fillTheForm({ description, name, transformationRuleSet, mediaRelaySet }); + cy.get('header li.MuiBreadcrumbs-li:last').should('contain', 'Carriers'); + + cy.usePactWait(['createDdi']).its('response.statusCode').should('eq', 201); +}; + +export const putCarrier = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/carriers/1', + response: { ...CarrierItem }, + }, + 'getDdis-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/carriers/${editCarriers.response.body.id}`, + response: editCarriers.response, + }, + 'editCarriers' + ); + cy.get('svg[data-testid="EditIcon"]').eq(1).click(); + const { description, name, proxyTrunk, mediaRelaySet } = editCarriers.request; + cy.fillTheForm({ description, name, proxyTrunk, mediaRelaySet }); + cy.get('header').should('contain', 'Carriers'); + cy.usePactWait(['editCarriers']).its('response.statusCode').should('eq', 200); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/BillableCalls/BillableCalls.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/BillableCalls/BillableCalls.cy.js new file mode 100644 index 0000000000..519e0fea7b --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/BillableCalls/BillableCalls.cy.js @@ -0,0 +1,26 @@ +import BillableCallItem from '../../../../fixtures/Provider/BillableCalls/getItem.json'; +import DdiCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; + +describe('in BillableCalls', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('ddis-billable_calls'); + cy.before(''); + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDIs').click(); + cy.get('header').should('contain', 'DDIs'); + cy.get('table').should('contain', DdiCollection.body[0].ddie164); + }); + + it('View details', () => { + cy.intercept('GET', '**/api/brand/billable_calls/1*', { + ...BillableCallItem, + }).as('getBillableCall-1'); + + cy.get('svg[data-testid="ChatBubbleIcon"]').first().click(); + cy.get('svg[data-testid="PanoramaIcon"]').first().click(); + + cy.usePactWait(['getBillableCall-1']) + .its('response.statusCode') + .should('eq', 200); + }); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.cy.js new file mode 100644 index 0000000000..55bc878e71 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.cy.js @@ -0,0 +1,39 @@ +import DdisProvidersAddressesCollection from '../../../../fixtures/Provider/DdiProviders/getProviderAddressesCollection.json'; +import { + deleteDdiProviders, + postDdiProvidersAddresses, + putDdiProvidersAddresses, +} from './DDIProviderAddresses.tests'; + +describe('in Ddis Provider Addresses', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('DDIs-Providers-Addresses'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDI Providers').click(); + + cy.get('svg[data-testid="DnsIcon"]').first().click(); + cy.get('header').should('contain', 'DDI Providers'); + + cy.get('table').should( + 'contain', + DdisProvidersAddressesCollection.body[0].id + ); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Ddi Providers Addresses', postDdiProvidersAddresses); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Ddi Providers', putDdiProvidersAddresses); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Ddi Providers', deleteDdiProviders); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.tests.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.tests.js new file mode 100644 index 0000000000..e9d9e8d8ad --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderAddresses/DDIProviderAddresses.tests.js @@ -0,0 +1,74 @@ +import DdiProvidersAddressesItem from '../../../../fixtures/Provider/DdiProviders/getProviderAddressesItem.json'; +import newDdiProvidersAddresses from '../../../../fixtures/Provider/DdiProviders/postProviderAddresses.json'; +import editDdisProvidersAddresses from '../../../../fixtures/Provider/DdiProviders/putProviderAddresses.json'; + +export const postDdiProvidersAddresses = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/ddi_provider_addresses*', + response: newDdiProvidersAddresses.response, + matchingRules: newDdiProvidersAddresses.matchingRules, + }, + 'createDdiProvidersAddresses' + ); + + cy.get('[aria-label=Add]').click(); + cy.get('header').should('contain', 'DDI Provider Addresses'); + + const { ip, description } = newDdiProvidersAddresses.request; + cy.fillTheForm({ ip, description }); + + cy.usePactWait(['createDdiProvidersAddresses']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const putDdiProvidersAddresses = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/ddi_provider_addresses/1', + response: { ...DdiProvidersAddressesItem }, + }, + 'getDdisProvidersAddresses-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/ddi_provider_addresses/${editDdisProvidersAddresses.response.body.id}`, + response: editDdisProvidersAddresses.response, + }, + 'editDdisProvidersAddresses' + ); + + cy.get('svg[data-testid="EditIcon"]').click(); + + const { description, ip } = editDdisProvidersAddresses.request; + cy.fillTheForm({ description, ip }); + + cy.get('header').should('contain', 'DDI Provider Addresses'); + + cy.usePactWait(['editDdisProvidersAddresses']) + .its('response.statusCode') + .should('eq', 200); +}; + +export const deleteDdiProviders = () => { + cy.intercept('DELETE', '**/api/brand/ddi_provider_addresses/*', { + statusCode: 204, + }).as('deleteDdiProvidersAddresses'); + cy.get('td button > svg[data-testid="DeleteIcon"]').first().click(); + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'DDI Provider Addresses'); + + cy.usePactWait(['deleteDdiProvidersAddresses']) + .its('response.statusCode') + .should('eq', 204); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.cy.js new file mode 100644 index 0000000000..7d265e8e27 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.cy.js @@ -0,0 +1,42 @@ +import DdisProvidersRegistrationsCollection from '../../../../fixtures/Provider/DdiProviders/getProviderRegistrationsCollection.json'; +import { + deleteDdiProvidersRegistrations, + postDdiProvidersRegistrations, + putDdiProvidersRegistrations, +} from './DDIProviderRegistrations.tests'; + +describe('in Ddis Provider Registrations', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('DDIs-Providers-Registrations'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDI Providers').click(); + + cy.get('td button svg[data-testid="MoreHorizIcon"]').first().click(); + cy.get('li.MuiMenuItem-root') + .contains('DDI Provider Registrations') + .click(); + cy.get('header').should('contain', 'DDI Provider Registrations'); + + cy.get('table').should( + 'contain', + DdisProvidersRegistrationsCollection.body[0].username + ); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Ddi Providers Registrations', postDdiProvidersRegistrations); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Ddi Providers Registrations', putDdiProvidersRegistrations); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Ddi Providers Registrations', deleteDdiProvidersRegistrations); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.tests.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.tests.js new file mode 100644 index 0000000000..3ea5c98862 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DDIProviderRegistrations/DDIProviderRegistrations.tests.js @@ -0,0 +1,110 @@ +import DdiProvidersRegistrationsItem from '../../../../fixtures/Provider/DdiProviders/getProviderRegistrationsItem.json'; +import newDdiProvidersRegistrations from '../../../../fixtures/Provider/DdiProviders/postProviderRegistrations.json'; +import editDdisProvidersRegistrations from '../../../../fixtures/Provider/DdiProviders/putProviderRegistrations.json'; + +export const postDdiProvidersRegistrations = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/ddi_provider_registrations*', + response: newDdiProvidersRegistrations.response, + matchingRules: newDdiProvidersRegistrations.matchingRules, + }, + 'createDdiProvidersRegistrations' + ); + + cy.get('[aria-label=Add]').click(); + cy.get('header').should('contain', 'DDI Provider Registrations'); + + const { + username, + domain, + realm, + authUsername, + authPassword, + authProxy, + expires, + multiDdi, + } = newDdiProvidersRegistrations.request; + cy.fillTheForm({ + username, + domain, + realm, + authUsername, + authPassword, + authProxy, + expires, + multiDdi, + }); + + cy.usePactWait(['createDdiProvidersRegistrations']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const putDdiProvidersRegistrations = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/ddi_provider_registrations/1', + response: { ...DdiProvidersRegistrationsItem }, + }, + 'getDdisProvidersRegistrations-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/ddi_provider_registrations/${editDdisProvidersRegistrations.response.body.id}`, + response: editDdisProvidersRegistrations.response, + }, + 'editDdisProvidersRegistrations' + ); + + cy.get('svg[data-testid="EditIcon"]').click(); + + const { + username, + realm, + authUsername, + authPassword, + authProxy, + expires, + multiDdi, + } = editDdisProvidersRegistrations.request; + cy.fillTheForm({ + username, + realm, + authUsername, + authPassword, + authProxy, + expires, + multiDdi, + }); + + cy.get('header').should('contain', 'DDI Provider Registrations'); + + cy.usePactWait(['editDdisProvidersRegistrations']) + .its('response.statusCode') + .should('eq', 200); +}; + +export const deleteDdiProvidersRegistrations = () => { + cy.intercept('DELETE', '**/api/brand/ddi_provider_registrations/*', { + statusCode: 204, + }).as('deleteDdiProvidersRegistrations'); + + cy.get('td button svg[data-testid="DeleteIcon"]').first().click(); + + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'DDI Provider Registrations'); + + cy.usePactWait(['deleteDdiProvidersRegistrations']) + .its('response.statusCode') + .should('eq', 204); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.cy.js new file mode 100644 index 0000000000..6f67c94c35 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.cy.js @@ -0,0 +1,33 @@ +import DdisCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; +import { deleteDdi, postDdi, putDdi } from './Ddis.tests'; + +describe('in Ddi Providers DDIs', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('DDIs'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDI Providers').click(); + + cy.get('td button svg[data-testid="MoreHorizIcon"]').first().click(); + cy.get('li.MuiMenuItem-root').contains('DDIs').click(); + cy.get('header').should('contain', 'DDIs'); + + cy.get('table').should('contain', DdisCollection.body[0].id); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Ddi', postDdi); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Ddi', putDdi); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Ddi', deleteDdi); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.tests.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.tests.js new file mode 100644 index 0000000000..aec02cff4a --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/Ddis/Ddis.tests.js @@ -0,0 +1,91 @@ +import CompaniesItem from '../../../../fixtures/Provider/Companies/VirtualPbxs/getItem.json'; +import DdiItem from '../../../../fixtures/Provider/Ddis/getItem.json'; +import newDdi from '../../../../fixtures/Provider/Ddis/post.json'; +import editDdis from '../../../../fixtures/Provider/Ddis/put.json'; + +export const postDdi = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/ddis*', + response: newDdi.response, + matchingRules: newDdi.matchingRules, + }, + 'createDdi' + ); + + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/companies/1*', + response: { ...CompaniesItem }, + }, + 'getCompanies-1' + ); + + cy.get('[aria-label=Add]').click(); + + const { ddi, description, type, company, country } = newDdi.request; + cy.fillTheForm({ + ddi, + description, + type, + company, + country, + }); + + cy.get('header li.MuiBreadcrumbs-li:last').should('contain', 'DDIs'); + + cy.usePactWait(['createDdi']).its('response.statusCode').should('eq', 201); +}; + +export const putDdi = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/ddis/1', + response: { ...DdiItem }, + }, + 'getDdis-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/ddis/${editDdis.response.body.id}`, + response: editDdis.response, + }, + 'editDdis' + ); + + cy.get('svg[data-testid="EditIcon"]').eq(1).click(); + + const { ddi, description, type, country } = newDdi.request; + cy.fillTheForm({ + ddi, + description, + type, + country, + }); + + cy.get('header').should('contain', 'DDIs'); + + cy.usePactWait(['editDdis']).its('response.statusCode').should('eq', 200); +}; + +export const deleteDdi = () => { + cy.intercept('DELETE', '**/api/brand/ddis/*', { + statusCode: 204, + }).as('deleteDdi'); + + cy.get('td button svg[data-testid="DeleteIcon"]').first().click(); + cy.contains('Remove element'); + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header li.MuiBreadcrumbs-li:last').should('contain', 'DDIs'); + + cy.usePactWait(['deleteDdi']).its('response.statusCode').should('eq', 204); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.cy.js new file mode 100644 index 0000000000..5a28989fe6 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.cy.js @@ -0,0 +1,35 @@ +import DdisProvidersCollection from '../../../fixtures/Provider/DdiProviders/getCollection.json'; +import { + deleteDdiProviders, + postDdiProviders, + putDdiProviders, +} from './DdisProviders.tests'; + +describe('in Ddis Providers', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('DDIs-Providers'); + cy.before(); + + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDI Providers').click(); + + cy.get('header').should('contain', 'DDI Providers'); + + cy.get('table').should('contain', DdisProvidersCollection.body[0].id); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Ddi Providers', postDdiProviders); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit Ddi Providers', putDdiProviders); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Ddi Providers', deleteDdiProviders); +}); diff --git a/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.tests.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.tests.js new file mode 100644 index 0000000000..7753063dff --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.tests.js @@ -0,0 +1,87 @@ +import DdiProvidersItem from '../../../fixtures/Provider/DdiProviders/getItem.json'; +import newDdiProviders from '../../../fixtures/Provider/DdiProviders/post.json'; +import editDdisProviders from '../../../fixtures/Provider/DdiProviders/put.json'; +import ProxyTrunksItem from '../../../fixtures/Provider/ProxyTrunks/getItem.json'; + +export const postDdiProviders = () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/ddi_providers*', + response: newDdiProviders.response, + matchingRules: newDdiProviders.matchingRules, + }, + 'createDdiProviders' + ); + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/proxy_trunks/1*', + response: { ...ProxyTrunksItem }, + }, + 'getProxyTrunk-1' + ); + + cy.get('[aria-label=Add]').click(); + cy.get('header').should('contain', 'DDI Providers'); + + const { description, name, transformationRuleSet, mediaRelaySet } = + newDdiProviders.request; + cy.fillTheForm({ description, name, transformationRuleSet, mediaRelaySet }); + + cy.usePactWait(['createDdiProviders']) + .its('response.statusCode') + .should('eq', 201); +}; + +export const putDdiProviders = () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/ddi_providers/1', + response: { ...DdiProvidersItem }, + }, + 'getDdisProviders-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/ddi_providers/${editDdisProviders.response.body.id}`, + response: editDdisProviders.response, + }, + 'editDdisProviders' + ); + + cy.get('svg[data-testid="EditIcon"]').click(); + + const { description, name, mediaRelaySet } = editDdisProviders.request; + cy.fillTheForm({ description, name, mediaRelaySet }); + + cy.get('header').should('contain', 'DDI Providers'); + + cy.usePactWait(['editDdisProviders']) + .its('response.statusCode') + .should('eq', 200); +}; + +export const deleteDdiProviders = () => { + cy.intercept('DELETE', '**/api/brand/ddi_providers/*', { + statusCode: 204, + }).as('deleteDdiProviders'); + + 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(); + + cy.get('header').should('contain', 'DDI Providers'); + + cy.usePactWait(['deleteDdiProviders']) + .its('response.statusCode') + .should('eq', 204); +}; diff --git a/web/portal/brand/cypress/e2e/Providers/Ddis/BillableCalls/BillableCalls.cy.js b/web/portal/brand/cypress/e2e/Providers/Ddis/BillableCalls/BillableCalls.cy.js index 642c8e41dd..519e0fea7b 100644 --- a/web/portal/brand/cypress/e2e/Providers/Ddis/BillableCalls/BillableCalls.cy.js +++ b/web/portal/brand/cypress/e2e/Providers/Ddis/BillableCalls/BillableCalls.cy.js @@ -1,25 +1,26 @@ -import BillableCallsCollection from '../../../../fixtures/Provider/BillableCalls/getCollection.json'; -import DdisCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; +import BillableCallItem from '../../../../fixtures/Provider/BillableCalls/getItem.json'; +import DdiCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; describe('in BillableCalls', () => { beforeEach(() => { cy.prepareGenericPactInterceptors('ddis-billable_calls'); + cy.before(''); + cy.get('svg[data-testid="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDIs').click(); + cy.get('header').should('contain', 'DDIs'); + cy.get('table').should('contain', DdiCollection.body[0].ddie164); + }); - cy.intercept('GET', '**/api/brand/ddis/1', { - ...DdisCollection, - body: DdisCollection.body.find((row) => row.id === 3), - }).as('getDdis1'); - - cy.before('ddis'); - cy.get(`svg[data-testid="ChatBubbleIcon"]`).eq(1).click(); + it('View details', () => { + cy.intercept('GET', '**/api/brand/billable_calls/1*', { + ...BillableCallItem, + }).as('getBillableCall-1'); - cy.get('header li.MuiBreadcrumbs-li:last').should( - 'contain', - 'External calls' - ); - }); + cy.get('svg[data-testid="ChatBubbleIcon"]').first().click(); + cy.get('svg[data-testid="PanoramaIcon"]').first().click(); - it('contains Billable Calls', () => { - cy.get('table').should('contain', BillableCallsCollection.body[0].caller); + cy.usePactWait(['getBillableCall-1']) + .its('response.statusCode') + .should('eq', 200); }); }); diff --git a/web/portal/brand/cypress/e2e/WebPortals/WebPortals.tests.js b/web/portal/brand/cypress/e2e/WebPortals/WebPortals.tests.js index 5e86d24439..a1647ec2f7 100644 --- a/web/portal/brand/cypress/e2e/WebPortals/WebPortals.tests.js +++ b/web/portal/brand/cypress/e2e/WebPortals/WebPortals.tests.js @@ -59,7 +59,7 @@ export const deleteWebPortal = () => { statusCode: 204, }).as('deleteClients'); - const deleteIcon = cy.get('td svg[data-testid="DeleteIcon"]').first().click(); + cy.get('td svg[data-testid="DeleteIcon"]').first().click(); cy.contains('Remove element'); cy.get('div.MuiDialog-container button') .filter(':visible') diff --git a/web/portal/brand/cypress/fixtures/Provider/BillableCalls/getItem.json b/web/portal/brand/cypress/fixtures/Provider/BillableCalls/getItem.json new file mode 100644 index 0000000000..c17a6c8fdc --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/BillableCalls/getItem.json @@ -0,0 +1,30 @@ +{ + "body": { + "callid": "017cc7c8-eb38-4bbd-9318-524a274f7000", + "startTime": "2019-01-01 09:00:00", + "duration": 0, + "caller": "+34633646464", + "callee": "+34633656565", + "cost": null, + "price": 1, + "carrierName": null, + "destinationName": null, + "ratingPlanName": null, + "endpointType": null, + "endpointId": null, + "endpointName": null, + "direction": "outbound", + "id": 1, + "company": "~", + "carrier": "~", + "destination": null, + "ratingPlanGroup": null, + "invoice": "~", + "ddi": "~", + "ddiProvider": "~" +}, + "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/CarrierServer/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/getCollection.json new file mode 100644 index 0000000000..3378ed2766 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/getCollection.json @@ -0,0 +1,35 @@ +{ + "body": [ + { + "ip": null, + "hostname": "127.0.0.1", + "authNeeded": "no", + "sipProxy": "127.0.0.1", + "outboundProxy": null, + "id": 1, + "status": { + "registered": false + } + }, + { + "ip": null, + "hostname": "127.0.0.2", + "authNeeded": "no", + "sipProxy": "127.0.0.2", + "outboundProxy": null, + "id": 2, + "status": { + "registered": false + } + + } + ], + "headers": { + "x-first-page": "/api/brand/carrier_servers?_page=1", + "x-last-page": "/api/brand/carrier_servers?_page=1", + "x-next-page": "/api/brand/carrier_servers?_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/Provider/CarrierServer/getItem.json b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/getItem.json new file mode 100644 index 0000000000..2682cf6b07 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/getItem.json @@ -0,0 +1,29 @@ +{ + "body": { + "ip": null, + "hostname": "127.0.0.1", + "port": 5060, + "uriScheme": 1, + "transport": 1, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.1", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "id": 1, + "carrier": { + "description": "CarrierDescription", + "name": "CarrierName", + "id": 1, + "transformationRuleSet": 1 + } + }, + "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/CarrierServer/post.json b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/post.json new file mode 100644 index 0000000000..8ecbecc871 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/post.json @@ -0,0 +1,48 @@ +{ + "request": { + "ip": "127.0.0.2", + "hostname": "newhost.net", + "port": 5060, + "uriScheme": 2, + "transport": 1, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.3", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "carrier": 1 + }, + "response": { + "body": { + "ip": null, + "hostname": "127.0.0.3", + "port": 5060, + "uriScheme": 2, + "transport": 1, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.3", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "id": 3, + "carrier": 1 + }, + "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/CarrierServer/put.json b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/put.json new file mode 100644 index 0000000000..8f7cad96e3 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/CarrierServer/put.json @@ -0,0 +1,48 @@ +{ + "request": { + "ip": "127.1.0.1", + "hostname": "hostname.net", + "port": 5060, + "uriScheme": 2, + "transport": 2, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.1", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "carrier": 1 + }, + "response": { + "body": { + "ip": null, + "hostname": "127.0.0.1", + "port": 5060, + "uriScheme": 2, + "transport": 2, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.1", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "id": 1, + "carrier": 1 + }, + "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/Carriers/getItem.json b/web/portal/brand/cypress/fixtures/Provider/Carriers/getItem.json new file mode 100644 index 0000000000..b65a2cc250 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Carriers/getItem.json @@ -0,0 +1,29 @@ +{ + "body": { + "description": "CarrierDescription", + "name": "CarrierName", + "calculateCost": true, + "id": 1, + "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 + } + }, + "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/Carriers/post.json b/web/portal/brand/cypress/fixtures/Provider/Carriers/post.json new file mode 100644 index 0000000000..7775ccdad2 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Carriers/post.json @@ -0,0 +1,32 @@ +{ + "request": { + "description": "Artemis-New", + "name": "Artemis-New", + "proxyTrunk": 1, + "transformationRuleSet": 1, + "mediaRelaySet": 0 + }, + "response": { + "body": { + "description": "Artemis-New", + "name": "Artemis-New", + "balance": 0, + "calculateCost": false, + "id": 3, + "transformationRuleSet": 1, + "currency": null, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "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/Carriers/put.json b/web/portal/brand/cypress/fixtures/Provider/Carriers/put.json new file mode 100644 index 0000000000..00d60c14fb --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Carriers/put.json @@ -0,0 +1,32 @@ +{ + "request": { + "description": "Artemis-Updated", + "name": "Artemis-Updated", + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySet": 0 + }, + "response": { + "body": { + "description": "Artemis-Updated", + "name": "Artemis-Updated", + "balance": 0, + "calculateCost": true, + "id": 1, + "transformationRuleSet": 1, + "currency": null, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "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/DdiProviders/getItem.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getItem.json new file mode 100644 index 0000000000..1fdc7f9d3e --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getItem.json @@ -0,0 +1,28 @@ +{ + "body": { + "description": "DDIProviderDescription", + "name": "DDIProviderName", + "id": 1, + "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 + } + }, + "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/DdiProviders/getProviderAddressesCollection.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderAddressesCollection.json new file mode 100644 index 0000000000..99c1236f54 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderAddressesCollection.json @@ -0,0 +1,17 @@ +{ + "body": [ + { + "ip": "127.0.0.1", + "description": "DDI Provider Address 1", + "id": 1 + } + ], + "headers": { + "x-first-page": "/api/brand/ddi_provider_addresses?_page=1", + "x-last-page": "/api/brand/ddi_provider_addresses?_page=1", + "x-next-page": "/api/brand/ddi_provider_addresses?_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/Provider/DdiProviders/getProviderAddressesItem.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderAddressesItem.json new file mode 100644 index 0000000000..0ac68b6a7d --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderAddressesItem.json @@ -0,0 +1,17 @@ +{ + "body": { + "ip": "127.0.0.1", + "description": "DDI Provider Address 1", + "id": 1, + "ddiProvider": { + "description": "DDIProviderDescription", + "name": "DDIProviderName", + "id": 1, + "transformationRuleSet": 1 + } + }, + "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/DdiProviders/getProviderRegistrationsCollection.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderRegistrationsCollection.json new file mode 100644 index 0000000000..9b1825e02d --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderRegistrationsCollection.json @@ -0,0 +1,22 @@ +{ + "body": [ + { + "username": "DDIRegistrationUsername", + "domain": "DDIRegistrationDomain", + "id": 1, + "status": { + "registered": false, + "inProgress": false, + "expires": null + } + } + ], + "headers": { + "x-first-page": "/api/brand/ddi_provider_registrations?_page=1", + "x-last-page": "/api/brand/ddi_provider_registrations?_page=1", + "x-next-page": "/api/brand/ddi_provider_registrations?_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/Provider/DdiProviders/getProviderRegistrationsItem.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderRegistrationsItem.json new file mode 100644 index 0000000000..8333faabbc --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/getProviderRegistrationsItem.json @@ -0,0 +1,24 @@ +{ + "body": { + "username": "DDIRegistrationUsername", + "domain": "DDIRegistrationDomain", + "realm": "DDIRegistrationRealm", + "authUsername": "DDIRegistrationAuthUsername", + "authPassword": "DDIRegistrationAuthPassword", + "authProxy": "sip:DDIRegistrationAuthProxy", + "expires": 2000, + "multiDdi": false, + "contactUsername": "DDIRegistrationContactUsername", + "id": 1, + "ddiProvider": { + "description": "DDIProviderDescription", + "name": "DDIProviderName", + "id": 1, + "transformationRuleSet": 1 + } + }, + "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/DdiProviders/post.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/post.json new file mode 100644 index 0000000000..9963702ce1 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/post.json @@ -0,0 +1,29 @@ +{ + "request": { + "description": "NewDDIProviderDescription", + "name": "NewDDIProviderName", + "proxyTrunk": 1, + "transformationRuleSet": 1, + "mediaRelaySet": 0 + }, + "response": { + "body": { + "description": "NewDDIProviderDescription", + "name": "NewDDIProviderName", + "id": 2, + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "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/DdiProviders/postProviderAddresses.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/postProviderAddresses.json new file mode 100644 index 0000000000..ca04e28308 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/postProviderAddresses.json @@ -0,0 +1,24 @@ +{ + "request": { + "ip": "1.1.1.1", + "description": "NewDDIProviderAddress", + "ddiProvider": 1 + }, + "response": { + "body": { + "ip": "1.1.1.1", + "description": "NewDDIProviderAddress", + "id": 2, + "ddiProvider": 1 + }, + "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/DdiProviders/postProviderRegistrations.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/postProviderRegistrations.json new file mode 100644 index 0000000000..ffd7ab1fe4 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/postProviderRegistrations.json @@ -0,0 +1,38 @@ +{ + "request": { + "username": "NewDDIRegistrationUsername", + "domain": "NewDDIRegistrationDomain", + "realm": "NewDDIRegistrationRealm", + "authUsername": "NewDDIRegistrationAuthUsername", + "authPassword": "NewDDIRegistrationAuthPassword", + "authProxy": "sip:NewDDIRegistrationAuthProxy", + "expires": 3600, + "multiDdi": true, + "contactUsername": "", + "ddiProvider": 1 + }, + "response": { + "body": { + "username": "NewDDIRegistrationUsername", + "domain": "NewDDIRegistrationDomain", + "realm": "NewDDIRegistrationRealm", + "authUsername": "NewDDIRegistrationAuthUsername", + "authPassword": "NewDDIRegistrationAuthPassword", + "authProxy": "sip:NewDDIRegistrationAuthProxy", + "expires": 3600, + "multiDdi": true, + "contactUsername": "", + "id": 2, + "ddiProvider": 1 + }, + "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/DdiProviders/put.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/put.json new file mode 100644 index 0000000000..9f3538aeb4 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/put.json @@ -0,0 +1,29 @@ +{ + "request": { + "description": "UpdateDDIProviderDescription", + "name": "UpdateDDIProviderName", + "proxyTrunk": 1, + "transformationRuleSet": 1, + "mediaRelaySet": 0 + }, + "response": { + "body": { + "description": "UpdateDDIProviderDescription", + "name": "UpdateDDIProviderName", + "id": 1, + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "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/DdiProviders/putProviderAddresses.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/putProviderAddresses.json new file mode 100644 index 0000000000..4b9fa69f33 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/putProviderAddresses.json @@ -0,0 +1,24 @@ +{ + "request": { + "ip": "2.2.2.2", + "description": "UpdatedDDIProviderAddress", + "ddiProvider": 1 + }, + "response": { + "body": { + "ip": "2.2.2.2", + "description": "UpdatedDDIProviderAddress", + "id": 1, + "ddiProvider": 1 + }, + "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/DdiProviders/putProviderRegistrations.json b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/putProviderRegistrations.json new file mode 100644 index 0000000000..c551bf144d --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/putProviderRegistrations.json @@ -0,0 +1,38 @@ +{ + "request": { + "username": "UpdatedDDIRegistrationUsername", + "domain": "UpdatedDDIRegistrationDomain", + "realm": "UpdatedDDIRegistrationRealm", + "authUsername": "UpdatedDDIRegistrationAuthUsername", + "authPassword": "UpdatedDDIRegistrationAuthPassword", + "authProxy": "sip:UpdatedDDIRegistrationAuthProxy", + "expires": 36005, + "multiDdi": true, + "contactUsername": "", + "ddiProvider": 1 + }, + "response": { + "body": { + "username": "UpdatedDDIRegistrationUsername", + "domain": "UpdatedDDIRegistrationDomain", + "realm": "UpdatedDDIRegistrationRealm", + "authUsername": "UpdatedDDIRegistrationAuthUsername", + "authPassword": "UpdatedDDIRegistrationAuthPassword", + "authProxy": "sip:UpdatedDDIRegistrationAuthProxy", + "expires": 36005, + "multiDdi": true, + "contactUsername": "", + "id": 1, + "ddiProvider": 1 + }, + "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/ProxyTrunks/getItem.json b/web/portal/brand/cypress/fixtures/Provider/ProxyTrunks/getItem.json new file mode 100644 index 0000000000..01f2cfc596 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ProxyTrunks/getItem.json @@ -0,0 +1,12 @@ +{ + "body": { + "name": "proxytrunks", + "ip": "10.60.205.115", + "advertisedIp": null, + "id": 1 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 200 +} \ No newline at end of file diff --git a/web/portal/brand/cypress/pacts/brand-provider-Carriers-Carrier-Server-brand-consumer-Carriers-Carrier-Server.json b/web/portal/brand/cypress/pacts/brand-provider-Carriers-Carrier-Server-brand-consumer-Carriers-Carrier-Server.json new file mode 100644 index 0000000000..a8cbeb891d --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-Carriers-Carrier-Server-brand-consumer-Carriers-Carrier-Server.json @@ -0,0 +1,145 @@ +{ + "consumer": { + "name": "brand-consumer-Carriers-Carrier-Server" + }, + "provider": { + "name": "brand-provider-Carriers-Carrier-Server" + }, + "interactions": [ + { + "description": "add Carrier Server", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/carrier_servers", + "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": "163", + "content-type": "application/json" + }, + "body": { + "uriScheme": 1, + "transport": 1, + "sendPAI": true, + "sendRPID": false, + "authNeeded": "no", + "sipProxy": "127.0.0.3", + "outboundProxy": "", + "fromUser": "", + "fromDomain": "", + "carrier": 2 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "ip": null, + "hostname": "127.0.0.3", + "port": 5060, + "uriScheme": 2, + "transport": 1, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.3", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "id": 3, + "carrier": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Carrier Server", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/carrier_servers/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": "164", + "content-type": "application/json" + }, + "body": { + "uriScheme": 1, + "transport": 1, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "sipProxy": "127.0.0.1", + "outboundProxy": "", + "fromUser": "", + "fromDomain": "", + "carrier": 1 + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "ip": null, + "hostname": "127.0.0.1", + "port": 5060, + "uriScheme": 2, + "transport": 2, + "sendPAI": false, + "sendRPID": false, + "authNeeded": "no", + "authUser": null, + "authPassword": "*****", + "sipProxy": "127.0.0.1", + "outboundProxy": null, + "fromUser": "", + "fromDomain": "", + "id": 1, + "carrier": 1 + } + } + }, + { + "description": "delete Carrier Server", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/carrier_servers/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-Carriers-brand-consumer-Carriers.json b/web/portal/brand/cypress/pacts/brand-provider-Carriers-brand-consumer-Carriers.json new file mode 100644 index 0000000000..927118cb12 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-Carriers-brand-consumer-Carriers.json @@ -0,0 +1,107 @@ +{ + "consumer": { + "name": "brand-consumer-Carriers" + }, + "provider": { + "name": "brand-provider-Carriers" + }, + "interactions": [ + { + "description": "add Carrier", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/carriers", + "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": "131", + "content-type": "application/json" + }, + "body": { + "description": "Artemis-New", + "calculateCost": false, + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySet": 0, + "name": "Artemis-New" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "description": "Artemis-New", + "name": "Artemis-New", + "balance": 0, + "calculateCost": false, + "id": 3, + "transformationRuleSet": 1, + "currency": null, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Carrier", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/carriers/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": "154", + "content-type": "application/json" + }, + "body": { + "description": "Artemis-Updated", + "calculateCost": true, + "transformationRuleSet": 1, + "currency": null, + "proxyTrunk": 1, + "mediaRelaySet": 0, + "name": "Artemis-Updated" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "description": "Artemis-Updated", + "name": "Artemis-Updated", + "balance": 0, + "calculateCost": true, + "id": 1, + "transformationRuleSet": 1, + "currency": null, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + } + } + } + ], + "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-DDIs-Providers-Addresses-brand-consumer-DDIs-Providers-Addresses.json b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-Addresses-brand-consumer-DDIs-Providers-Addresses.json new file mode 100644 index 0000000000..7341f7aacd --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-Addresses-brand-consumer-DDIs-Providers-Addresses.json @@ -0,0 +1,107 @@ +{ + "consumer": { + "name": "brand-consumer-DDIs-Providers-Addresses" + }, + "provider": { + "name": "brand-provider-DDIs-Providers-Addresses" + }, + "interactions": [ + { + "description": "add Ddi Providers Addresses", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/ddi_provider_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": "70", + "content-type": "application/json" + }, + "body": { + "ip": "1.1.1.1", + "description": "NewDDIProviderAddress", + "ddiProvider": 1 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "ip": "1.1.1.1", + "description": "NewDDIProviderAddress", + "id": 2, + "ddiProvider": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Ddi Providers", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/ddi_provider_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": "74", + "content-type": "application/json" + }, + "body": { + "ip": "2.2.2.2", + "description": "UpdatedDDIProviderAddress", + "ddiProvider": 1 + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "ip": "2.2.2.2", + "description": "UpdatedDDIProviderAddress", + "id": 1, + "ddiProvider": 1 + } + } + }, + { + "description": "delete Ddi Providers", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/ddi_provider_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": 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-DDIs-Providers-Registrations-brand-consumer-DDIs-Providers-Registrations.json b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-Registrations-brand-consumer-DDIs-Providers-Registrations.json new file mode 100644 index 0000000000..07ad4bed31 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-Registrations-brand-consumer-DDIs-Providers-Registrations.json @@ -0,0 +1,133 @@ +{ + "consumer": { + "name": "brand-consumer-DDIs-Providers-Registrations" + }, + "provider": { + "name": "brand-provider-DDIs-Providers-Registrations" + }, + "interactions": [ + { + "description": "add Ddi Providers Registrations", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/ddi_provider_registrations", + "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": "299", + "content-type": "application/json" + }, + "body": { + "username": "NewDDIRegistrationUsername", + "domain": "NewDDIRegistrationDomain", + "realm": "NewDDIRegistrationRealm", + "authUsername": "NewDDIRegistrationAuthUsername", + "authPassword": "NewDDIRegistrationAuthPassword", + "authProxy": "sip:NewDDIRegistrationAuthProxy", + "expires": 3600, + "multiDdi": "1", + "ddiProvider": 1 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "username": "NewDDIRegistrationUsername", + "domain": "NewDDIRegistrationDomain", + "realm": "NewDDIRegistrationRealm", + "authUsername": "NewDDIRegistrationAuthUsername", + "authPassword": "NewDDIRegistrationAuthPassword", + "authProxy": "sip:NewDDIRegistrationAuthProxy", + "expires": 3600, + "multiDdi": true, + "contactUsername": "", + "id": 2, + "ddiProvider": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Ddi Providers Registrations", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/ddi_provider_registrations/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": "317", + "content-type": "application/json" + }, + "body": { + "username": "UpdatedDDIRegistrationUsername", + "domain": "DDIRegistrationDomain", + "realm": "UpdatedDDIRegistrationRealm", + "authUsername": "UpdatedDDIRegistrationAuthUsername", + "authPassword": "UpdatedDDIRegistrationAuthPassword", + "authProxy": "sip:UpdatedDDIRegistrationAuthProxy", + "expires": 36005, + "multiDdi": "1", + "ddiProvider": 1 + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "username": "UpdatedDDIRegistrationUsername", + "domain": "UpdatedDDIRegistrationDomain", + "realm": "UpdatedDDIRegistrationRealm", + "authUsername": "UpdatedDDIRegistrationAuthUsername", + "authPassword": "UpdatedDDIRegistrationAuthPassword", + "authProxy": "sip:UpdatedDDIRegistrationAuthProxy", + "expires": 36005, + "multiDdi": true, + "contactUsername": "", + "id": 1, + "ddiProvider": 1 + } + } + }, + { + "description": "delete Ddi Providers Registrations", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/ddi_provider_registrations/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-DDIs-Providers-brand-consumer-DDIs-Providers.json b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-brand-consumer-DDIs-Providers.json new file mode 100644 index 0000000000..92e433dcef --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-DDIs-Providers-brand-consumer-DDIs-Providers.json @@ -0,0 +1,117 @@ +{ + "consumer": { + "name": "brand-consumer-DDIs-Providers" + }, + "provider": { + "name": "brand-provider-DDIs-Providers" + }, + "interactions": [ + { + "description": "add Ddi Providers", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/ddi_providers", + "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": "130", + "content-type": "application/json" + }, + "body": { + "description": "NewDDIProviderDescription", + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySet": 0, + "name": "NewDDIProviderName" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "description": "NewDDIProviderDescription", + "name": "NewDDIProviderName", + "id": 2, + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit Ddi Providers", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/ddi_providers/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": "139", + "content-type": "application/json" + }, + "body": { + "description": "UpdateDDIProviderDescription", + "transformationRuleSet": 1, + "proxyTrunk": null, + "mediaRelaySet": 0, + "name": "UpdateDDIProviderName" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "description": "UpdateDDIProviderDescription", + "name": "UpdateDDIProviderName", + "id": 1, + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySets": null, + "mediaRelaySet": 0 + } + } + }, + { + "description": "delete Ddi Providers", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/ddi_providers/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-DDIs-brand-consumer-DDIs.json b/web/portal/brand/cypress/pacts/brand-provider-DDIs-brand-consumer-DDIs.json index fc3a877625..85a1ac328f 100644 --- a/web/portal/brand/cypress/pacts/brand-provider-DDIs-brand-consumer-DDIs.json +++ b/web/portal/brand/cypress/pacts/brand-provider-DDIs-brand-consumer-DDIs.json @@ -59,16 +59,16 @@ "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": "108", + "content-length": "104", "content-type": "application/json" }, "body": { "type": "inout", - "ddi": "128", - "description": "Description for DDI 123", + "ddi": "321", + "description": "Description for 321", "company": 1, "ddiProvider": 1, - "country": 1 + "country": 8 }, "query": "" }, diff --git a/web/portal/brand/cypress/pacts/brand-provider-ddis-billable_calls-brand-consumer-ddis-billable_calls.json b/web/portal/brand/cypress/pacts/brand-provider-ddis-billable_calls-brand-consumer-ddis-billable_calls.json new file mode 100644 index 0000000000..85a1250e45 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-ddis-billable_calls-brand-consumer-ddis-billable_calls.json @@ -0,0 +1,63 @@ +{ + "consumer": { + "name": "brand-consumer-ddis-billable_calls" + }, + "provider": { + "name": "brand-provider-ddis-billable_calls" + }, + "interactions": [ + { + "description": "View details", + "providerState": "", + "request": { + "method": "GET", + "path": "/api/brand/billable_calls/105", + "headers": { + "accept": "application/json", + "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": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "callid": "017cc7c8-eb38-4bbd-9318-524a274f7000", + "startTime": "2019-01-01 09:00:00", + "duration": 0, + "caller": "+34633646464", + "callee": "+34633656565", + "cost": null, + "price": 1, + "carrierName": null, + "destinationName": null, + "ratingPlanName": null, + "endpointType": null, + "endpointId": null, + "endpointName": null, + "direction": "outbound", + "id": 1, + "company": "~", + "carrier": "~", + "destination": null, + "ratingPlanGroup": null, + "invoice": "~", + "ddi": "~", + "ddiProvider": "~" + } + } + } + ], + "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 ef3af62fdd..ca05d79064 100644 --- a/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js +++ b/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js @@ -10,12 +10,15 @@ import ApplicationServerSetsCollection from '../../fixtures/Provider/Application 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 CarrierServerCollection from '../../fixtures/Provider/CarrierServer/getCollection.json'; import CodecsCollection from '../../fixtures/Provider/Codecs/getCollection.json'; import CompaniesCollection from '../../fixtures/Provider/Companies/getCollection.json'; import CorporationsCollection from '../../fixtures/Provider/Corporations/getCollection.json'; import CountriesCollection from '../../fixtures/Provider/Countries/getCollection.json'; import CurrenciesCollection from '../../fixtures/Provider/Currencies/getCollection.json'; import DdiProvidersCollection from '../../fixtures/Provider/DdiProviders/getCollection.json'; +import DdiProvidersAddressesCollection from '../../fixtures/Provider/DdiProviders/getProviderAddressesCollection.json'; +import DdiProvidersRegistrationsCollection from '../../fixtures/Provider/DdiProviders/getProviderRegistrationsCollection.json'; import DdisCollection from '../../fixtures/Provider/Ddis/getCollection.json'; import FeaturesCollection from '../../fixtures/Provider/Features/getCollection.json'; import LanguagesCollection from '../../fixtures/Provider/Languages/getCollection.json'; @@ -63,10 +66,22 @@ Cypress.Commands.add( ...CarriersCollection, }).as('getCarriers'); + cy.intercept('GET', '**/api/brand/carrier_servers?*', { + ...CarrierServerCollection, + }).as('getCarriersServer'); + cy.intercept('GET', '**/api/brand/ddi_providers?*', { ...DdiProvidersCollection, }).as('getDdiProviders'); + cy.intercept('GET', '**/api/brand/ddi_provider_addresses?*', { + ...DdiProvidersAddressesCollection, + }).as('getDdiProvidersAddresses'); + + cy.intercept('GET', '**/api/brand/ddi_provider_registrations?*', { + ...DdiProvidersRegistrationsCollection, + }).as('getDdiProvidersRegistrations'); + cy.intercept('GET', '**/api/brand/ddis?*', { ...DdisCollection, }).as('getDdis');