test: refs #8659 update AgencyWorkCenter spec to combine add, check, and remove work center scenarios
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jose Antonio Tubau 2025-03-07 13:40:33 +01:00
parent 08b802955c
commit 716a30aef2
1 changed files with 1 additions and 7 deletions

View File

@ -18,22 +18,16 @@ describe('AgencyWorkCenter', () => {
cy.visit(`/#/route/agency/11/workCenter`);
});
it('Should add work center', () => {
it('Should add work center, check already assigned and remove work center', () => {
cy.addBtnClick();
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
cy.dataCy(selectors.popupSave).click();
cy.checkNotification('Data created');
});
it('Should expect error when duplicate', () => {
cy.addBtnClick();
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
cy.dataCy(selectors.popupSave).click();
cy.checkNotification(messages.alreadyAssigned);
cy.dataCy(selectors.popupCancel).click();
});
it('Should remove work center', () => {
cy.dataCy(selectors.remove).click();
cy.checkNotification(messages.removed);
});