diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 0cee79405..2ac6f4223 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -208,7 +208,7 @@ export default { createItemButton: `vn-float-button`, firstSearchResult: 'vn-item-index a:nth-child(1)', searchResult: 'vn-item-index a.vn-tr', - searchResultPreviewButton: 'vn-item-index .buttons > [icon="desktop_windows"]', + searchResultPreviewButton: 'vn-item-index vn-tbody > :nth-child(1) .buttons > [icon="desktop_windows"]', searchResultCloneButton: 'vn-item-index .buttons > [icon="icon-clone"]', acceptClonationAlertButton: '.vn-confirm.shown [response="accept"]', topbarSearch: 'vn-topbar', diff --git a/e2e/paths/04-item/09_regularize.spec.js b/e2e/paths/04-item/09_regularize.spec.js index 838b24cf0..18f182e74 100644 --- a/e2e/paths/04-item/09_regularize.spec.js +++ b/e2e/paths/04-item/09_regularize.spec.js @@ -78,7 +78,6 @@ describe('Item regularize path', () => { }); it('should search for the ticket with alias missing', async() => { - await page.accessToSearchResult('Carol Danvers'); await page.keyboard.press('Escape'); await page.accessToSearchResult('missing'); let url = await page.expectURL('/summary'); diff --git a/e2e/paths/09-invoice-out/02_descriptor.spec.js b/e2e/paths/09-invoice-out/02_descriptor.spec.js index e70c39ded..1290b9a88 100644 --- a/e2e/paths/09-invoice-out/02_descriptor.spec.js +++ b/e2e/paths/09-invoice-out/02_descriptor.spec.js @@ -20,10 +20,9 @@ describe('InvoiceOut descriptor path', () => { await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton); await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222'); await page.waitToClick(selectors.ticketsIndex.advancedSearchButton); - await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1); - const result = await page.countElement(selectors.ticketsIndex.searchResult); + let url = await page.expectURL('#!/ticket/3/summary'); - expect(result).toEqual(1); + expect(url).toEqual(true); }); it('should navigate to the invoiceOut index', async() => { @@ -36,15 +35,6 @@ describe('InvoiceOut descriptor path', () => { expect(url).toBe(true); }); - it('should search for the target invoiceOut', async() => { - await page.write(selectors.invoiceOutIndex.topbarSearch, 'T2222222'); - await page.waitToClick(selectors.invoiceOutIndex.searchButton); - await page.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 1); - const result = await page.countElement(selectors.invoiceOutIndex.searchResult); - - expect(result).toEqual(1); - }); - it(`should click on the search result to access to the invoiceOut summary`, async() => { await page.accessToSearchResult('T2222222'); let url = await page.expectURL('/summary');