Updated e2e tests
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
This commit is contained in:
parent
2a758fd12a
commit
2381a5d09a
|
@ -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"]',
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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!');
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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() => {
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue