diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 37f7308a58..ea62483b6f 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -835,14 +835,16 @@ export default { confirmButton: '.vn-confirm.shown button[response="accept"]', }, routeIndex: { - anyResult: 'vn-table a', - firstRouteCheckbox: 'a:nth-child(1) vn-td:nth-child(1) > vn-check', + anyResult: 'vn-route-index tbody > tr', + firstRouteCheckbox: 'vn-route-index tbody > tr:nth-child(1) > td:nth-child(1) > vn-check', addNewRouteButton: 'vn-route-index a[ui-sref="route.create"]', cloneButton: 'vn-route-index button > vn-icon[icon="icon-clone"]', submitClonationButton: 'tpl-buttons > button[response="accept"]', openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', searchAgencyAutocomlete: 'vn-route-search-panel vn-autocomplete[ng-model="filter.agencyModeFk"]', advancedSearchButton: 'vn-route-search-panel button[type=submit]', + previewButton: 'vn-route-index tbody > tr:nth-child(7) > td:nth-child(11) > vn-icon-button[icon="preview"]', + }, createRouteView: { worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]', @@ -862,6 +864,8 @@ export default { firstTicketDescriptor: '.vn-popover.shown vn-ticket-descriptor', firstAlias: 'vn-route-summary vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(3) > span', firstClientDescriptor: '.vn-popover.shown vn-client-descriptor', + goToRouteSummaryButton: 'vn-route-summary > vn-card > h5 > a', + }, routeBasicData: { worker: 'vn-route-basic-data vn-autocomplete[ng-model="$ctrl.route.workerFk"]', diff --git a/e2e/paths/08-route/01_summary.spec.js b/e2e/paths/08-route/01_summary.spec.js index b6052dff63..38d81759b6 100644 --- a/e2e/paths/08-route/01_summary.spec.js +++ b/e2e/paths/08-route/01_summary.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import getBrowser from '../../helpers/puppeteer'; -describe('Route summary path', () => { +fdescribe('Route summary path', () => { let browser; let page; @@ -9,7 +9,8 @@ describe('Route summary path', () => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('employee', 'route'); - await page.waitToClick('vn-route-index vn-tbody > a:nth-child(7)'); + await page.waitToClick(selectors.routeIndex.previewButton); + await page.waitToClick(selectors.routeSummary.goToRouteSummaryButton); }); afterAll(async() => { @@ -34,6 +35,7 @@ describe('Route summary path', () => { }); it('should click on the first ticket ID making the descriptor popover visible', async() => { + await page.waitForState('route.card.summary'); await page.waitToClick(selectors.routeSummary.firstTicketID); await page.waitForSelector(selectors.routeSummary.firstTicketDescriptor); const visible = await page.isVisible(selectors.routeSummary.firstTicketDescriptor);