Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('IscsiTargetListComponent', () => {
let component: IscsiTargetListComponent;
let fixture: ComponentFixture;
let summaryService: SummaryService;
let iscsiService: IscsiService;
const refresh = (data) => {
summaryService['summaryDataSource'].next(data);
};
configureTestBed({
imports: [
HttpClientTestingModule,
RouterTestingModule,
SharedModule,
TabsModule.forRoot(),
TreeModule,
ToastModule.forRoot()
],
declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent],
providers: [TaskListService, i18nProviders]
});
beforeEach(() => {
fixture = TestBed.createComponent(IscsiTargetListComponent);
component = fixture.componentInstance;
summaryService = TestBed.get(SummaryService);
iscsiService = TestBed.get(IscsiService);
// this is needed because summaryService isn't being reset after each test.
summaryService['summaryDataSource'] = new BehaviorSubject(null);
summaryService['summaryData$'] = summaryService['summaryDataSource'].asObservable();
...APP_CONTAINERS,
],
imports: [
RouterModule,
NgxUiLoaderModule,
//NgxUiLoaderRouterModule, // import this module for showing loader automatically when navigating between app routes
NgxUiLoaderHttpModule.forRoot({ showForeground: false }),
ToastrModule.forRoot({ positionClass: 'toast-top-full-width', closeButton: true }),
AppAsideModule,
AppBreadcrumbModule.forRoot(),
AppFooterModule,
AppHeaderModule,
AppSidebarModule,
PerfectScrollbarModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
NgWizardModule.forRoot(ngWizardConfig),
],
exports: [
RouterModule,
HttpClientModule,
NgxUiLoaderModule,
NgWizardModule,
LayoutComponent,
],
providers: [
ProductDataService,
CategoryDataService,
CustomerDataService,
AuthService,
AuthGuardService,
ValidationService,
describe('AlertListComponent', () => {
let component: AlertListComponent;
let fixture: ComponentFixture;
configureTestBed({
imports: [
HttpClientTestingModule,
TabsModule.forRoot(),
RouterTestingModule,
ToastrModule.forRoot(),
SharedModule
],
declarations: [AlertListComponent, PrometheusTabsComponent],
providers: [i18nProviders]
});
beforeEach(() => {
fixture = TestBed.createComponent(AlertListComponent);
component = fixture.componentInstance;
});
it('should create', () => {
fixture.detectChanges();
expect(component).toBeTruthy();
describe('CrushmapComponent', () => {
let component: CrushmapComponent;
let fixture: ComponentFixture;
let debugElement: DebugElement;
configureTestBed({
imports: [HttpClientTestingModule, TreeModule, TabsModule.forRoot(), SharedModule],
declarations: [CrushmapComponent],
providers: [DashboardService]
});
beforeEach(() => {
fixture = TestBed.createComponent(CrushmapComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should display right title', () => {
fixture.detectChanges();
describe('HostsComponent', () => {
let component: HostsComponent;
let fixture: ComponentFixture;
let hostListSpy;
const fakeAuthStorageService = {
getPermissions: () => {
return new Permissions({ hosts: ['read', 'update', 'create', 'delete'] });
}
};
configureTestBed({
imports: [
SharedModule,
HttpClientTestingModule,
TabsModule.forRoot(),
BsDropdownModule.forRoot(),
RouterTestingModule,
ToastrModule.forRoot()
],
providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }, i18nProviders],
declarations: [HostsComponent, HostDetailsComponent, InventoryComponent, ServicesComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(HostsComponent);
component = fixture.componentInstance;
hostListSpy = spyOn(TestBed.get(HostService), 'list');
fixture.detectChanges();
});
it('should create', () => {
import { TabsetConfig, TabsModule } from 'ngx-bootstrap/tabs';
import { DemoComponentsModule } from '../../../../demo/components/demo-components.module';
import { ToastNotificationExampleComponent } from './toast-notification-example.component';
import { ToastNotificationModule } from '../toast-notification.module';
@NgModule({
declarations: [
ToastNotificationExampleComponent
],
imports: [
BsDropdownModule.forRoot(),
CommonModule,
DemoComponentsModule,
FormsModule,
TabsModule.forRoot(),
ToastNotificationModule
],
providers: [
BsDropdownConfig,
TabsetConfig
]
})
export class ToastNotificationExampleModule {
constructor() {}
}
import { AppComponent } from './app.component';
import { NavBarComponent } from 'app/components/nav-bar/nav-bar.component';
import { UserInformationComponent } from 'app/components/user-information/user-information.component';
import { NoAccessComponent } from 'app/components/no-access/no-access.component';
/**
* Guards
*/
import { DomainGuard } from './guards/domain.guard';
import { BusinessAdminGuard } from './guards/business-admin.guard';
import { MonitorGuard } from './guards/monitor.guard';
import { UserGuard } from './guards/user.guard';
const MODULES = [
TabsModule.forRoot(),
AlertModule.forRoot(),
BrowserModule,
FormsModule,
AppRoutingModule,
AngularSvgIconModule,
HttpClientModule,
BrowserAnimationsModule,
ReactiveFormsModule,
TreeModule,
SharedModule
];
const DECLARATIONS = [
AppComponent,
NavBarComponent,
UserInformationComponent,
CommonModule,
FormsModule,
ReactiveFormsModule,
TranslateModule,
AccordionModule.forRoot(),
AlertModule.forRoot(),
ButtonsModule.forRoot(),
CollapseModule.forRoot(),
DatepickerModule.forRoot(),
BsDropdownModule.forRoot(),
ModalModule.forRoot(),
Ng2FilterPipeModule,
PaginationModule.forRoot(),
ProgressbarModule.forRoot(),
RatingModule.forRoot(),
TabsModule.forRoot(),
TimepickerModule.forRoot(),
TooltipModule.forRoot(),
TypeaheadModule.forRoot(),
ToasterModule,
LocalStorageModule.withConfig({
prefix : 'FND',
storageType: 'localStorage'
})
],
providers : [
ColorsService
],
declarations: [
AddRequestDirective,
CheckallDirective,
EasypiechartDirective,
const SYSTEM_MENU_ROUTES: Routes = [
{path: '', component: SystemMenuComponent}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
CustomFormsModule,
BusyModule,
ArchwizardModule,
Select2Module,
TranslateModule,
TooltipModule.forRoot(),
TabsModule.forRoot(),
ToastyModule.forRoot(),
PaginationModule.forRoot(),
ModalModule.forRoot(),
PopoverModule.forRoot(),
RouterModule.forChild(SYSTEM_MENU_ROUTES)
],
exports: [],
declarations: [
SystemMenuComponent
],
providers: [
SystemMenuService,
SystemSettingsMethodService,
SystemMenuTypeService,
IconService
],
@NgModule({
declarations: [
LayoutComponent,
HeaderComponent,
NavigationTriggerComponent
],
imports: [
CommonModule,
LayoutRouting,
FormsModule,
BusyModule,
CustomFormsModule,
BsDropdownModule.forRoot(),
ProgressbarModule.forRoot(),
ButtonsModule.forRoot(),
TabsModule.forRoot(),
ModalModule.forRoot(),
ToastyModule.forRoot(),
PerfectScrollbarModule.forRoot(PERFECT_SCROLLBAR_CONFIG)
],
providers: [
UserService,
RemindService,
{
provide: BusyConfig,
useFactory: busyConfigFactory
},
ToastyService
]
})
export class LayoutModule { }