salix-front/test/cypress/integration/entry/entryStockBought.spec.js

24 lines
978 B
JavaScript

describe('EntryStockBought', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('buyer');
cy.visit(`/#/entry/stock-Bought`);
});
it('Should edit the reserved space adjust the purchased spaces and check detail', () => {
cy.get('[data-cy="edit-travel"]').should('be.visible').click();
cy.get('input[aria-label="m3"]').clear().type('60');
cy.get('[data-cy="FormModelPopup_save"]').click();
cy.get('.vn-row > div > :nth-child(2)').should('have.text', '60');
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
cy.get('[data-col-field="reserve"][data-row-index="0"]').click();
cy.get('input[name="reserve"]').type('10{enter}');
cy.get('button[title="Save"]').click();
cy.checkNotification('Data saved');
cy.get('[data-cy="searchBtn"]').eq(0).click();
cy.get('tBody > tr').eq(1).its('length').should('eq', 1);
});
});