26 lines
1021 B
JavaScript
26 lines
1021 B
JavaScript
|
/// <reference types="cypress" />
|
||
|
describe('TicketRequest', () => {
|
||
|
beforeEach(() => {
|
||
|
cy.login('developer');
|
||
|
cy.viewport(1920, 1080);
|
||
|
cy.visit('/#/ticket/31/observation');
|
||
|
});
|
||
|
|
||
|
it('Creates and deletes a note', () => {
|
||
|
cy.dataCy('ticketNotesAddNoteBtn').should('exist');
|
||
|
cy.dataCy('ticketNotesAddNoteBtn').click();
|
||
|
cy.dataCy('ticketNotesObservationType').should('exist');
|
||
|
cy.selectOption('[data-testid="ticketNotesObservationType"]:last', 'Weight');
|
||
|
cy.dataCy('ticketNotesDescription').should('exist');
|
||
|
cy.get('[data-testid="ticketNotesDescription"]:last').type(
|
||
|
'This is a note description'
|
||
|
);
|
||
|
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||
|
cy.checkNotification('Data saved');
|
||
|
cy.dataCy('ticketNotesRemoveNoteBtn').should('exist');
|
||
|
cy.dataCy('ticketNotesRemoveNoteBtn').click();
|
||
|
cy.dataCy('vnConfirmConfirmBtn').click();
|
||
|
cy.checkNotification('Data saved');
|
||
|
});
|
||
|
});
|