salix/e2e/paths/11-zone/02_descriptor.spec.js

33 lines
1007 B
JavaScript
Raw Normal View History

2020-05-20 14:34:53 +00:00
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Zone descriptor path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
2023-06-21 11:34:27 +00:00
await page.loginAndModule('deliveryAssistant', 'zone');
2020-08-14 13:35:50 +00:00
await page.accessToSearchResult('13');
2020-05-20 14:34:53 +00:00
});
afterAll(async() => {
await browser.close();
});
2020-08-14 13:35:50 +00:00
it('should eliminate the zone using the descriptor option', async() => {
await page.waitToClick(selectors.zoneDescriptor.menu);
await page.waitToClick(selectors.zoneDescriptor.deleteZone);
await page.respondToDialog('accept');
await page.waitForState('zone.index');
2020-05-20 14:34:53 +00:00
});
2020-08-14 13:35:50 +00:00
it('should search for the deleted zone to find no results', async() => {
await page.doSearch('13');
const count = await page.countElement(selectors.zoneIndex.searchResult);
2020-05-20 14:34:53 +00:00
2020-08-14 13:35:50 +00:00
expect(count).toEqual(0);
});
2020-05-20 14:34:53 +00:00
});