1 import {async, ComponentFixture} from '@angular/core/testing';
2 import {By} from '@angular/platform-browser';
3 import {ConfigureFn, configureTests} from '../../../../../../jest/test-config.helper';
4 import 'jest-dom/extend-expect';
5 import {ZoneInstanceType} from '../../../../../../app/models/graph/zones/zone-instance';
6 import {ZoneContainerComponent} from './zone-container.component';
9 describe('ZoneContainerComponent', () => {
10 let fixture: ComponentFixture<ZoneContainerComponent>;
14 const configure: ConfigureFn = testBed => {
15 testBed.configureTestingModule({
16 declarations: [ZoneContainerComponent]
20 configureTests(configure).then(testBed => {
21 fixture = testBed.createComponent(ZoneContainerComponent);
27 it('should match current snapshot of palette element component', () => {
28 expect(fixture).toMatchSnapshot();
31 it('should have a group-zone class when the ZoneInstanceType is GROUP',
33 fixture.componentInstance.type = ZoneInstanceType.GROUP;
34 fixture.detectChanges();
35 const compiled = fixture.debugElement.query(By.css('.sdc-canvas-zone'));
36 expect(compiled.nativeElement).toHaveClass('group-zone');
39 it('should have a policy-zone class when the ZoneInstanceType is POLICY',
41 fixture.componentInstance.type = ZoneInstanceType.POLICY;
42 fixture.detectChanges();
43 const compiled = fixture.debugElement.query(By.css('.sdc-canvas-zone'));
44 expect(compiled.nativeElement).toHaveClass('policy-zone');