refactor: refs #8684 change beforeEach to before and remove async from test cases in itemRequest.spec.js
This commit is contained in:
parent
ac7c64d66d
commit
ce0936d11c
|
@ -3,12 +3,12 @@ describe('Item Request', () => {
|
||||||
const itemFkField = `td[data-row-index="${rowIndex}"][data-col-field="itemFk"]`;
|
const itemFkField = `td[data-row-index="${rowIndex}"][data-col-field="itemFk"]`;
|
||||||
const saleQuantityField = `td[data-row-index="${rowIndex}"][data-col-field="saleQuantity"]`;
|
const saleQuantityField = `td[data-row-index="${rowIndex}"][data-col-field="saleQuantity"]`;
|
||||||
|
|
||||||
beforeEach(() => {
|
before(() => {
|
||||||
cy.login('buyer');
|
cy.login('buyer');
|
||||||
cy.visit(`/#/item/request`);
|
cy.visit(`/#/item/request`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fill the id and quantity then check the concept was updated', async () => {
|
it('should fill the id and quantity then check the concept was updated', () => {
|
||||||
cy.waitForElement('tbody');
|
cy.waitForElement('tbody');
|
||||||
cy.get(itemFkField).should('exist').click();
|
cy.get(itemFkField).should('exist').click();
|
||||||
cy.get(`${itemFkField} input`).should('exist').type('4');
|
cy.get(`${itemFkField} input`).should('exist').type('4');
|
||||||
|
@ -17,7 +17,7 @@ describe('Item Request', () => {
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now click on the second deny request icon then type the reason', async () => {
|
it('should now click on the second deny request icon then type the reason', () => {
|
||||||
cy.selectOption('[data-cy="State_select"]', 'Pending');
|
cy.selectOption('[data-cy="State_select"]', 'Pending');
|
||||||
cy.get('button[title="Discard"]').eq(0).click();
|
cy.get('button[title="Discard"]').eq(0).click();
|
||||||
cy.dataCy('discardTextArea').should('exist').type('test{enter}');
|
cy.dataCy('discardTextArea').should('exist').type('test{enter}');
|
||||||
|
|
Loading…
Reference in New Issue