refactor: refs #8440 update selector for delete note button in vehicle notes tests
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
a703f9dac6
commit
e61196f8be
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue