26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
/// <reference types="cypress" />
|
|
describe('ClaimLines', () => {
|
|
const claimId = 1;
|
|
|
|
beforeEach(() => {
|
|
cy.viewport(1920, 1080);
|
|
cy.login('developer');
|
|
cy.visit(`/#/claim/${claimId}/lines`);
|
|
});
|
|
|
|
it('should add new line', () => {
|
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
|
cy.get('.q-card > .q-table__container > .q-table__middle > .q-table > thead > tr > .q-table--col-auto-width > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg').click();
|
|
cy.get('.q-card__actions > .q-btn--unelevated').click();
|
|
cy.get('.q-notification__message').should('have.text', 'Lines added to claim');
|
|
})
|
|
|
|
it('should autofill claimed quantity if 0 or null', () => {
|
|
cy.get('thead > tr > .q-table--col-auto-width > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg').click();
|
|
cy.get('.q-btn--unelevated').click();
|
|
cy.checkNotification('Quantities filled automatically');
|
|
cy.get('.q-btn--unelevated').click();
|
|
cy.checkNotification('No quantities to fill');
|
|
})
|
|
});
|