removed unwanted waitForTimeout calls
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-08-11 13:37:24 +02:00
parent 1274fef983
commit 73492190f7
1 changed files with 2 additions and 5 deletions

View File

@ -10,7 +10,7 @@ describe('InvoiceOut global invoice path', () => {
page = browser.page;
await page.loginAndModule('administrative', 'invoiceOut');
await page.waitToClick('[icon="search"]');
await page.waitForTimeout(1000);
await page.waitForTimeout(1000); // index search needs time to return results
});
afterAll(async() => {
@ -33,11 +33,8 @@ describe('InvoiceOut global invoice path', () => {
it('should create a global invoice for charles xavier today', async() => {
await page.pickDate(selectors.invoiceOutIndex.globalInvoiceDate);
await page.waitForTimeout(1000);
await page.autocompleteSearch(selectors.invoiceOutIndex.globalInvoiceFromClient, 'Petter Parker');
await page.waitForTimeout(1000);
await page.autocompleteSearch(selectors.invoiceOutIndex.globalInvoiceToClient, 'Petter Parker');
await page.waitForTimeout(1000);
await page.waitToClick(selectors.invoiceOutIndex.saveInvoice);
const message = await page.waitForSnackbar();
@ -46,7 +43,7 @@ describe('InvoiceOut global invoice path', () => {
it('should count the amount of invoices listed after globla invocing', async() => {
await page.waitToClick('[icon="search"]');
await page.waitForTimeout(1000);
await page.waitForTimeout(1000); // index search needs time to return results
const currentInvoices = await page.countElement(selectors.invoiceOutIndex.searchResult);
expect(currentInvoices).toBeGreaterThan(invoicesBefore);