diff --git a/web/portal/brand/cypress/e2e/Providers/Carriers/BillableCalls/BillableCalls.cy.js b/web/portal/brand/cypress/e2e/Providers/Carriers/BillableCalls/BillableCalls.cy.js new file mode 100644 index 0000000000..64e99842aa --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/Carriers/BillableCalls/BillableCalls.cy.js @@ -0,0 +1,41 @@ +import BillableCallsCollection from '../../../../fixtures/Provider/BillableCalls/getCollection.json'; +import BillableCallItem from '../../../../fixtures/Provider/BillableCalls/getItem.json'; +import DdisCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; + +describe('in Carriers BillableCalls', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('ddis-billable_calls'); + + 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="PrecisionManufacturingIcon"]').first().click(); + cy.contains('Carriers').click(); + cy.get('td button svg[data-testid="MoreHorizIcon"]').first().click(); + cy.get('li.MuiMenuItem-root') + .contains('External calls') + .click({ force: true }); + cy.get('header').should('contain', 'Carriers'); + cy.get('table').should('contain', DdisCollection.body[0].id); + }); + + it('contains Billable Calls', () => { + cy.get('table').should('contain', BillableCallsCollection.body[0].caller); + }); + + it('View details', () => { + cy.intercept('GET', '**/api/brand/billable_calls/*', { + ...BillableCallItem, + }).as('getBillableCall-1'); + + 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/BillableCalls/BillableCalls.cy.js b/web/portal/brand/cypress/e2e/Providers/DdiProviders/BillableCalls/BillableCalls.cy.js new file mode 100644 index 0000000000..a4bf324cae --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/BillableCalls/BillableCalls.cy.js @@ -0,0 +1,29 @@ +import BillableCallsCollection from '../../../../fixtures/Provider/BillableCalls/getCollection.json'; +import DdisCollection from '../../../../fixtures/Provider/Ddis/getCollection.json'; + +describe('in BillableCalls', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('ddis-billable_calls'); + + 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="PrecisionManufacturingIcon"]').first().click(); + cy.contains('DDIs').click(); + + cy.get(`svg[data-testid="ChatBubbleIcon"]`).eq(1).click(); + + cy.get('header li.MuiBreadcrumbs-li:last').should( + 'contain', + 'External calls' + ); + }); + + it('contains Billable Calls', () => { + cy.get('table').should('contain', BillableCallsCollection.body[0].caller); + }); +}); 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/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..c5e431a66f --- /dev/null +++ b/web/portal/brand/cypress/e2e/Providers/DdiProviders/DdisProviders.tests.js @@ -0,0 +1,86 @@ +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 } = newDdiProviders.request; + cy.fillTheForm({ description, name, transformationRuleSet }); + + 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 } = editDdisProviders.request; + cy.fillTheForm({ description, name }); + + 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/fixtures/Provider/BillableCalls/getItem.json b/web/portal/brand/cypress/fixtures/Provider/BillableCalls/getItem.json new file mode 100644 index 0000000000..44e3c931d3 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/BillableCalls/getItem.json @@ -0,0 +1,22 @@ +{ + "body": { + "callid": "017cc7c8-eb38-4bbd-9318-524a274f7000", + "startTime": "2019-01-01 09:00:00", + "duration": 0, + "caller": "+34633646464", + "callee": "+34633656565", + "price": 1, + "destinationName": null, + "ratingPlanName": null, + "endpointType": null, + "endpointId": null, + "endpointName": null, + "direction": "outbound", + "id": 1, + "ddi": 1 + }, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "statusCode": 200 +} 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..f11c7c757a --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/post.json @@ -0,0 +1,28 @@ +{ + "request": { + "description": "NewDDIProviderDescription", + "name": "NewDDIProviderName", + "proxyTrunk": 1, + "transformationRuleSet": 1 + }, + "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..1a6a982172 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/DdiProviders/put.json @@ -0,0 +1,28 @@ +{ + "request": { + "description": "UpdateDDIProviderDescription", + "name": "UpdateDDIProviderName", + "proxyTrunk": 1, + "transformationRuleSet": 1 + }, + "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..f003ad99b9 --- /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..97f7c07eea --- /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..6cffa2b065 --- /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-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..6379869d1a --- /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..e49a64bdb2 --- /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": "139", + "content-type": "application/json" + }, + "body": { + "description": "NewDDIProviderDescription", + "transformationRuleSet": 1, + "proxyTrunk": 1, + "mediaRelaySet": "__auto__", + "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": "148", + "content-type": "application/json" + }, + "body": { + "description": "UpdateDDIProviderDescription", + "transformationRuleSet": 1, + "proxyTrunk": null, + "mediaRelaySet": "__auto__", + "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..81c01b99ea --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-ddis-billable_calls-brand-consumer-ddis-billable_calls.json @@ -0,0 +1,55 @@ +{ + "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", + "price": 1, + "destinationName": null, + "ratingPlanName": null, + "endpointType": null, + "endpointId": null, + "endpointName": null, + "direction": "outbound", + "id": 1, + "ddi": 1 + } + } + } + ], + "metadata": { + "pactSpecification": { + "version": "2.0.0" + }, + "client": { + "name": "pact-cypress-adapter", + "version": "1.3.0" + } + } +}