Hotfix for tests not running

Hotfix for tests not running
This commit is contained in:
Jaap van Ekris 2023-04-19 23:05:38 +02:00 committed by GitHub
commit 78f6275846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 17 deletions

View File

@ -8,7 +8,7 @@
import { AppElement, html, css } from './AppElement.js'
import { customElement, property, state } from 'lit/decorators.js'
import ChartDataLabels from 'chartjs-plugin-datalabels'
import { Chart, Filler, Legend, LinearScale, LineController, LineElement, PointElement } from 'chart.js/auto'
import { Chart, Filler, Legend, LinearScale, LineController, LineElement, PointElement } from 'chart.js'
@customElement('dashboard-force-curve')
export class DashboardForceCurve extends AppElement {

View File

@ -7,7 +7,7 @@
import { AppElement, html, css } from './AppElement.js'
import { customElement, property, state } from 'lit/decorators.js'
import './SettingsDialog'
import './SettingsDialog.js'
import { icon_settings } from '../lib/icons.js'
import { DASHBOARD_METRICS } from '../store/dashboardMetrics.js'

View File

@ -1,8 +1,5 @@
'use strict'
import { html } from 'lit'
import '../components/DashboardMetric.js'
/*
Open Rowing Monitor, https://github.com/laberning/openrowingmonitor
@ -61,14 +58,3 @@ export function formatNumber (value, decimalPlaces = 0) {
return Math.round(value * decimal) / decimal
}
/**
* Helper function to create a simple metric tile
*
* @param {string | number} value The metric to show
* @param {string} unit The unit of the metric.
* @param {string | import('lit').TemplateResult<2>} icon The number of decimal places to round to (default: 0).
*/
export function simpleMetricFactory (value = '--', unit = '', icon = '') {
return html`<dashboard-metric .icon=${icon} .unit=${unit} .value=${value}></dashboard-metric>`
}

View File

@ -1,8 +1,9 @@
import { html } from 'lit'
import { simpleMetricFactory, formatDistance, formatNumber, secondsToPace } from '../lib/helper'
import { formatDistance, formatNumber, secondsToPace } from '../lib/helper'
import { icon_bolt, icon_clock, icon_fire, icon_heartbeat, icon_paddle, icon_route, icon_stopwatch, rower_icon } from '../lib/icons'
import '../components/DashboardForceCurve.js'
import '../components/DashboardActions.js'
import '../components/DashboardMetric.js'
import '../components/BatteryIcon.js'
export const DASHBOARD_METRICS = {
@ -68,3 +69,14 @@ export const DASHBOARD_METRICS = {
actions: { displayName: 'Actions', size: 1, template: (_, config) => html`<dashboard-actions .config=${config}></dashboard-actions>` }
}
/**
* Helper function to create a simple metric tile
*
* @param {string | number} value The metric to show
* @param {string} unit The unit of the metric.
* @param {string | import('lit').TemplateResult<2>} icon The number of decimal places to round to (default: 0).
*/
function simpleMetricFactory (value = '--', unit = '', icon = '') {
return html`<dashboard-metric .icon=${icon} .unit=${unit} .value=${value}></dashboard-metric>`
}