Browse Source

test: add a dismissible option test to confirmation.service.spec

pull/3910/head
mehmet-erim 6 years ago
parent
commit
04209199f6
  1. 8
      npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts

8
npm/ng-packs/packages/theme-shared/src/lib/tests/confirmation.service.spec.ts

@ -105,6 +105,14 @@ describe('ConfirmationService', () => {
selectConfirmationElement<HTMLButtonElement>('button#cancel').click();
});
test('should not call the listenToEscape method when dismissible is false', () => {
const spy = spyOn(service as any, 'listenToEscape');
service.info('', '', { dismissible: false });
expect(spy.calls.count()).toBe(0);
});
});
function clearElements(selector = '.confirmation') {

Loading…
Cancel
Save