added waitForTimeout to e2e for the autocompleted fields

This commit is contained in:
Carlos Jimenez Ruiz 2021-06-08 09:34:49 +02:00
parent 3f74b52049
commit d164cb1c2c
1 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,8 @@ describe('Travel create path', () => {
it('should fill the reference, agency and ship date then save the form', async() => { it('should fill the reference, agency and ship date then save the form', async() => {
await page.write(selectors.travelIndex.reference, 'Testing reference'); await page.write(selectors.travelIndex.reference, 'Testing reference');
await page.autocompleteSearch(selectors.travelIndex.agency, 'inhouse pickup'); await page.autocompleteSearch(selectors.travelIndex.agency, 'inhouse pickup');
await page.pickDate(selectors.travelIndex.shipDate, date); await page.pickDate(selectors.travelIndex.shipDate, date); // this line autocompletes another 3 fields
await page.waitForTimeout(1000);
await page.waitToClick(selectors.travelIndex.save); await page.waitToClick(selectors.travelIndex.save);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
@ -35,8 +36,6 @@ describe('Travel create path', () => {
}); });
it('should check the user was redirected to the travel basic data upon creation', async() => { it('should check the user was redirected to the travel basic data upon creation', async() => {
// backup code for further intermitences still on track.
// await page.screenshot({path: 'e2e/paths/10-travel/error.jpeg', type: 'jpeg'});
await page.waitForState('travel.card.basicData'); await page.waitForState('travel.card.basicData');
}); });