#7119 add VehicleList page and routing configuration #1129

Merged
jorgep merged 71 commits from 7119-createVehicle into dev 2025-02-06 09:24:16 +00:00
1 changed files with 12 additions and 4 deletions
Showing only changes of commit 2ee2002876 - Show all commits

View File

@ -1,5 +1,6 @@
describe('ZoneBasicData', () => {
const priceBasicData = '[data-cy="Price_input"]';
const saveBtn = '.q-btn-group > .q-btn--standard';
beforeEach(() => {
cy.viewport(1280, 720);
@ -8,20 +9,27 @@ describe('ZoneBasicData', () => {
});
it('should throw an error if the name is empty', () => {
cy.get('[data-cy="zone-basic-data-name"] input').type('{selectall}{backspace}');
cy.get('.q-btn-group > .q-btn--standard').click();
cy.intercept('GET', /\/api\/Zones\/4./).as('zone');
cy.wait('@zone').then(() => {
cy.get('[data-cy="zone-basic-data-name"] input').type(
'{selectall}{backspace}',
);
});
cy.get(saveBtn).click();
cy.checkNotification("can't be blank");
});
it('should throw an error if the price is empty', () => {
cy.get(priceBasicData).clear();
cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(saveBtn).click();
cy.checkNotification('cannot be blank');
});
it("should edit the basicData's zone", () => {
cy.get('.q-card > :nth-child(1)').type(' modified');
cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(saveBtn).click();
cy.checkNotification('Data saved');
});
});