本文整理匯總了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 = [