diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 33eecc627..64da72607 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -894,6 +894,7 @@ export default { header: 'vn-entry-summary > vn-card > h5', reference: 'vn-entry-summary vn-label-value[label="Reference"]', confirmed: 'vn-entry-summary vn-check[label="Confirmed"]', + anyBuyLine: 'vn-entry-summary tr.dark-row' }, entryDescriptor: { agency: 'vn-entry-descriptor div.body vn-label-value:nth-child(1) span', diff --git a/e2e/paths/12-entry/01_summary.spec.js b/e2e/paths/12-entry/01_summary.spec.js index e57654f94..a6ac8dab1 100644 --- a/e2e/paths/12-entry/01_summary.spec.js +++ b/e2e/paths/12-entry/01_summary.spec.js @@ -9,7 +9,7 @@ describe('Entry summary path', () => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('buyer', 'entry'); - await page.waitToClick('vn-entry-index vn-tbody > a:nth-child(2)'); + await page.accessToSearchResult('4'); }); afterAll(async() => { @@ -30,7 +30,7 @@ describe('Entry summary path', () => { it('should display some entry details like the reference', async() => { const result = await page.waitToGetProperty(selectors.entrySummary.reference, 'innerText'); - expect(result).toContain('Movement 2'); + expect(result).toContain('Movement 4'); }); it('should display other entry details like the confirmed', async() => { @@ -38,4 +38,10 @@ describe('Entry summary path', () => { expect(result).toContain('unchecked'); }); + + it('should display all buys for the entry', async() => { + const result = await page.countElement(selectors.entrySummary.anyBuyLine); + + expect(result).toEqual(4); + }); });