E2E fixes: waitForContentLoaded() extension
gitea/salix/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Juan Ferrer 2020-03-31 15:30:57 +02:00
parent 5d1e0ee682
commit 7cd643c8c7
7 changed files with 8 additions and 12 deletions

View File

@ -551,7 +551,7 @@ let actions = {
},
waitForContentLoaded: async function() {
// await this.waitFor(250);
await this.waitForSpinnerLoad();
}
};

View File

@ -16,7 +16,6 @@ describe('User config', () => {
describe('as salesPerson', () => {
it('should login', async() => {
await page.login('salesPerson');
await page.waitForContentLoaded();
});
it('should now open the user config form to check the settings', async() => {
@ -26,7 +25,6 @@ describe('User config', () => {
let expectedLocalWarehouse = await page
.expectPropertyValue(selectors.globalItems.userLocalWarehouse, 'value', '');
let expectedLocalBank = await page
.expectPropertyValue(selectors.globalItems.userLocalBank, 'value', '');
@ -50,7 +48,6 @@ describe('User config', () => {
describe('as employee', () => {
it('should log in', async() => {
await page.login('employee');
await page.waitForContentLoaded();
});
it('should open the user config form to check the settings', async() => {
@ -59,7 +56,6 @@ describe('User config', () => {
let expectedLocalWarehouse = await page
.expectPropertyValue(selectors.globalItems.userLocalWarehouse, 'value', '');
let expectedLocalBank = await page
.expectPropertyValue(selectors.globalItems.userLocalBank, 'value', '');
@ -92,7 +88,6 @@ describe('User config', () => {
describe('as salesPerson 2nd run', () => {
it('should log in once more', async() => {
await page.login('salesPerson');
await page.waitForContentLoaded();
});
it('should again open the user config form to check the local settings', async() => {

View File

@ -65,8 +65,8 @@ describe('Item regularize path', () => {
});
it('should clear the user local settings now', async() => {
await page.waitForContentLoaded();
await page.waitToClick(selectors.globalItems.userMenuButton);
await page.waitForContentLoaded();
await page.clearInput(selectors.globalItems.userConfigFirstAutocomplete);
const result = await page.waitForLastSnackbar();

View File

@ -99,8 +99,8 @@ describe('Ticket descriptor path', () => {
});
it('should delete the stowaway', async() => {
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteStowawayButton);
await page.waitToClick(selectors.ticketDescriptor.acceptDeleteStowawayButton);
const result = await page.waitForLastSnackbar();
@ -130,8 +130,8 @@ describe('Ticket descriptor path', () => {
});
it('should invoice the ticket using the descriptor more menu', async() => {
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
await page.waitForContentLoaded();
await page.waitToClick(selectors.ticketDescriptor.moreMenuMakeInvoice);
await page.waitToClick(selectors.ticketDescriptor.acceptInvoiceOutButton);
const result = await page.waitForLastSnackbar();

View File

@ -25,7 +25,10 @@ describe('Claim action path', () => {
});
it('should import the second importable ticket', async() => {
await page.waitFor(3000); // the animation adding the header element for the claimed total obscures somehow other elements for about 2 seconds
// the animation adding the header element for the claimed total
// obscures somehow other elements for about 2 seconds
await page.waitFor(3000);
await page.waitToClick(selectors.claimAction.importTicketButton);
await page.waitToClick(selectors.claimAction.secondImportableTicket);
const result = await page.waitForLastSnackbar();

View File

@ -17,7 +17,6 @@ describe('Route create path', () => {
describe('as employee', () => {
it('should click on the add new route button and open the creation form', async() => {
await page.waitForContentLoaded();
await page.waitToClick(selectors.routeIndex.addNewRouteButton);
await page.waitForState('route.create');
});

View File

@ -78,7 +78,6 @@ describe('InvoiceOut descriptor path', () => {
});
it('should now navigate to the invoiceOut index', async() => {
await page.waitForContentLoaded();
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
await page.wait(selectors.globalItems.applicationsMenuVisible);
await page.waitToClick(selectors.globalItems.invoiceOutButton);