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 = {
|
const selectors = {
|
||||||
addNoteInput: 'Add note here..._input',
|
addNoteInput: 'Add note here..._input',
|
||||||
saveNoteBtn: 'saveNote',
|
saveNoteBtn: 'saveNote',
|
||||||
deleteNoteBtn: '[data-cy="notesRemoveNoteBtn"]',
|
deleteNoteBtn: 'notesRemoveNoteBtn',
|
||||||
noteCard: '.column.full-width > :nth-child(1) > .q-card__section--vert',
|
noteCard: '.column.full-width > :nth-child(1) > .q-card__section--vert',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,16 +16,13 @@ describe('Vehicle Notes', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should add new note', () => {
|
it('Should add new note', () => {
|
||||||
cy.dataCy(selectors.addNoteInput)
|
cy.dataCy(selectors.addNoteInput).should('be.visible').type(newNoteText);
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
.type(newNoteText, { delay: 100 });
|
|
||||||
cy.dataCy(selectors.saveNoteBtn).click();
|
cy.dataCy(selectors.saveNoteBtn).click();
|
||||||
cy.validateContent(selectors.noteCard, newNoteText);
|
cy.validateContent(selectors.noteCard, newNoteText);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should delete note', () => {
|
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);
|
cy.get(selectors.noteCard).first().should('have.text', noteText);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue