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
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
08b802955c
commit
716a30aef2
|
@ -18,22 +18,16 @@ describe('AgencyWorkCenter', () => {
|
||||||
cy.visit(`/#/route/agency/11/workCenter`);
|
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.addBtnClick();
|
||||||
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
|
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
|
||||||
cy.dataCy(selectors.popupSave).click();
|
cy.dataCy(selectors.popupSave).click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
});
|
|
||||||
|
|
||||||
it('Should expect error when duplicate', () => {
|
|
||||||
cy.addBtnClick();
|
cy.addBtnClick();
|
||||||
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
|
cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne');
|
||||||
cy.dataCy(selectors.popupSave).click();
|
cy.dataCy(selectors.popupSave).click();
|
||||||
cy.checkNotification(messages.alreadyAssigned);
|
cy.checkNotification(messages.alreadyAssigned);
|
||||||
cy.dataCy(selectors.popupCancel).click();
|
cy.dataCy(selectors.popupCancel).click();
|
||||||
});
|
|
||||||
|
|
||||||
it('Should remove work center', () => {
|
|
||||||
cy.dataCy(selectors.remove).click();
|
cy.dataCy(selectors.remove).click();
|
||||||
cy.checkNotification(messages.removed);
|
cy.checkNotification(messages.removed);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue