aboutsummaryrefslogtreecommitdiffstats
path: root/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-10-22 11:33:19 +0300
committervempo <vitaliy.emporopulo@amdocs.com>2018-10-22 11:33:19 +0300
commit032929d287cbafefe8367e0fcee18dec4b1bf9f7 (patch)
tree6e4f28cd5303d810c24cd110fb69c6d95b875e98 /deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts
parenta224f54637da8de90570beee979aef9069f467d5 (diff)
Deleted deprecated workflow project
Change-Id: I2ad75adab7d47d8df5b3996a315a9b173fa4bbfe Issue-ID: SDC-1855 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts')
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts114
1 files changed, 0 insertions, 114 deletions
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts
deleted file mode 100644
index 5767bfee..00000000
--- a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/paletx/plx-modal/modal-window.spec.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import {TestBed, ComponentFixture} from '@angular/core/testing';
-
-import {PlxModalWindow} from './modal-window';
-import {ModalDismissReasons} from './modal-dismiss-reasons';
-
-describe('plx-modal-dialog', () => {
-
- let fixture: ComponentFixture<PlxModalWindow>;
-
- beforeEach(() => {
- TestBed.configureTestingModule({declarations: [PlxModalWindow]});
- fixture = TestBed.createComponent(PlxModalWindow);
- });
-
- describe('basic rendering functionality', () => {
-
- it('should render default modal window', () => {
- fixture.detectChanges();
-
- const modalEl: Element = fixture.nativeElement;
- const dialogEl: Element = fixture.nativeElement.querySelector('.modal-dialog');
-
- expect(modalEl).toHaveCssClass('modal');
- expect(dialogEl).toHaveCssClass('modal-dialog');
- });
-
- it('should render default modal window with a specified size', () => {
- fixture.componentInstance.size = 'sm';
- fixture.detectChanges();
-
- const dialogEl: Element = fixture.nativeElement.querySelector('.modal-dialog');
- expect(dialogEl).toHaveCssClass('modal-dialog');
- expect(dialogEl).toHaveCssClass('modal-sm');
- });
-
- it('should render default modal window with a specified class', () => {
- fixture.componentInstance.windowClass = 'custom-class';
- fixture.detectChanges();
-
- expect(fixture.nativeElement).toHaveCssClass('custom-class');
- });
-
- it('aria attributes', () => {
- fixture.detectChanges();
- const dialogEl: Element = fixture.nativeElement.querySelector('.modal-dialog');
-
- expect(fixture.nativeElement.getAttribute('role')).toBe('dialog');
- expect(dialogEl.getAttribute('role')).toBe('document');
- });
- });
-
- describe('dismiss', () => {
-
- it('should dismiss on backdrop click by default', (done) => {
- fixture.detectChanges();
-
- fixture.componentInstance.dismissEvent.subscribe(($event) => {
- expect($event).toBe(ModalDismissReasons.BACKDROP_CLICK);
- done();
- });
-
- fixture.nativeElement.click();
- });
-
- it('should not dismiss on modal content click when there is active backdrop', (done) => {
- fixture.detectChanges();
- fixture.componentInstance.dismissEvent.subscribe(
- () => {
- done.fail(new Error('Should not trigger dismiss event'));
- });
-
- fixture.nativeElement.querySelector('.modal-content').click();
- setTimeout(done, 200);
- });
-
- it('should ignore backdrop clicks when there is no backdrop', (done) => {
- fixture.componentInstance.backdrop = false;
- fixture.detectChanges();
-
- fixture.componentInstance.dismissEvent.subscribe(($event) => {
- expect($event).toBe(ModalDismissReasons.BACKDROP_CLICK);
- done.fail(new Error('Should not trigger dismiss event'));
- });
-
- fixture.nativeElement.querySelector('.modal-dialog').click();
- setTimeout(done, 200);
- });
-
- it('should ignore backdrop clicks when backdrop is "static"', (done) => {
- fixture.componentInstance.backdrop = 'static';
- fixture.detectChanges();
-
- fixture.componentInstance.dismissEvent.subscribe(($event) => {
- expect($event).toBe(ModalDismissReasons.BACKDROP_CLICK);
- done.fail(new Error('Should not trigger dismiss event'));
- });
-
- fixture.nativeElement.querySelector('.modal-dialog').click();
- setTimeout(done, 200);
- });
-
- it('should dismiss on esc press by default', (done) => {
- fixture.detectChanges();
-
- fixture.componentInstance.dismissEvent.subscribe(($event) => {
- expect($event).toBe(ModalDismissReasons.ESC);
- done();
- });
-
- fixture.debugElement.triggerEventHandler('keyup.esc', {});
- });
- });
-
-});