8440-createVehicleNotes #1638

Merged
jtubau merged 32 commits from 8440-createVehicleNotes into dev 2025-03-31 09:01:36 +00:00
1 changed files with 28 additions and 0 deletions
Showing only changes of commit 7670c24f04 - Show all commits

View File

@ -0,0 +1,28 @@
describe('Vehicle Notes', () => {
const selectors = {
addNoteInput: 'Add note here..._input',
saveNoteBtn: 'saveNote',
deleteNoteBtn: '[data-cy="notesRemoveNoteBtn"]',
noteCard: '.column.full-width > :nth-child(1) > .q-card__section--vert',
};
const noteText = 'Golpe parachoques trasero';
const newNoteText = 'probando';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/vehicle/1/notes`);
});
it('Should add new note', () => {
cy.dataCy(selectors.addNoteInput).click().type(newNoteText);
cy.dataCy(selectors.saveNoteBtn).click();
cy.validateContent(selectors.noteCard, newNoteText);
});
it('Should delete note', () => {
cy.get(selectors.deleteNoteBtn).first().click();
cy.get(selectors.noteCard).first().should('have.text', noteText);
});
});