本文整理汇总了TypeScript中ngx-bootstrap.AlertModule类的典型用法代码示例。如果您正苦于以下问题:TypeScript AlertModule类的具体用法?TypeScript AlertModule怎么用?TypeScript AlertModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AlertModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InfoPanelComponent ],
imports: [ AlertModule.forRoot() ]
})
.compileComponents();
}));
示例2: describe
describe('RbdListComponent', () => {
let component: RbdListComponent;
let fixture: ComponentFixture<RbdListComponent>;
configureTestBed({
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
ModalModule.forRoot(),
TooltipModule.forRoot(),
ToastModule.forRoot(),
AlertModule.forRoot(),
ComponentsModule,
RouterTestingModule,
HttpClientTestingModule
],
declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例3: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
FormsModule,
AlertModule.forRoot()
],
declarations: [ RegisterComponent ],
providers: [
{provide: LoginService, useValue: LoginServiceStub}
]
})
.compileComponents();
}));
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
AlertModule.forRoot(),
ComponentsModule,
RouterTestingModule,
HttpClientTestingModule
],
declarations: [ PoolDetailComponent ]
})
.compileComponents();
}));
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ],
imports: [
FormsModule,
AlertModule.forRoot(),
RouterTestingModule,
StoreModule.provideStore( () => {})
],
providers: [
{provide: LoginService, useValue: loginServiceStub}
]
})
.compileComponents();
}));
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
ModalModule.forRoot(),
TooltipModule.forRoot(),
ToastModule.forRoot(),
AlertModule.forRoot(),
ComponentsModule,
RouterTestingModule,
HttpClientTestingModule
],
declarations: [ RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent ]
})
.compileComponents();
}));
示例7: describe
describe('ViewCacheComponent', () => {
let component: ViewCacheComponent;
let fixture: ComponentFixture<ViewCacheComponent>;
configureTestBed({
declarations: [ViewCacheComponent],
imports: [AlertModule.forRoot()]
});
beforeEach(() => {
fixture = TestBed.createComponent(ViewCacheComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例8: describe
describe('GrafanaComponent', () => {
let component: GrafanaComponent;
let fixture: ComponentFixture<GrafanaComponent>;
configureTestBed({
declarations: [GrafanaComponent, InfoPanelComponent, LoadingPanelComponent],
imports: [AlertModule.forRoot(), HttpClientModule, RouterTestingModule],
providers: [CephReleaseNamePipe, SettingsService, SummaryService]
});
beforeEach(() => {
fixture = TestBed.createComponent(GrafanaComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
示例9: describe
describe('RbdListComponent', () => {
let component: RbdListComponent;
let fixture: ComponentFixture<RbdListComponent>;
class SummaryServiceMock extends SummaryService {
data: any;
raiseError() {
this.summaryDataSource.error(undefined);
}
refresh() {
this.summaryDataSource.next(this.data);
}
}
configureTestBed({
imports: [
SharedModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
ModalModule.forRoot(),
TooltipModule.forRoot(),
ToastModule.forRoot(),
AlertModule.forRoot(),
ComponentsModule,
RouterTestingModule,
HttpClientTestingModule
],
declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent],
providers: [{ provide: SummaryService, useClass: SummaryServiceMock }]
});
beforeEach(() => {
fixture = TestBed.createComponent(RbdListComponent);
component = fixture.componentInstance;
});
it('should create', () => {
expect(component).toBeTruthy();
});
describe('after ngOnInit', () => {
let summaryService: SummaryServiceMock;
beforeEach(() => {
summaryService = TestBed.get(SummaryService);
summaryService.data = undefined;
fixture.detectChanges();
});
it('should load images on init', () => {
spyOn(component, 'loadImages');
summaryService.data = {};
summaryService.refresh();
expect(component.loadImages).toHaveBeenCalled();
});
it('should not load images on init because no data', () => {
spyOn(component, 'loadImages');
summaryService.refresh();
expect(component.loadImages).not.toHaveBeenCalled();
});
it('should call error function on init when summary service fails', () => {
spyOn(component.table, 'reset');
summaryService.raiseError();
expect(component.table.reset).toHaveBeenCalled();
expect(component.viewCacheStatusList).toEqual([{ status: ViewCacheStatus.ValueException }]);
});
});
});
示例10:
TypeaheadModule,
BsDropdownModule,
ComponentLoaderFactory
} from 'ngx-bootstrap';
import {
ActionModule,
NotificationModule,
CardModule,
ListModule,
ToolbarModule,
PaginationModule,
} from 'patternfly-ng';
const imports = [
AlertModule.forRoot(),
CollapseModule.forRoot(),
ModalModule.forRoot(),
PopoverModule.forRoot(),
TabsModule.forRoot(),
TooltipModule.forRoot(),
TypeaheadModule.forRoot(),
BsDropdownModule.forRoot(),
ActionModule,
NotificationModule,
CardModule,
ListModule,
ToolbarModule
];
const _exports = [