Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let params;
// Date mocking related
let originalDate;
const baseTime = new Date('2022-02-22T00:00:00');
const beginningDate = new Date('2022-02-22T00:00:12.35');
const routes: Routes = [{ path: '404', component: NotFoundComponent }];
configureTestBed({
declarations: [NotFoundComponent, SilenceFormComponent],
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes(routes),
BsDatepickerModule.forRoot(),
SharedModule,
ToastrModule.forRoot(),
TooltipModule.forRoot(),
ReactiveFormsModule
],
providers: [
i18nProviders,
{
provide: ActivatedRoute,
useValue: { params: { subscribe: (fn) => fn(params) } }
}
]
});
const createMatcher = (name, value, isRegex) => ({ name, value, isRegex });
const addMatcher = (name, value, isRegex) =>
component['setMatcher'](createMatcher(name, value, isRegex));
import { DashboardHelpComponent } from './dashboard-help/dashboard-help.component';
import { IdentityComponent } from './identity/identity.component';
import { NavigationComponent } from './navigation/navigation.component';
import { NotificationsComponent } from './notifications/notifications.component';
import { TaskManagerComponent } from './task-manager/task-manager.component';
@NgModule({
entryComponents: [AboutComponent],
imports: [
CommonModule,
AuthModule,
ProgressbarModule.forRoot(),
CollapseModule.forRoot(),
BsDropdownModule.forRoot(),
PopoverModule.forRoot(),
TooltipModule.forRoot(),
AppRoutingModule,
SharedModule,
RouterModule
],
declarations: [
AboutComponent,
BreadcrumbsComponent,
NavigationComponent,
NotificationsComponent,
TaskManagerComponent,
DashboardHelpComponent,
AdministrationComponent,
IdentityComponent
],
exports: [NavigationComponent, BreadcrumbsComponent]
})
space: 'space2',
},
},
]),
);
broadcaster = { broadcast: jasmine.createSpy('broadcast') };
});
const testContext = initContext(PipelinesComponent, HostComponent, {
imports: [
BsDropdownModule.forRoot(),
CommonModule,
RouterTestingModule,
ToolbarModule,
ModalModule.forRoot(),
TooltipModule.forRoot(),
],
declarations: [FakePipelinesListComponent],
providers: [
BsDropdownConfig,
TooltipConfig,
{ provide: Contexts, useFactory: () => contexts },
{ provide: AuthenticationService, useFactory: () => authenticationService },
{ provide: PipelinesService, useFactory: () => pipelinesService },
{ provide: Broadcaster, useFactory: () => broadcaster },
],
});
describe('Pipelines component with url', () => {
beforeAll(() => {
pipelinesService.getOpenshiftConsoleUrl.and.returnValue(
observableOf('http://example.com/browse/openshift'),
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ TooltipModule.forRoot(), UiModule ],
declarations: [ ]
})
.compileComponents();
}));
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { TooltipConfig, TooltipModule } from 'ngx-bootstrap/tooltip';
import { HeaderModule } from '../shared/modules/header.module';
import { StarentryService } from '../shared/starentry.service';
import { StargazersModule } from '../stargazers/stargazers.module';
import { StarringModule } from '../starring/starring.module';
import { StarringService } from '../starring/starring.service';
import { getTooltipConfig } from './../shared/tooltip';
@NgModule({
imports: [CommonModule, StargazersModule, TooltipModule.forRoot(), HeaderModule, StarringModule],
providers: [{ provide: TooltipConfig, useFactory: getTooltipConfig }, StarentryService, StarringService]
})
export class StarredEntriesModule {}
import { MyToolsComponent } from './mytools.component';
import { mytoolsRouting } from './mytools.routing';
import { SidebarAccordionComponent } from './sidebar-accordion/sidebar-accordion.component';
@NgModule({
declarations: [MyToolsComponent, RegisterToolComponent, RefreshToolOrganizationComponent, MyToolComponent, SidebarAccordionComponent],
imports: [
CommonModule,
ContainerModule,
FormsModule,
HeaderModule,
mytoolsRouting,
AccordionModule.forRoot(),
ModalModule.forRoot(),
TabsModule.forRoot(),
TooltipModule.forRoot(),
CustomMaterialModule,
PipeModule
],
providers: [{ provide: TooltipConfig, useFactory: getTooltipConfig }, RegisterToolService, AccountsService],
entryComponents: [RegisterToolComponent]
})
export class MyToolsModule {}
import { DeploymentsLinechartComponent } from './deployments-linechart/deployments-linechart.component';
import { DeploymentsRoutingModule } from './deployments-routing.module';
import { DeploymentsToolbarComponent } from './deployments-toolbar/deployments-toolbar.component';
import { DeploymentsComponent } from './deployments.component';
import { DeploymentsResourceUsageComponent } from './resource-usage/deployments-resource-usage.component';
import { LoadingUtilizationBarComponent } from './resource-usage/loading-utilization-bar.component';
import { ResourceCardComponent } from './resource-usage/resource-card.component';
import { UtilizationBarComponent } from './resource-usage/utilization-bar.component';
import { DeploymentApiService } from './services/deployment-api.service';
@NgModule({
imports: [
BsDropdownModule.forRoot(),
CollapseModule.forRoot(),
AccordionModule.forRoot(),
TooltipModule.forRoot(),
CommonModule,
DeploymentsRoutingModule,
ModalModule.forRoot(),
SparklineChartModule,
ToolbarModule
],
declarations: [
DeleteDeploymentModal,
DeploymentsComponent,
DeploymentCardContainerComponent,
DeploymentCardComponent,
DeploymentGraphLabelComponent,
DeploymentStatusIconComponent,
DeploymentsAppsComponent,
DeploymentDetailsComponent,
DeploymentsResourceUsageComponent,
imports: [
ActionModule,
BsDropdownModule.forRoot(),
CodebaseDeleteDialogModule,
CodebasesItemModule,
CodebasesItemActionsModule,
CodebasesItemDetailsModule,
CodebasesItemHeadingModule,
CodebasesItemWorkspacesModule,
CodebasesToolbarModule,
CodebasesRoutingModule,
CommonModule,
EmptyStateModule,
FormsModule,
ListModule,
TooltipModule.forRoot(),
FeatureFlagModule
],
declarations: [ CodebasesComponent ],
exports: [ CodebasesComponent ],
providers: [ BsDropdownConfig, TooltipConfig ]
})
export class CodebasesModule {
constructor() { }
}
import { BarChartComponent } from './charts/bar-chart/bar-chart.component';
import { BubbleChartComponent } from './charts/bubble-chart/bubble-chart.component';
import { GraphChartComponent } from './charts/graph-chart/graph-chart.component';
import { CounterHeaderComponent } from './components/counter-header.component';
import { PieChartComponent } from './charts/pie-chart/pie-chart.component';
/**
* Analytics Module
*/
import { TooltipModule } from 'ngx-bootstrap/tooltip';
@NgModule({
imports: [
AnalyticsRoutingModule,
SharedModule,
TooltipModule.forRoot()
],
declarations: [
AnalyticsComponent,
BarChartComponent,
BubbleChartComponent,
CountersComponent,
CounterHeaderComponent,
DashboardComponent,
GraphChartComponent,
PieChartComponent
],
providers: [
AnalyticsService
]
})
export class AnalyticsModule {
BsDropdownModule.forRoot(),
CommonModule,
DialogModule,
EmptyStateModule,
FabPlannerAssociateIterationModalModule,
HttpModule,
InfiniteScrollModule,
GroupTypesModule,
IterationModule,
LabelsModule,
ModalModule,
PlannerLayoutModule,
PlannerListRoutingModule,
SidepanelModule,
ToolbarPanelModule,
TooltipModule.forRoot(),
WidgetsModule,
WorkItemDetailModule,
WorkItemQuickAddModule,
WorkItemDetailAddTypeSelectorModule,
PlannerModalModule,
NgxDatatableModule,
StoreModule.forFeature('listPage', {
iterations: iterationReducer
}, {
initialState: {
iterations: initialIterationState
}
})
],
declarations: [
PlannerListComponent,