describe('Item list', () => { beforeEach(() => { cy.login('buyer'); cy.visit(`/#/item/list`); }); it('should filter the items and redirect to the summary', () => { cy.selectOption('[data-cy="Category_select"]', 'Plant'); cy.selectOption('[data-cy="Type_select"]', 'Anthurium'); cy.get('td[data-row-index="0"][data-col-field="description"]') .should('exist') .click(); cy.url().should('include', '/summary'); }); it('should create an item', () => { const data = { 'Provisional name': { val: `Test item` }, Description: { val: `Test item` }, Type: { val: `Crisantemo`, type: 'select' }, Intrastat: { val: `Coral y materiales similares`, type: 'select' }, Origin: { val: `SPA`, type: 'select' }, }; cy.dataCy('vnTableCreateBtn').click(); cy.fillInForm(data); cy.dataCy('FormModelPopup_save').click(); cy.checkNotification('Data created'); cy.url().should('include', '/basic-data'); }); });