import selectors from '../../helpers/selectors.js'; import getBrowser from '../../helpers/puppeteer'; describe('Ticket log path', () => { let browser; let page; const ticketId = '5'; beforeAll(async() => { browser = await getBrowser(); page = browser.page; }); afterAll(async() => { await browser.close(); }); it('should navigate to the target ticket notes section', async() => { await page.loginAndModule('employee', 'ticket'); await page.accessToSearchResult(ticketId); await page.accessToSection('ticket.card.observation'); await page.waitForState('ticket.card.observation'); }); it('should create a new note for the test', async() => { await page.waitToClick(selectors.ticketNotes.addNoteButton); await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'ItemPicker'); await page.write(selectors.ticketNotes.firstDescription, 'description'); await page.waitToClick(selectors.ticketNotes.submitNotesButton); const message = await page.waitForSnackbar(); expect(message.text).toContain('Data saved!'); }); });