salix-front/test/cypress/integration/ticket/ticketService.spec.js

27 lines
1.0 KiB
JavaScript

/// <reference types="cypress" />
describe('TicketService', () => {
beforeEach(() => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/service');
});
it('Add and remove service', () => {
cy.get('.q-page').should('be.visible');
cy.addBtnClick();
cy.get('[data-cy="Description_icon"]').click();
cy.get('[data-cy="Description_input"]').clear();
cy.get('[data-cy="Description_input"]').type('test');
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
cy.selectOption('[data-cy="Description_select"]', 'test');
cy.get('[data-cy="Quantity_input"]').clear('1');
cy.get('[data-cy="Quantity_input"]').type('1');
cy.get('[data-cy="Price_input"]').clear('2');
cy.get('[data-cy="Price_input"]').type('2');
cy.get('[data-cy="crudModelDefaultSaveBtn"] > .q-btn__content > .block').click();
cy.checkNotification('Data saved');
cy.get(':nth-child(5) > .q-icon').click();
});
});