salix-front/test/cypress/integration/deliveryNote/deliveryNoteBasicData.spec.js

20 lines
788 B
JavaScript

/// <reference types="cypress" />
describe('DeliveryNote basic data', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/delivery-note/1/basic-data');
});
it('Should load layout', () => {
cy.get('.q-card').should('be.visible');
cy.dataCy('deliveryNote-amount').find('input').should('be.visible');
cy.dataCy('deliveryNote-amount').find('input').clear().type('500');
cy.get('.q-btn-group > .q-btn--standard').click();
cy.intercept('PATCH', '/api/DeliveryNotes/1', (req) => {
const { body } = req;
cy.wrap(body).should('have.property', 'amount', '500');
});
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
});