34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
|
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;
|
||
|
await page.loginAndModule('deliveryBoss', 'zone');
|
||
|
await page.accessToSearchResult('10');
|
||
|
await page.accessToSection('zone.card.basicData');
|
||
|
});
|
||
|
|
||
|
afterAll(async() => {
|
||
|
await browser.close();
|
||
|
});
|
||
|
|
||
|
it('should reach the basic data section', async() => {
|
||
|
await page.waitForState('zone.card.basicData');
|
||
|
});
|
||
|
|
||
|
it('should edit de form and then save', async() => {
|
||
|
await page.clearInput(selectors.zoneBasicData.name);
|
||
|
await page.write(selectors.zoneBasicData.name, 'Brimstone teleportation');
|
||
|
await page.autocompleteSearch(selectors.zoneBasicData.agency, 'Quantum break device');
|
||
|
await page.write(selectors.zoneBasicData.maxVolume, '10');
|
||
|
const message = await page.waitForSnackbar();
|
||
|
|
||
|
expect(message.type).toBe('success');
|
||
|
});
|
||
|
});
|