diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 0972e3463..3638c26e0 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -544,7 +544,8 @@ export default { searchResultDate: 'vn-ticket-summary [label=Landed] span', topbarSearch: 'vn-searchbar', moreMenu: 'vn-ticket-index vn-icon-button[icon=more_vert]', - sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6)', + fourthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(4)', + fiveWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(5)', weeklyTicket: 'vn-ticket-weekly-index vn-table > div > vn-tbody > vn-tr', firstWeeklyTicketDeleteIcon: 'vn-ticket-weekly-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]', firstWeeklyTicketAgency: 'vn-ticket-weekly-index vn-tr:nth-child(1) [ng-model="weekly.agencyModeFk"]', diff --git a/e2e/paths/02-client/03_edit_fiscal_data.spec.js b/e2e/paths/02-client/03_edit_fiscal_data.spec.js index 4ae1d4eca..2a56cb535 100644 --- a/e2e/paths/02-client/03_edit_fiscal_data.spec.js +++ b/e2e/paths/02-client/03_edit_fiscal_data.spec.js @@ -276,7 +276,7 @@ describe('Client Edit fiscalData path', () => { // confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2 it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => { await page.waitToClick(selectors.clientAddresses.firstEditAddress); - await page.waitForTextInField(selectors.clientAddresses.city, 'Silla'); + await page.waitForTextInField(selectors.clientAddresses.city, 'Gotham'); await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox); await page.waitToClick(selectors.clientAddresses.saveButton); const message = await page.waitForSnackbar(); diff --git a/e2e/paths/05-ticket/06_basic_data_steps.spec.js b/e2e/paths/05-ticket/06_basic_data_steps.spec.js index fa118c25d..46cbf29b8 100644 --- a/e2e/paths/05-ticket/06_basic_data_steps.spec.js +++ b/e2e/paths/05-ticket/06_basic_data_steps.spec.js @@ -42,7 +42,7 @@ describe('Ticket Edit basic data path', () => { expect(disabled).toBeFalsy(); }); - it(`should check the zone is for Silla247`, async() => { + it(`should check the zone is for Gotham247`, async() => { let zone = await page .waitToGetProperty(selectors.ticketBasicData.zone, 'value'); @@ -63,7 +63,7 @@ describe('Ticket Edit basic data path', () => { let zone = await page .waitToGetProperty(selectors.ticketBasicData.agency, 'value'); - expect(zone).toContain('Silla247Expensive'); + expect(zone).toContain('Gotham247Expensive'); }); it(`should click next`, async() => { @@ -92,7 +92,7 @@ describe('Ticket Edit basic data path', () => { }); it(`should split ticket without negatives`, async() => { - const newAgency = 'Silla247'; + const newAgency = 'Gotham247'; const newDate = new Date(); newDate.setDate(newDate.getDate() - 1); diff --git a/e2e/paths/05-ticket/09_weekly.spec.js b/e2e/paths/05-ticket/09_weekly.spec.js index 2392de28f..d04138ee5 100644 --- a/e2e/paths/05-ticket/09_weekly.spec.js +++ b/e2e/paths/05-ticket/09_weekly.spec.js @@ -45,7 +45,7 @@ describe('Ticket descriptor path', () => { it('should confirm the ticket 11 was added to thursday', async() => { await page.accessToSection('ticket.weekly.index'); - const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value'); + const result = await page.waitToGetProperty(selectors.ticketsIndex.fourthWeeklyTicket, 'value'); expect(result).toEqual('Thursday'); }); @@ -80,7 +80,7 @@ describe('Ticket descriptor path', () => { it('should confirm the ticket 11 was added on saturday', async() => { await page.accessToSection('ticket.weekly.index'); - const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value'); + const result = await page.waitToGetProperty(selectors.ticketsIndex.fiveWeeklyTicket, 'value'); expect(result).toEqual('Saturday'); }); @@ -108,7 +108,7 @@ describe('Ticket descriptor path', () => { }); it('should update the agency then remove it afterwards', async() => { - await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Silla247'); + await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Gotham247'); let message = await page.waitForSnackbar(); expect(message.text).toContain('Data saved!'); diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js index bfaa08775..d72557f99 100644 --- a/e2e/paths/05-ticket/14_create_ticket.spec.js +++ b/e2e/paths/05-ticket/14_create_ticket.spec.js @@ -27,7 +27,7 @@ describe('Ticket create path', () => { await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent'); await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth); await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse Two'); - await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247'); + await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247'); await page.waitToClick(selectors.createTicketView.createButton); const message = await page.waitForSnackbar(); @@ -50,7 +50,7 @@ describe('Ticket create path', () => { await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent'); await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth); await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse One'); - await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247'); + await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247'); await page.waitToClick(selectors.createTicketView.createButton); const message = await page.waitForSnackbar(); diff --git a/e2e/paths/07-order/01_summary.spec.js b/e2e/paths/07-order/01_summary.spec.js index 9b9e37998..922d5eeee 100644 --- a/e2e/paths/07-order/01_summary.spec.js +++ b/e2e/paths/07-order/01_summary.spec.js @@ -34,7 +34,7 @@ describe('Order summary path', () => { it('should check the summary contains the order consignee', async() => { const result = await page.waitToGetProperty(selectors.orderSummary.consignee, 'innerText'); - expect(result).toEqual('address 26 - Silla (Province one)'); + expect(result).toEqual('address 26 - Gotham (Province one)'); }); it('should check the summary contains the order subtotal', async() => { diff --git a/modules/client/back/methods/client/specs/extendedListFilter.spec.js b/modules/client/back/methods/client/specs/extendedListFilter.spec.js index 907c03ef9..9a0441656 100644 --- a/modules/client/back/methods/client/specs/extendedListFilter.spec.js +++ b/modules/client/back/methods/client/specs/extendedListFilter.spec.js @@ -1,4 +1,4 @@ -const { models } = require('vn-loopback/server/server'); +const {models} = require('vn-loopback/server/server'); describe('client extendedListFilter()', () => { it('should return the clients matching the filter with a limit of 20 rows', async() => { @@ -99,7 +99,7 @@ describe('client extendedListFilter()', () => { const randomIndex = Math.floor(Math.random() * result.length); const randomResultClient = result[randomIndex]; - + expect(result.length).toBeGreaterThanOrEqual(5); expect(randomResultClient.salesPersonFk).toEqual(salesPersonId); @@ -121,7 +121,7 @@ describe('client extendedListFilter()', () => { const result = await models.Client.extendedListFilter(ctx, filter, options); const firstClient = result[0]; - + expect(result.length).toEqual(1); expect(firstClient.name).toEqual('Max Eisenhardt'); @@ -138,15 +138,15 @@ describe('client extendedListFilter()', () => { try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {city: 'Silla'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {city: 'Gotham'}}; const filter = {}; const result = await models.Client.extendedListFilter(ctx, filter, options); const randomIndex = Math.floor(Math.random() * result.length); const randomResultClient = result[randomIndex]; - + expect(result.length).toBeGreaterThanOrEqual(20); - expect(randomResultClient.city.toLowerCase()).toEqual('silla'); + expect(randomResultClient.city.toLowerCase()).toEqual('gotham'); await tx.rollback(); } catch (e) { @@ -167,7 +167,7 @@ describe('client extendedListFilter()', () => { const randomIndex = Math.floor(Math.random() * result.length); const randomResultClient = result[randomIndex]; - + expect(result.length).toBeGreaterThanOrEqual(20); expect(randomResultClient.postcode).toEqual('46460'); diff --git a/modules/route/back/methods/route/specs/getDeliveryPoint.spec.js b/modules/route/back/methods/route/specs/getDeliveryPoint.spec.js index 4025b04d6..b08051c0a 100644 --- a/modules/route/back/methods/route/specs/getDeliveryPoint.spec.js +++ b/modules/route/back/methods/route/specs/getDeliveryPoint.spec.js @@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server'); describe('route getDeliveryPoint()', () => { const routeId = 1; - const deliveryPointAddress = '46460 Av Espioca 100-Silla'; + const deliveryPointAddress = '1007 Mountain Drive, Gotham'; it('should get the delivery point addres of a route with assigned vehicle', async() => { let route = await app.models.Route.findById(routeId);