describe('Item Request', () => { const rowIndex = 0; const itemFkField = `td[data-row-index="${rowIndex}"][data-col-field="itemFk"]`; const saleQuantityField = `td[data-row-index="${rowIndex}"][data-col-field="saleQuantity"]`; before(() => { cy.login('buyer'); cy.visit(`/#/item/request`); }); it('should fill the id and quantity then check the concept was updated', () => { cy.waitForElement('tbody'); cy.get(itemFkField).should('exist').click(); cy.get(`${itemFkField} input`).should('exist').type('4'); cy.get(saleQuantityField).should('exist').click(); cy.get(`${saleQuantityField} input`).should('exist').type('10{esc}'); cy.checkNotification('Data saved'); }); it('should now click on the second deny request icon then type the reason', () => { cy.selectOption('[data-cy="State_select"]', 'Pending'); cy.get('button[title="Discard"]').eq(0).click(); cy.dataCy('discardTextArea').should('exist').type('test{enter}'); cy.checkNotification('Data saved'); }); });