From d3b1eaf4bee791cc93caea2508dec0837346cb7c Mon Sep 17 00:00:00 2001 From: Jiri Pokorny Date: Wed, 3 Apr 2024 01:45:36 +0200 Subject: [PATCH] Fixed broken profile chart test --- .../src/app/diff/profilechart/diff-profilechart.component.ts | 1 + .../src/app/profilechart/profilechart.component.spec.ts | 5 ++++- projects/planner/src/app/shared/chartPlotter.ts | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/planner/src/app/diff/profilechart/diff-profilechart.component.ts b/projects/planner/src/app/diff/profilechart/diff-profilechart.component.ts index 7a57040d..8c5e76e7 100644 --- a/projects/planner/src/app/diff/profilechart/diff-profilechart.component.ts +++ b/projects/planner/src/app/diff/profilechart/diff-profilechart.component.ts @@ -92,6 +92,7 @@ export class ProfileDifferenceChartComponent extends Streamed implements OnInit this.plotter.plotCharts(this.profileA.totalDuration); } + // TODO fix hover over the diff chart private hookChartEvents(): void { // used any to prevent typescript type gymnastic const chartElement: any = document.getElementById(this.plotter.elementName); diff --git a/projects/planner/src/app/profilechart/profilechart.component.spec.ts b/projects/planner/src/app/profilechart/profilechart.component.spec.ts index 10c06ca4..143f3963 100644 --- a/projects/planner/src/app/profilechart/profilechart.component.spec.ts +++ b/projects/planner/src/app/profilechart/profilechart.component.spec.ts @@ -6,6 +6,8 @@ import { WayPointsService } from '../shared/waypoints.service'; import { SelectedWaypoint } from '../shared/selectedwaypointService'; import { DiveSchedules } from '../shared/dive.schedules'; import { ReloadDispatcher } from '../shared/reloadDispatcher'; +import { ChartPlotterFactory } from '../shared/chartPlotter'; +import { ResamplingService } from '../shared/ResamplingService'; describe('ProfileChartComponent', () => { let component: ProfileChartComponent; @@ -17,7 +19,8 @@ describe('ProfileChartComponent', () => { providers: [ WorkersFactoryCommon, ReloadDispatcher, WayPointsService, SelectedWaypoint, - UnitConversion, DiveSchedules + UnitConversion, DiveSchedules, + ChartPlotterFactory, ResamplingService ] }); diff --git a/projects/planner/src/app/shared/chartPlotter.ts b/projects/planner/src/app/shared/chartPlotter.ts index ce928f24..73fdc427 100644 --- a/projects/planner/src/app/shared/chartPlotter.ts +++ b/projects/planner/src/app/shared/chartPlotter.ts @@ -8,7 +8,6 @@ import { DateFormats } from './formaters'; import { WayPoint } from './models'; import { Ceiling, Event } from 'scuba-physics'; -// TODO merge with profileChart component drawing methods @Injectable() export class ChartPlotterFactory { public static readonly depthLineColorA = 'rgb(31, 119, 180)';