Skip to content

Commit

Permalink
SHIBUI-914 Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Oct 18, 2018
1 parent 3a81f2c commit 49e46ef
Show file tree
Hide file tree
Showing 70 changed files with 269 additions and 3,390 deletions.
3 changes: 0 additions & 3 deletions ui/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import { SharedModule } from './shared/shared.module';
import { WizardModule } from './wizard/wizard.module';
import { FormModule } from './schema-form/schema-form.module';
import { environment } from '../environments/environment.prod';
import { getCurrentLocale } from './shared/util';
import { I18nModule } from './i18n/i18n.module';
import { WidgetRegistry } from 'ngx-schema-form';
import { CustomWidgetRegistry } from './schema-form/registry';

@NgModule({
declarations: [
Expand Down
18 changes: 8 additions & 10 deletions ui/src/app/metadata/domain/component/editor-nav.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,31 @@ import { StoreModule, Store, combineReducers } from '@ngrx/store';

import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';

import * as fromRoot from '../reducer';
import { SchemaFormModule, WidgetRegistry, DefaultWidgetRegistry } from 'ngx-schema-form';
import * as fromWizard from '../../../wizard/reducer';
import { ProviderEditorNavComponent, NAV_FORMATS } from './provider-editor-nav.component';
import { EditorNavComponent, NAV_FORMATS } from './editor-nav.component';
import { ValidFormIconComponent } from '../../../shared/component/valid-form-icon.component';
import { WizardStep } from '../../../wizard/model';
import { MockI18nModule } from '../../../../testing/i18n.stub';

@Component({
template: `
<provider-editor-nav [format]="format.TABS"></provider-editor-nav>
<editor-nav [format]="format.TABS"></editor-nav>
`
})
class TestHostComponent {
@ViewChild(ProviderEditorNavComponent)
public componentUnderTest: ProviderEditorNavComponent;
@ViewChild(EditorNavComponent)
public componentUnderTest: EditorNavComponent;

public format = NAV_FORMATS;
}

describe('Provider Editor Nav Component', () => {
describe('Editor Nav Component', () => {

let fixture: ComponentFixture<TestHostComponent>;
let instance: TestHostComponent;
let app: ProviderEditorNavComponent;
let store: Store<fromRoot.State>;
let app: EditorNavComponent;
let store: Store<fromWizard.State>;

let step: WizardStep = {
id: 'common',
Expand All @@ -47,13 +46,12 @@ describe('Provider Editor Nav Component', () => {
RouterTestingModule,
SchemaFormModule.forRoot(),
StoreModule.forRoot({
provider: combineReducers(fromRoot.reducers),
wizard: combineReducers(fromWizard.reducers)
}),
MockI18nModule
],
declarations: [
ProviderEditorNavComponent,
EditorNavComponent,
ValidFormIconComponent,
TestHostComponent
],
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 49e46ef

Please sign in to comment.