e2e path updated for clonation
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e6106b1aa9
commit
68f2976c2d
|
@ -674,7 +674,14 @@ export default {
|
|||
confirmButton: '.vn-confirm.shown button[response="accept"]',
|
||||
},
|
||||
routeIndex: {
|
||||
addNewRouteButton: 'vn-route-index a[ui-sref="route.create"]'
|
||||
anyResult: 'vn-table a',
|
||||
firstRouteCheckbox: 'a:nth-child(1) vn-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]',
|
||||
},
|
||||
createRouteView: {
|
||||
worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]',
|
||||
|
|
|
@ -57,5 +57,26 @@ describe('Route create path', () => {
|
|||
it(`should confirm the redirection to the created route summary`, async() => {
|
||||
await page.waitForState('route.card.summary');
|
||||
});
|
||||
|
||||
it(`should navigate back to the route index`, async() => {
|
||||
await page.waitToClick(selectors.globalItems.returnToModuleIndexButton);
|
||||
await page.waitForState('route.index');
|
||||
});
|
||||
|
||||
it(`should clone the first route`, async() => {
|
||||
await page.waitToClick(selectors.routeIndex.firstRouteCheckbox);
|
||||
await page.waitToClick(selectors.routeIndex.cloneButton);
|
||||
await page.waitToClick(selectors.routeIndex.submitClonationButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it(`should search for the agency of the cloned routes and find two results`, async() => {
|
||||
await page.waitToClick(selectors.routeIndex.openAdvancedSearchButton);
|
||||
await page.autocompleteSearch(selectors.routeIndex.searchAgencyAutocomlete, 'inhouse pickup');
|
||||
await page.waitToClick(selectors.routeIndex.advancedSearchButton);
|
||||
await page.waitForNumberOfElements(selectors.routeIndex.anyResult, 2);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue