diff --git a/web/portal/brand/cypress/e2e/Corporation/Corporation.cy.js b/web/portal/brand/cypress/e2e/Corporation/Corporation.cy.js new file mode 100644 index 0000000000..e5e678d072 --- /dev/null +++ b/web/portal/brand/cypress/e2e/Corporation/Corporation.cy.js @@ -0,0 +1,104 @@ +import CorporationsCollection from '../../fixtures/Provider/Corporations/getCollection.json'; +import CorporationItem from '../../fixtures/Provider/Corporations/getItem.json'; +import newCorporation from '../../fixtures/Provider/Corporations/post.json'; +import editCorporation from '../../fixtures/Provider/Corporations/put.json'; + +describe('in Corporations', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('Corporation'); + cy.before(); + + cy.get('svg[data-testid="EngineeringIcon"]').first().click(); + cy.contains('Corporations').click(); + + cy.get('header').should('contain', 'Corporations'); + + cy.get('table').should('contain', CorporationsCollection.body[0].name); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Corporation', () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/corporations*', + response: newCorporation.response, + matchingRules: newCorporation.matchingRules, + }, + 'createCorporation' + ); + + cy.get('[aria-label=Add]').click(); + + const { ...rest } = newCorporation.request; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Corporations'); + + cy.usePactWait(['createCorporation']) + .its('response.statusCode') + .should('eq', 201); + }); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit a Corporation', () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/corporations/1', + response: { ...CorporationItem }, + }, + 'getCorporation-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/corporations/${editCorporation.response.body.id}`, + response: editCorporation.response, + }, + 'editCorporation' + ); + + cy.get('svg[data-testid="EditIcon"]').first().click(); + + const { ...rest } = editCorporation.request; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Corporations'); + + cy.usePactWait(['editCorporation']) + .its('response.statusCode') + .should('eq', 200); + }); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Corporation', () => { + cy.intercept('DELETE', '**/api/brand/corporations/1', { + statusCode: 204, + }).as('deleteCorporation'); + + 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', 'Corporations'); + + cy.usePactWait(['deleteCorporation']) + .its('response.statusCode') + .should('eq', 204); + }); +}); diff --git a/web/portal/brand/cypress/e2e/Friends/Friends.cy.js b/web/portal/brand/cypress/e2e/Friends/Friends.cy.js new file mode 100644 index 0000000000..abb5373dce --- /dev/null +++ b/web/portal/brand/cypress/e2e/Friends/Friends.cy.js @@ -0,0 +1,124 @@ +import FriendsCollection from '../../fixtures/Provider/Friends/getCollection.json'; +import FriendItem from '../../fixtures/Provider/Friends/getItem.json'; +import newFriend from '../../fixtures/Provider/Friends/post.json'; +import editFriend from '../../fixtures/Provider/Friends/put.json'; + +describe('in Friends', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('Friend'); + cy.before(); + + cy.get('svg[data-testid="EngineeringIcon"]').first().click(); + cy.contains('Friends').click(); + + cy.get('header').should('contain', 'Friends'); + + cy.get('table').should('contain', FriendsCollection.body[0].name); + }); + + /////////////////////// + // POST + /////////////////////// + it('add Friend', () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/friends*', + response: newFriend.response, + matchingRules: newFriend.matchingRules, + }, + 'createFriend' + ); + + cy.get('[aria-label=Add]').click(); + + const { ...rest } = newFriend.request; + + delete rest.allow; + delete rest.fromDomain; + delete rest.ddiIn; + delete rest.t38Passthrough; + + if (rest.directConnectivity === 'intervpbx') { + delete rest.ip; + delete rest.port; + delete rest.transport; + delete rest.ruriDomain; + delete rest.proxyUser; + delete rest.multiContact; + delete rest.name; + delete rest.priority; + delete rest.password; + } + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Friends'); + + cy.usePactWait(['createFriend']) + .its('response.statusCode') + .should('eq', 201); + }); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit a Friend', () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/friends/1', + response: { ...FriendItem }, + }, + 'getFriend-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/friends/${editFriend.response.body.id}`, + response: editFriend.response, + }, + 'editFriend' + ); + + cy.get('svg[data-testid="EditIcon"]').eq(1).click(); + + const { ...rest } = editFriend.request; + delete rest.allow; + delete rest.fromDomain; + delete rest.ddiIn; + delete rest.t38Passthrough; + delete rest.maxCalls; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Friends'); + + cy.usePactWait(['editFriend']).its('response.statusCode').should('eq', 200); + }); + + /////////////////////// + // DELETE + /////////////////////// + it('delete Friend', () => { + cy.intercept('DELETE', '**/api/brand/friends/1', { + statusCode: 204, + }).as('deleteFriend'); + + cy.get('td button > svg[data-testid="DeleteIcon"]').eq(1).click(); + + cy.contains('Remove element'); + + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'Friends'); + + cy.usePactWait(['deleteFriend']) + .its('response.statusCode') + .should('eq', 204); + }); +}); diff --git a/web/portal/brand/cypress/e2e/ResidentialDevice/ResidentialDevice.cy.js b/web/portal/brand/cypress/e2e/ResidentialDevice/ResidentialDevice.cy.js new file mode 100644 index 0000000000..578fed2d9a --- /dev/null +++ b/web/portal/brand/cypress/e2e/ResidentialDevice/ResidentialDevice.cy.js @@ -0,0 +1,117 @@ +import ResidentialDevicesCollection from '../../fixtures/Provider/ResidentialDevices/getCollection.json'; +import ResidentialDeviceItem from '../../fixtures/Provider/ResidentialDevices/getItem.json'; +import newResidentialDevice from '../../fixtures/Provider/ResidentialDevices/post.json'; +import editResidentialDevice from '../../fixtures/Provider/ResidentialDevices/put.json'; + +describe('in ResidentialDevices', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('ResidentialDevice'); + cy.before(); + + cy.get('svg[data-testid="EngineeringIcon"]').first().click(); + cy.contains('Residential Devices').click(); + + cy.get('header').should('contain', 'Residential Devices'); + + cy.get('table').should( + 'contain', + ResidentialDevicesCollection.body[0].name + ); + }); + + /////////////////////// + // POST + /////////////////////// + it('add ResidentialDevice', () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/residential_devices*', + response: newResidentialDevice.response, + matchingRules: newResidentialDevice.matchingRules, + }, + 'createResidentialDevice' + ); + + cy.get('[aria-label=Add]').click(); + + const { ...rest } = newResidentialDevice.request; + + delete rest.t38Passthrough; + delete rest.allow; + delete rest.ddiIn; + delete rest.maxCalls; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Residential Devices'); + + cy.usePactWait(['createResidentialDevice']) + .its('response.statusCode') + .should('eq', 201); + }); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit a ResidentialDevice', () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/residential_devices/1', + response: { ...ResidentialDeviceItem }, + }, + 'getResidentialDevice-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/residential_devices/${editResidentialDevice.response.body.id}`, + response: editResidentialDevice.response, + }, + 'editResidentialDevice' + ); + + cy.get('svg[data-testid="EditIcon"]').eq(4).click(); + + const { ...rest } = editResidentialDevice.request; + + delete rest.t38Passthrough; + delete rest.allow; + delete rest.ddiIn; + delete rest.maxCalls; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Residential Devices'); + + cy.usePactWait(['editResidentialDevice']) + .its('response.statusCode') + .should('eq', 200); + }); + + /////////////////////// + // DELETE + /////////////////////// + it('delete ResidentialDevice', () => { + cy.intercept('DELETE', '**/api/brand/residential_devices/1', { + statusCode: 204, + }).as('deleteResidentialDevice'); + + cy.get('td button > svg[data-testid="DeleteIcon"]').eq(4).click(); + + cy.contains('Remove element'); + + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'Residential Devices'); + + cy.usePactWait(['deleteResidentialDevice']) + .its('response.statusCode') + .should('eq', 204); + }); +}); diff --git a/web/portal/brand/cypress/e2e/RetailAccount/RetailAccount.cy.js b/web/portal/brand/cypress/e2e/RetailAccount/RetailAccount.cy.js new file mode 100644 index 0000000000..479c67b619 --- /dev/null +++ b/web/portal/brand/cypress/e2e/RetailAccount/RetailAccount.cy.js @@ -0,0 +1,115 @@ +import RetailAccountsCollection from '../../fixtures/Provider/RetailAccounts/getCollection.json'; +import RetailAccountItem from '../../fixtures/Provider/RetailAccounts/getItem.json'; +import newRetailAccount from '../../fixtures/Provider/RetailAccounts/post.json'; +import editRetailAccount from '../../fixtures/Provider/RetailAccounts/put.json'; + +describe('in RetailAccounts', () => { + beforeEach(() => { + cy.prepareGenericPactInterceptors('RetailAccount'); + cy.before(); + + cy.get('svg[data-testid="EngineeringIcon"]').first().click(); + cy.contains('Retail Accounts').click(); + + cy.get('header').should('contain', 'Retail Accounts'); + + cy.get('table').should('contain', RetailAccountsCollection.body[0].name); + }); + + /////////////////////// + // POST + /////////////////////// + it('add RetailAccount', () => { + cy.usePactIntercept( + { + method: 'POST', + url: '**/api/brand/retail_accounts*', + response: newRetailAccount.response, + matchingRules: newRetailAccount.matchingRules, + }, + 'createRetailAccount' + ); + + cy.get('[aria-label=Add]').click(); + + const { ...rest } = newRetailAccount.request; + + delete rest.ddiIn; + delete rest.t38Passthrough; + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Retail Accounts'); + + cy.usePactWait(['createRetailAccount']) + .its('response.statusCode') + .should('eq', 201); + }); + + /////////////////////////////// + // PUT + /////////////////////////////// + it('edit a RetailAccount', () => { + cy.usePactIntercept( + { + method: 'GET', + url: '**/api/brand/retail_accounts/1', + response: { ...RetailAccountItem }, + }, + 'getRetailAccount-1' + ); + + cy.usePactIntercept( + { + method: 'PUT', + url: `**/api/brand/retail_accounts/${editRetailAccount.response.body.id}`, + response: editRetailAccount.response, + }, + 'editRetailAccount' + ); + + cy.get('svg[data-testid="EditIcon"]').eq(4).click(); + + const { ...rest } = editRetailAccount.request; + + delete rest.ddiIn; + delete rest.t38Passthrough; + delete rest.proxyUser; + + if (rest.directConnectivity === 'no') { + delete rest.transport; + } + + cy.fillTheForm(rest); + + cy.get('header').should('contain', 'Retail Accounts'); + + cy.usePactWait(['editRetailAccount']) + .its('response.statusCode') + .should('eq', 200); + }); + + /////////////////////// + // DELETE + /////////////////////// + it('delete RetailAccount', () => { + cy.intercept('DELETE', '**/api/brand/retail_accounts/1', { + statusCode: 204, + }).as('deleteRetailAccount'); + + cy.get('td button > svg[data-testid="DeleteIcon"]').eq(4).click(); + + cy.contains('Remove element'); + + cy.get('div.MuiDialog-container button') + .filter(':visible') + .contains('Yes, delete it') + .click(); + + cy.get('header').should('contain', 'Retail Accounts'); + + cy.usePactWait(['deleteRetailAccount']) + .its('response.statusCode') + .should('eq', 204); + }); +}); diff --git a/web/portal/brand/cypress/fixtures/Provider/Companies/getUnassignedCollection.json b/web/portal/brand/cypress/fixtures/Provider/Companies/getUnassignedCollection.json new file mode 100644 index 0000000000..0175aad3e9 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Companies/getUnassignedCollection.json @@ -0,0 +1,21 @@ +{ + "body": [ + { + "type": "vpbx", + "name": "Irontec Test Company", + "id": 2, + "invoicing": { + "nif": "12345678-Z" + }, + "domainName": "test.irontec.com" + } + ], + "headers": { + "x-first-page": "/api/brand/companies/corporate/unassigned?_page=1", + "x-last-page": "/api/brand/companies/corporate/unassigned?_page=1", + "x-next-page": "/api/brand/companies/corporate/unassigned?_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/Corporations/getItem.json b/web/portal/brand/cypress/fixtures/Provider/Corporations/getItem.json new file mode 100644 index 0000000000..b64321bc16 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Corporations/getItem.json @@ -0,0 +1,11 @@ +{ + "body": { + "name": "Irontec Test Corporation", + "description": "Irontec Test Desc Corporation", + "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/fixtures/Provider/Corporations/post.json b/web/portal/brand/cypress/fixtures/Provider/Corporations/post.json new file mode 100644 index 0000000000..af20b53062 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Corporations/post.json @@ -0,0 +1,22 @@ +{ + "request": { + "name": "Irontec Corp", + "description": "Irontec corporation" + }, + "response": { + "body": { + "name": "Irontec Corp", + "description": "Irontec corporation", + "id": 3 + }, + "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/Corporations/put.json b/web/portal/brand/cypress/fixtures/Provider/Corporations/put.json new file mode 100644 index 0000000000..9ea0fd4d3c --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Corporations/put.json @@ -0,0 +1,17 @@ +{ + "request": { + "name": "Irontec Test Corporation Modified", + "description": "Irontec Test Desc Corporation" + }, + "response": { + "body": { + "name": "Irontec Test Corporation Modified", + "description": "Irontec Test Desc Corporation", + "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/fixtures/Provider/Domains/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/Domains/getCollection.json new file mode 100644 index 0000000000..0a5e97ac17 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Domains/getCollection.json @@ -0,0 +1,24 @@ +{ + "body": [ + { + "domain": "127.0.0.1", + "id": 3 + }, + { + "domain": "retail.irontec.com", + "id": 6 + }, + { + "domain": "test.irontec.com", + "id": 5 + } +], + "headers": { + "x-first-page": "/api/brand/domains?_page=1", + "x-last-page": "/api/brand/domains?_page=1", + "x-next-page": "/api/brand/domains?_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/Friends/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/Friends/getCollection.json new file mode 100644 index 0000000000..83c5305e1e --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Friends/getCollection.json @@ -0,0 +1,45 @@ +{ + "body": [ + { + "name": "InterCompany1_3", + "description": "", + "priority": 2, + "directConnectivity": "intervpbx", + "id": 3, + "company": 1, + "domain": 3, + "interCompany": 3, + "proxyUser": null + }, + { + "name": "testFriend", + "description": "", + "priority": 1, + "directConnectivity": "yes", + "id": 1, + "company": 1, + "domain": 3, + "interCompany": null, + "proxyUser": 1 + }, + { + "name": "InterCompany1_3", + "description": "", + "priority": 2, + "directConnectivity": "intervpbx", + "id": 2, + "company": 3, + "domain": 6, + "interCompany": 1, + "proxyUser": null + } + ], + "headers": { + "x-first-page": "/api/brand/friends?_page=1", + "x-last-page": "/api/brand/friends?_page=1", + "x-next-page": "/api/brand/friends?_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/Friends/getItem.json b/web/portal/brand/cypress/fixtures/Provider/Friends/getItem.json new file mode 100644 index 0000000000..d4c1c92a05 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Friends/getItem.json @@ -0,0 +1,71 @@ +{ + "body": { + "name": "testFriend", + "description": "", + "transport": "udp", + "ip": "1.2.3.4", + "port": 5060, + "password": "SDG3qd2j6+", + "priority": 1, + "directConnectivity": "yes", + "ruriDomain": null, + "id": 1, + "company": { + "type": "vpbx", + "name": "DemoCompany", + "domainUsers": "127.0.0.1", + "maxCalls": 0, + "maxDailyUsage": 2, + "currentDayUsage": 1, + "maxDailyUsageEmail": "no-replay@domain.net", + "ipfilter": false, + "onDemandRecord": 0, + "allowRecordingRemoval": true, + "onDemandRecordCode": "", + "externallyextraopts": "", + "billingMethod": "prepaid", + "balance": 1.2, + "showInvoices": true, + "id": 1, + "invoicing": { + "nif": "12345678A", + "postalAddress": "Company Address", + "postalCode": "54321", + "town": "Company Town", + "province": "Company Province", + "countryName": "Company Country" + }, + "language": 1, + "defaultTimezone": 145, + "country": 68, + "currency": null, + "transformationRuleSet": 1, + "outgoingDdi": null, + "outgoingDdiRule": null, + "voicemailNotificationTemplate": 1, + "faxNotificationTemplate": null, + "invoiceNotificationTemplate": null, + "callCsvNotificationTemplate": null, + "maxDailyUsageNotificationTemplate": 2, + "accessCredentialNotificationTemplate": 5, + "corporation": 1, + "applicationServerSet": 1, + "mediaRelaySet": 0, + "featureIds": [], + "geoIpAllowedCountries": [], + "routingTagIds": [], + "codecIds": [] + }, + "interCompany": null, + "proxyUser": { + "name": "proxyusers", + "ip": "127.0.0.1", + "advertisedIp": "138.0.0.1", + "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/fixtures/Provider/Friends/post.json b/web/portal/brand/cypress/fixtures/Provider/Friends/post.json new file mode 100644 index 0000000000..d00896d096 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Friends/post.json @@ -0,0 +1,57 @@ +{ + "request": { + "name": "beWatterMyFriend", + "description": "something", + "directConnectivity": "intervpbx", + "company": 3, + "interCompany": 2, + "transport": "tls", + "ip": "129.1.2.3", + "port": 5060, + "password": "", + "priority": 2, + "allow": "alaw", + "fromDomain": "", + "ddiIn": "yes", + "t38Passthrough": "no", + "transformationRuleSet": null, + "callAcl": null, + "outgoingDdi": null, + "language": null, + "ruriDomain": "test.example.com" + }, + "response": { + "body": { + "name": "testResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "qq6G+As2M7", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 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/Friends/put.json b/web/portal/brand/cypress/fixtures/Provider/Friends/put.json new file mode 100644 index 0000000000..60869293fc --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/Friends/put.json @@ -0,0 +1,49 @@ +{ + "request": { + "name": "updatedResidentialDevice", + "description": "demo description", + "directConnectivity": "yes", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 2, + "transport": "udp" + }, + "response": { + "body": { + "name": "updatedResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 4, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 2 + }, + "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/ProxyUsers/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/ProxyUsers/getCollection.json new file mode 100644 index 0000000000..a020fe202f --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ProxyUsers/getCollection.json @@ -0,0 +1,24 @@ +{ + "body": [ + { + "name": "another pu", + "ip": "127.0.1.2", + "advertisedIp": "138.0.1.2", + "id": 2 + }, + { + "name": "proxyusers", + "ip": "127.0.0.1", + "advertisedIp": "138.0.0.1", + "id": 1 + } + ], + "headers": { + "x-first-page": "/api/brand/proxy_users?_page=1", + "x-last-page": "/api/brand/proxy_users?_page=1", + "x-next-page": "/api/brand/proxy_users?_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/ResidentialDevices/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/getCollection.json new file mode 100644 index 0000000000..e319b306bf --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/getCollection.json @@ -0,0 +1,93 @@ +{ + "body": [ + { + "name": "residentialDevice2", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 2, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "residentialDevice3", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 3, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "residentialDevice4", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 4, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "residentialDevice5", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 5, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "residentialDevice", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 1, + "domain": 6, + "company": 4, + "status": [ + { + "contact": "sip:yealinktest@10.10.1.108:5060", + "received": "sip:212.64.172.25:5060", + "publicReceived": true, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + }, + { + "contact": "sip:yealinktest@10.10.1.110:5060", + "received": "", + "publicReceived": false, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + } + ] + }, + { + "name": "residentialDevice6", + "description": "", + "directConnectivity": "yes", + "rtpEncryption": false, + "multiContact": true, + "id": 6, + "domain": 6, + "company": 4, + "status": [] + } + ], + "headers": { + "x-first-page": "/api/brand/residential_devices?_page=1", + "x-last-page": "/api/brand/residential_devices?_page=1", + "x-next-page": "/api/brand/residential_devices?_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/ResidentialDevices/getItem.json b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/getItem.json new file mode 100644 index 0000000000..8250165e08 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/getItem.json @@ -0,0 +1,41 @@ +{ + "body": { + "name": "residentialDevice", + "description": "", + "transport": "udp", + "ip": null, + "port": null, + "password": "+rA778LidL", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "no", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "id": 1, + "company": "~", + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "status": [ + { + "contact": "sip:yealinktest@10.10.1.108:5060", + "received": "sip:212.64.172.25:5060", + "publicReceived": true, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + }, + { + "contact": "sip:yealinktest@10.10.1.110:5060", + "received": "", + "publicReceived": false, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + } + ] + }, + "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/ResidentialDevices/post.json b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/post.json new file mode 100644 index 0000000000..0467d65fc2 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/post.json @@ -0,0 +1,55 @@ +{ + "request": { + "name": "testResidentialDevice", + "description": "demo description", + "directConnectivity": "yes", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "qq6G+As2M7", + "fromDomain": null, + "t38Passthrough": "no", + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 1, + "allow": "alaw", + "ddiIn": "yes", + "maxCalls": 1 + }, + "response": { + "body": { + "name": "testResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "qq6G+As2M7", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 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/ResidentialDevices/put.json b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/put.json new file mode 100644 index 0000000000..c989c06729 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/ResidentialDevices/put.json @@ -0,0 +1,49 @@ +{ + "request": { + "name": "updatedResidentialDevice", + "description": "demo description", + "directConnectivity": "yes", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 1, + "transport": "udp" + }, + "response": { + "body": { + "name": "updatedResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 4, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 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/RetailAccounts/getCollection.json b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/getCollection.json new file mode 100644 index 0000000000..ac1ef39d98 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/getCollection.json @@ -0,0 +1,87 @@ +{ + "body": [ + { + "name": "testRetailAccount2", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 2, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "testRetailAccount3", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 3, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "testRetailAccount4", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 4, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "testRetailAccount5", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 5, + "domain": 6, + "company": 1, + "status": [] + }, + { + "name": "testRetailAccount", + "description": "", + "directConnectivity": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 1, + "domain": 6, + "company": 3, + "status": [ + { + "contact": "sip:yealinktest@10.10.1.109:5060", + "publicContact": false, + "received": "sip:212.64.172.26:5060", + "publicReceived": true, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + } + ] + }, + { + "name": "testRetailAccount6", + "description": "", + "directConnectivity": "yes", + "rtpEncryption": false, + "multiContact": true, + "id": 6, + "domain": 6, + "company": 3, + "status": [] + } +], + "headers": { + "x-first-page": "/api/brand/retail_accounts?_page=1", + "x-last-page": "/api/brand/retail_accounts?_page=1", + "x-next-page": "/api/brand/retail_accounts?_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/RetailAccounts/getItem.json b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/getItem.json new file mode 100644 index 0000000000..7e11c12070 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/getItem.json @@ -0,0 +1,34 @@ +{ + "body": { + "name": "testRetailAccount", + "description": "", + "transport": "udp", + "ip": null, + "port": null, + "password": "9rv6G3TVc-", + "fromDomain": null, + "directConnectivity": "no", + "ddiIn": "yes", + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "id": 1, + "company": "~", + "transformationRuleSet": null, + "outgoingDdi": null, + "status": [ + { + "contact": "sip:yealinktest@10.10.1.109:5060", + "publicContact": false, + "received": "sip:212.64.172.26:5060", + "publicReceived": true, + "expires": "2031-01-01 00:59:59", + "userAgent": "Yealink SIP-T23G 44.80.0.130" + } + ] + }, + "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/RetailAccounts/post.json b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/post.json new file mode 100644 index 0000000000..d627bfabeb --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/post.json @@ -0,0 +1,49 @@ +{ + "request": { + "name": "postRetailAccount", + "description": "demo description", + "directConnectivity": "yes", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "3N-8g6zuXP", + "fromDomain": null, + "ddiIn": "yes", + "t38Passthrough": "no", + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": 1 +}, + "response": { + "body": { + "name": "postRetailAccount", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "3N-8g6zuXP", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": 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/RetailAccounts/put.json b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/put.json new file mode 100644 index 0000000000..1d69216530 --- /dev/null +++ b/web/portal/brand/cypress/fixtures/Provider/RetailAccounts/put.json @@ -0,0 +1,44 @@ +{ + "request": { + "name": "updatedRetailAccount", + "description": "demo description", + "directConnectivity": "no", + "transport": "udp", + "ip": null, + "port": null, + "password": "8rv6G3TVc-", + "fromDomain": null, + "ddiIn": "yes", + "t38Passthrough": "no", + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": 1 + }, + "response": { + "body": { + "name": "updatedRetailAccount", + "description": "demo description", + "transport": "udp", + "ip": null, + "port": null, + "password": "8rv6G3TVc-", + "fromDomain": null, + "directConnectivity": "no", + "ddiIn": "yes", + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 3, + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": null, + "status": [] + }, + "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-Corporation-brand-consumer-Corporation.json b/web/portal/brand/cypress/pacts/brand-provider-Corporation-brand-consumer-Corporation.json new file mode 100644 index 0000000000..756b963724 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-Corporation-brand-consumer-Corporation.json @@ -0,0 +1,103 @@ +{ + "consumer": { + "name": "brand-consumer-Corporation" + }, + "provider": { + "name": "brand-provider-Corporation" + }, + "interactions": [ + { + "description": "add Corporation", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/corporations", + "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": "59", + "content-type": "application/json" + }, + "body": { + "description": "Irontec corporation", + "name": "Irontec Corp" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "Irontec Corp", + "description": "Irontec corporation", + "id": 3 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit a Corporation", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/corporations/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": "90", + "content-type": "application/json" + }, + "body": { + "description": "Irontec Test Desc Corporation", + "name": "Irontec Test Corporation Modified" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "Irontec Test Corporation Modified", + "description": "Irontec Test Desc Corporation", + "id": 1 + } + } + }, + { + "description": "delete Corporation", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/corporations/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-Friend-brand-consumer-Friend.json b/web/portal/brand/cypress/pacts/brand-provider-Friend-brand-consumer-Friend.json new file mode 100644 index 0000000000..5fdbad2c21 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-Friend-brand-consumer-Friend.json @@ -0,0 +1,149 @@ +{ + "consumer": { + "name": "brand-consumer-Friend" + }, + "provider": { + "name": "brand-provider-Friend" + }, + "interactions": [ + { + "description": "add Friend", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/friends", + "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": "89", + "content-type": "application/json" + }, + "body": { + "description": "something", + "directConnectivity": "intervpbx", + "interCompany": 2, + "company": 3 + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "testResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "qq6G+As2M7", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit a Friend", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/friends/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": "207", + "content-type": "application/json" + }, + "body": { + "description": "demo description", + "transport": "udp", + "port": 1024, + "directConnectivity": "yes", + "proxyUser": 2, + "name": "updatedResidentialDevice", + "ip": "1.2.3.4", + "password": "+rA778Li2dL", + "ruriDomain": "", + "company": 1 + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "updatedResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 4, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 2 + } + } + }, + { + "description": "delete Friend", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/friends/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-ResidentialDevice-brand-consumer-ResidentialDevice.json b/web/portal/brand/cypress/pacts/brand-provider-ResidentialDevice-brand-consumer-ResidentialDevice.json new file mode 100644 index 0000000000..71b514a8ac --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-ResidentialDevice-brand-consumer-ResidentialDevice.json @@ -0,0 +1,154 @@ +{ + "consumer": { + "name": "brand-consumer-ResidentialDevice" + }, + "provider": { + "name": "brand-provider-ResidentialDevice" + }, + "interactions": [ + { + "description": "add ResidentialDevice", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/residential_devices", + "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": "203", + "content-type": "application/json" + }, + "body": { + "description": "demo description", + "transport": "udp", + "port": 1024, + "directConnectivity": "yes", + "proxyUser": 1, + "name": "testResidentialDevice", + "ip": "1.2.3.4", + "password": "qq6G+As2M7", + "company": 1, + "ruriDomain": "" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "testResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "qq6G+As2M7", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit a ResidentialDevice", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/residential_devices/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": "193", + "content-type": "application/json" + }, + "body": { + "description": "demo description", + "transport": "udp", + "port": 1024, + "directConnectivity": "yes", + "proxyUser": 1, + "name": "updatedResidentialDevice", + "ip": "1.2.3.4", + "password": "+rA778Li2dL", + "company": "~" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "updatedResidentialDevice", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "+rA778Li2dL", + "allow": "alaw", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "maxCalls": 1, + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 4, + "transformationRuleSet": null, + "outgoingDdi": null, + "language": null, + "proxyUser": 1 + } + } + }, + { + "description": "delete ResidentialDevice", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/residential_devices/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-RetailAccount-brand-consumer-RetailAccount.json b/web/portal/brand/cypress/pacts/brand-provider-RetailAccount-brand-consumer-RetailAccount.json new file mode 100644 index 0000000000..d3b60e8159 --- /dev/null +++ b/web/portal/brand/cypress/pacts/brand-provider-RetailAccount-brand-consumer-RetailAccount.json @@ -0,0 +1,145 @@ +{ + "consumer": { + "name": "brand-consumer-RetailAccount" + }, + "provider": { + "name": "brand-provider-RetailAccount" + }, + "interactions": [ + { + "description": "add RetailAccount", + "providerState": "", + "request": { + "method": "POST", + "path": "/api/brand/retail_accounts", + "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": "199", + "content-type": "application/json" + }, + "body": { + "description": "demo description", + "transport": "udp", + "port": 1024, + "directConnectivity": "yes", + "proxyUser": 1, + "company": 1, + "name": "postRetailAccount", + "ip": "1.2.3.4", + "password": "3N-8g6zuXP", + "ruriDomain": "" + }, + "query": "" + }, + "response": { + "status": 201, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "postRetailAccount", + "description": "demo description", + "transport": "udp", + "ip": "1.2.3.4", + "port": 1024, + "password": "3N-8g6zuXP", + "fromDomain": null, + "directConnectivity": "yes", + "ddiIn": "yes", + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 7, + "company": 1, + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": 1 + }, + "matchingRules": { + "$.body.id": { + "match": "type" + } + } + } + }, + { + "description": "edit a RetailAccount", + "providerState": "", + "request": { + "method": "PUT", + "path": "/api/brand/retail_accounts/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": "128", + "content-type": "application/json" + }, + "body": { + "description": "demo description", + "directConnectivity": "no", + "name": "updatedRetailAccount", + "password": "8rv6G3TVc-", + "company": "~" + }, + "query": "" + }, + "response": { + "status": 200, + "headers": { + "content-type": "application/json; charset=utf-8" + }, + "body": { + "name": "updatedRetailAccount", + "description": "demo description", + "transport": "udp", + "ip": null, + "port": null, + "password": "8rv6G3TVc-", + "fromDomain": null, + "directConnectivity": "no", + "ddiIn": "yes", + "t38Passthrough": "no", + "rtpEncryption": false, + "multiContact": true, + "ruriDomain": null, + "id": 1, + "company": 3, + "transformationRuleSet": null, + "outgoingDdi": null, + "proxyUser": null, + "status": [] + } + } + }, + { + "description": "delete RetailAccount", + "providerState": "", + "request": { + "method": "DELETE", + "path": "/api/brand/retail_accounts/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/support/commands/prepareGenericPactInterceptors.js b/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js index ef3af62fdd..375da7d8ea 100644 --- a/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js +++ b/web/portal/brand/cypress/support/commands/prepareGenericPactInterceptors.js @@ -12,20 +12,26 @@ import BillableCallsCollection from '../../fixtures/Provider/BillableCalls/getCo import CarriersCollection from '../../fixtures/Provider/Carriers/getCollection.json'; import CodecsCollection from '../../fixtures/Provider/Codecs/getCollection.json'; import CompaniesCollection from '../../fixtures/Provider/Companies/getCollection.json'; +import CompaniesUnassignedCollection from '../../fixtures/Provider/Companies/getUnassignedCollection.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 DdisCollection from '../../fixtures/Provider/Ddis/getCollection.json'; +import DomainsCollection from '../../fixtures/Provider/Domains/getCollection.json'; import FeaturesCollection from '../../fixtures/Provider/Features/getCollection.json'; +import FriendsCollection from '../../fixtures/Provider/Friends/getCollection.json'; import LanguagesCollection from '../../fixtures/Provider/Languages/getCollection.json'; import MediaRelaySetsColection from '../../fixtures/Provider/MediaRelaySets/getCollection.json'; import NotificationTemplateContentsCollection from '../../fixtures/Provider/NotificationTemplateContents/getCollection.json'; import NotificationTemplatesCollection from '../../fixtures/Provider/NotificationTemplates/getCollection.json'; import OutgoingDdiRulesCollection from '../../fixtures/Provider/OutgoingDdiRules/getCollection.json'; import ProxyTrunksCollection from '../../fixtures/Provider/ProxyTrunks/getCollection.json'; +import ProxyUsersCollection from '../../fixtures/Provider/ProxyUsers/getCollection.json'; import RatingPlanGroupCollection from '../../fixtures/Provider/RatingPlanGroup/getCollections.json'; import RatingProfilesCollection from '../../fixtures/Provider/RatingProfile/getCollection.json'; +import ResidentialDevicesCollection from '../../fixtures/Provider/ResidentialDevices/getCollection.json'; +import RetailAccountsCollection from '../../fixtures/Provider/RetailAccounts/getCollection.json'; import RoutingTagsCollection from '../../fixtures/Provider/RoutingTags/getCollection.json'; import TimezonesCollection from '../../fixtures/Provider/Timezones/getCollection.json'; import TransformationRuleSetsCollection from '../../fixtures/Provider/TransformationRuleSets/getCollection.json'; @@ -181,5 +187,29 @@ Cypress.Commands.add( cy.intercept('GET', '**/api/brand/trusteds?*', { ...TrustedCollection, }).as('getTrusteds'); + + cy.intercept('GET', '**/api/brand/residential_devices?*', { + ...ResidentialDevicesCollection, + }).as('getResidentialDevices'); + + cy.intercept('GET', '**/api/brand/domains?*', { + ...DomainsCollection, + }).as('getDomains'); + + cy.intercept('GET', '**/api/brand/proxy_users?*', { + ...ProxyUsersCollection, + }).as('getProxyUsers'); + + cy.intercept('GET', '**/api/brand/retail_accounts?*', { + ...RetailAccountsCollection, + }).as('getRetailAccounts'); + + cy.intercept('GET', '**/api/brand/friends?*', { + ...FriendsCollection, + }).as('getFriends'); + + cy.intercept('GET', '**/api/brand/companies/corporate/unassigned*', { + ...CompaniesUnassignedCollection, + }).as('getFriends'); } );