aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts
blob: f45f259968f72d5e762ede69f887e20d785dae62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { PackageListComponent } from './package-list.component';
import { PackagesStore } from '../../packages.store';
import { getBluePrintPageMock } from '../../blueprint.page.mock';
import { of } from 'rxjs';

describe('PackageListComponent', () => {
  let component: PackageListComponent;
  let fixture: ComponentFixture<PackageListComponent>;
  let store: Partial<PackagesStore>;

  beforeEach(async(() => {

    store = { state$: of(getBluePrintPageMock()) };

    TestBed.configureTestingModule({
      declarations: [ PackageListComponent ],
      providers: [{ provide: PackagesStore, useValue: store }]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(PackageListComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });


  // TODO create another test with store in mind
});