refactor(e2e): waitForTimeouts needed for descriptors more menu

This commit is contained in:
Carlos Jimenez Ruiz 2021-10-14 16:20:49 +02:00
parent b81d6b022c
commit 946151c966
10 changed files with 19 additions and 0 deletions

View File

@ -107,6 +107,7 @@ describe('Item regularize path', () => {
});
it('should regularize the item once more', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.itemDescriptor.moreMenu);
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
await page.write(selectors.itemDescriptor.regularizeQuantity, '100');

View File

@ -28,6 +28,7 @@ describe('Ticket descriptor path', () => {
});
it('should add the ticket to thursday turn using the descriptor more menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn);
await page.waitToClick(selectors.ticketDescriptor.thursdayButton);
@ -63,6 +64,7 @@ describe('Ticket descriptor path', () => {
});
it('should add the ticket to saturday turn using the descriptor more menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn);
await page.waitToClick(selectors.ticketDescriptor.saturdayButton);

View File

@ -22,6 +22,7 @@ describe('Ticket descriptor path', () => {
});
it(`should update the shipped hour using the descriptor menu`, async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuChangeShippedHour);
await page.pickTime(selectors.ticketDescriptor.changeShippedHour, '08:15');
@ -65,6 +66,7 @@ describe('Ticket descriptor path', () => {
describe('Restore ticket', () => {
it('should restore the ticket using the descriptor menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuRestoreTicket);
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
@ -82,6 +84,7 @@ describe('Ticket descriptor path', () => {
});
it('should open the add stowaway dialog', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitForFunction(() => {
let element = document.querySelector('vn-ticket-descriptor-menu');
return element.$ctrl.canShowStowaway === true;
@ -114,6 +117,7 @@ describe('Ticket descriptor path', () => {
});
it('should delete the stowaway', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteStowawayButton);
@ -176,6 +180,7 @@ describe('Ticket descriptor path', () => {
describe('SMS', () => {
it('should send the payment SMS using the descriptor menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuPaymentSMS);

View File

@ -62,6 +62,7 @@ describe('Ticket create path', () => {
});
it('should make the previously created ticket the stowaway of the current ticket', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway);
await page.waitToClick(selectors.ticketDescriptor.addStowawayDialogFirstTicket);

View File

@ -17,6 +17,7 @@ describe('Ticket create from client path', () => {
});
it('should click the create simple ticket on the descriptor menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.clientDescriptor.moreMenu);
await page.waitToClick(selectors.clientDescriptor.simpleTicketButton);
await page.waitForState('ticket.create');

View File

@ -18,6 +18,7 @@ describe('InvoiceIn descriptor path', () => {
});
it('should clone the invoiceIn using the descriptor more menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.invoiceInDescriptor.moreMenu);
await page.waitToClick(selectors.invoiceInDescriptor.moreMenuCloneInvoiceIn);
await page.waitToClick(selectors.invoiceInDescriptor.acceptButton);
@ -31,6 +32,7 @@ describe('InvoiceIn descriptor path', () => {
});
it('should delete the cloned invoiceIn using the descriptor more menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.invoiceInDescriptor.moreMenu);
await page.waitToClick(selectors.invoiceInDescriptor.moreMenuDeleteInvoiceIn);
await page.waitToClick(selectors.invoiceInDescriptor.acceptButton);

View File

@ -16,6 +16,7 @@ describe('InvoiceOut manual invoice path', () => {
});
it('should open the manual invoice form', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.invoiceOutIndex.createInvoice);
await page.waitToClick(selectors.invoiceOutIndex.createManualInvoice);
await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm);
@ -44,6 +45,7 @@ describe('InvoiceOut manual invoice path', () => {
});
it('should now open the manual invoice form', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.invoiceOutIndex.createInvoice);
await page.waitToClick(selectors.invoiceOutIndex.createManualInvoice);
await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm);

View File

@ -34,6 +34,7 @@ describe('Travel descriptor path', () => {
});
it('should be redirected to the create entry view', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuAddEntry);
await page.waitForState('entry.create');
@ -89,6 +90,7 @@ describe('Travel descriptor path', () => {
});
it('should be redirected to the create travel when using the clone option of the dot menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuClone);
await page.respondToDialog('accept');
@ -114,6 +116,7 @@ describe('Travel descriptor path', () => {
});
it('should atempt to clone the travel and its entries using the descriptor menu but receive an error', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
await page.waitToClick(selectors.travelDescriptor.acceptClonation);

View File

@ -17,6 +17,7 @@ describe('Zone descriptor path', () => {
});
it('should eliminate the zone using the descriptor option', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.zoneDescriptor.menu);
await page.waitToClick(selectors.zoneDescriptor.deleteZone);
await page.respondToDialog('accept');

View File

@ -91,6 +91,7 @@ describe('Account create and basic data path', () => {
});
it('should activate the account using the descriptor menu', async() => {
await page.waitForTimeout(1000); // initialization of functionality takes about 100ms to work
await page.waitToClick(selectors.accountDescriptor.menuButton);
await page.waitToClick(selectors.accountDescriptor.activateAccount);
await page.waitToClick(selectors.accountDescriptor.acceptButton);