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

23 lines
714 B
JavaScript

import './commands';
describe('EntryDms', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
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');
cy.dataCy('recalc').should('be.enabled').click();
cy.get('.q-notification__message').should(
'have.text',
'The wastes were successfully recalculated',
);
});
});