From e61196f8be3804e416249126e479cc6f9f319033 Mon Sep 17 00:00:00 2001 From: jtubau Date: Wed, 12 Mar 2025 09:29:00 +0100 Subject: [PATCH] refactor: refs #8440 update selector for delete note button in vehicle notes tests --- .../integration/route/vehicle/vehicleNotes.spec.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/cypress/integration/route/vehicle/vehicleNotes.spec.js b/test/cypress/integration/route/vehicle/vehicleNotes.spec.js index d6d13c863c..500c5997c4 100644 --- a/test/cypress/integration/route/vehicle/vehicleNotes.spec.js +++ b/test/cypress/integration/route/vehicle/vehicleNotes.spec.js @@ -2,7 +2,7 @@ describe('Vehicle Notes', () => { const selectors = { addNoteInput: 'Add note here..._input', saveNoteBtn: 'saveNote', - deleteNoteBtn: '[data-cy="notesRemoveNoteBtn"]', + deleteNoteBtn: 'notesRemoveNoteBtn', noteCard: '.column.full-width > :nth-child(1) > .q-card__section--vert', }; @@ -16,16 +16,13 @@ describe('Vehicle Notes', () => { }); it('Should add new note', () => { - cy.dataCy(selectors.addNoteInput) - .should('be.visible') - .click() - .type(newNoteText, { delay: 100 }); + cy.dataCy(selectors.addNoteInput).should('be.visible').type(newNoteText); cy.dataCy(selectors.saveNoteBtn).click(); cy.validateContent(selectors.noteCard, newNoteText); }); it('Should delete note', () => { - cy.get(selectors.deleteNoteBtn).first().click(); + cy.dataCy(selectors.deleteNoteBtn).first().click(); cy.get(selectors.noteCard).first().should('have.text', noteText); }); });