diff --git a/e2e/paths/11-zone/02_descriptor.spec.js b/e2e/paths/11-zone/02_descriptor.spec.js new file mode 100644 index 000000000..fab9b308b --- /dev/null +++ b/e2e/paths/11-zone/02_descriptor.spec.js @@ -0,0 +1,33 @@ +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'); + }); +});