Update TPA Recal Modal Tests
This commit is contained in:
parent
1519e609ba
commit
c84c31ed3d
1 changed files with 12 additions and 2 deletions
|
|
@ -38,16 +38,26 @@ describe('tpa-Recal-Modal.vue', () => {
|
||||||
test('should show error if not acknowledged', () => {
|
test('should show error if not acknowledged', () => {
|
||||||
const { wrapper } = setupMocks();
|
const { wrapper } = setupMocks();
|
||||||
wrapper.vm.acknowledged = false;
|
wrapper.vm.acknowledged = false;
|
||||||
|
wrapper.vm.tpaRecalAnswer = 'TPAOption';
|
||||||
wrapper.vm.footerButtonClick();
|
wrapper.vm.footerButtonClick();
|
||||||
|
|
||||||
expect(wrapper.vm.showError).toBeTruthy();
|
expect(wrapper.vm.showAcknowledgementError).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should not show error if acknowledged', () => {
|
test('should not show error if acknowledged', () => {
|
||||||
const { wrapper } = setupMocks();
|
const { wrapper } = setupMocks();
|
||||||
wrapper.vm.acknowledged = true;
|
wrapper.vm.acknowledged = true;
|
||||||
|
wrapper.vm.tpaRecalAnswer = 'TPAOption';
|
||||||
wrapper.vm.footerButtonClick();
|
wrapper.vm.footerButtonClick();
|
||||||
|
|
||||||
expect(wrapper.vm.showError).toBeFalsy();
|
expect(wrapper.vm.showAcknowledgementError).toBeFalsy();
|
||||||
|
});
|
||||||
|
test('should show error if no answer selected', () => {
|
||||||
|
const { wrapper } = setupMocks();
|
||||||
|
wrapper.vm.tpaRecalAnswer = '';
|
||||||
|
wrapper.vm.tpaRecalAnswer = undefined;
|
||||||
|
wrapper.vm.footerButtonClick();
|
||||||
|
|
||||||
|
expect(wrapper.vm.showNoSelectionError).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue