aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts
blob: 000f9eda13350392cec79ba9d00be4ed53970670 (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
37
38
39
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';
import {PackagesDashboardState} from '../../model/packages-dashboard.state';

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

  beforeEach(async(() => {

    const dashBoard = new PackagesDashboardState();
    dashBoard.page = getBluePrintPageMock();
    store = { state$: of(dashBoard) };

    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
});