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

22 lines
688 B
JavaScript

import './commands';
describe('EntryDms', () => {
beforeEach(() => {
cy.login('buyerBoss');
cy.visit(`/#/entry/waste-recalc`);
});
it('should recalc waste for today', () => {
cy.waitForElement('[data-cy="wasteRecalc"]');
cy.dataCy('recalc').should('be.disabled');
cy.dataCy('dateFrom').should('be.visible').click().type('01-01-2001');
cy.dataCy('dateTo').should('be.visible').click().type('01-01-2001{enter}');
cy.dataCy('recalc').should('be.enabled').click();
cy.get('.q-notification__message').should(
'have.text',
'The wastes were successfully recalculated',
);
});
});