0
0
Fork 0
salix-front-mindshore-fork2/test/cypress/integration/route/agency/agencyWorkCenter.spec.js

27 lines
988 B
JavaScript

describe('AgencyWorkCenter', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/agency/11/workCenter`);
});
const createButton = '.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon';
const workCenterCombobox = 'input[role="combobox"]';
it('check workCenter crud', () => {
// create
cy.get(createButton).click();
cy.get(workCenterCombobox).type('workCenterOne{enter}');
cy.checkNotification('created');
// expect error when duplicate
cy.get(createButton).click();
cy.get('[data-cy="FormModelPopup_save"]').click();
cy.checkNotification('This workCenter is already assigned to this agency');
cy.get('[data-cy="FormModelPopup_cancel"]').click();
// delete
cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
cy.checkNotification('WorkCenter removed successfully');
});
});