27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
describe('Vehicle', () => {
|
|
|
|
beforeEach(() => {
|
|
cy.viewport(1920, 1080);
|
|
cy.login('deliveryAssistant');
|
|
cy.visit(`/#/route/vehicle/3/events`);
|
|
});
|
|
|
|
it('should add, edit and delete a vehicle event', () => {
|
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
|
cy.dataCy('Started_inputDate').type('01/01/2001');
|
|
cy.dataCy('Finished_inputDate').type('08/02/2001');
|
|
cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test');
|
|
cy.selectOption('[data-cy="State_input"]', 3);
|
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
|
|
|
cy.get('.q-current-day > .q-calendar-month__day--content > .q-btn').click();
|
|
cy.dataCy('Started_inputDate').clear().type('03/02/2001');
|
|
cy.dataCy('Finished_inputDate').clear().type('15/03/2001');
|
|
cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test2');
|
|
cy.selectOption('[data-cy="State_input"]', 5);
|
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
|
|
|
cy.dataCy('delete_event').eq(0).click();
|
|
cy.dataCy('VnConfirm_confirm').click();
|
|
});
|
|
}); |