test: refs #8440 add Cypress integration tests for vehicle notes functionality
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
01af6e8c2d
commit
7670c24f04
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue