Client - update test on workout datasets
This commit is contained in:
parent
7f3cf4f4b7
commit
12a336a3eb
@ -54,37 +54,37 @@ describe('getDatasets', () => {
|
|||||||
time: 'Sun, 12 Sep 2021 13:29:24 GMT',
|
time: 'Sun, 12 Sep 2021 13:29:24 GMT',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
distance: 0,
|
distance: 0.66,
|
||||||
duration: 1,
|
duration: 493.855,
|
||||||
elevation: 83.7,
|
elevation: 95.4,
|
||||||
latitude: 48.845578,
|
latitude: 48.846386,
|
||||||
longitude: 2.373732,
|
longitude: 2.379495,
|
||||||
speed: 1.56,
|
speed: 20.64,
|
||||||
time: 'Sun, 12 Sep 2021 13:29:25 GMT',
|
time: 'Sun, 12 Sep 2021 13:37:38 GMT',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
distance: 0.01,
|
distance: 1.25,
|
||||||
duration: 96,
|
duration: 637.864,
|
||||||
elevation: 84.3,
|
elevation: 91.1,
|
||||||
latitude: 48.845591,
|
latitude: 48.84733,
|
||||||
longitude: 2.373811,
|
longitude: 2.387452,
|
||||||
speed: 14.73,
|
speed: 13.03,
|
||||||
time: 'Sun, 12 Sep 2021 13:31:00 GMT',
|
time: 'Sun, 12 Sep 2021 13:40:02 GMT',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
useImperialUnits: false,
|
useImperialUnits: false,
|
||||||
},
|
},
|
||||||
expected: {
|
expected: {
|
||||||
distance_labels: [0, 0, 0.01],
|
distance_labels: [0, 0.66, 1.25],
|
||||||
duration_labels: [0, 1, 96],
|
duration_labels: [0, 493.855, 637.864],
|
||||||
datasets: {
|
datasets: {
|
||||||
speed: {
|
speed: {
|
||||||
label: 'speed',
|
label: 'speed',
|
||||||
backgroundColor: ['#FFFFFF'],
|
backgroundColor: ['#FFFFFF'],
|
||||||
borderColor: ['#8884d8'],
|
borderColor: ['#8884d8'],
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
data: [2.89, 1.56, 14.73],
|
data: [2.89, 20.64, 13.03],
|
||||||
yAxisID: 'ySpeed',
|
yAxisID: 'ySpeed',
|
||||||
},
|
},
|
||||||
elevation: {
|
elevation: {
|
||||||
@ -93,14 +93,14 @@ describe('getDatasets', () => {
|
|||||||
borderColor: ['#cccccc'],
|
borderColor: ['#cccccc'],
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
fill: true,
|
fill: true,
|
||||||
data: [83.6, 83.7, 84.3],
|
data: [83.6, 95.4, 91.1],
|
||||||
yAxisID: 'yElevation',
|
yAxisID: 'yElevation',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
coordinates: [
|
coordinates: [
|
||||||
{ latitude: 48.845574, longitude: 2.373723 },
|
{ latitude: 48.845574, longitude: 2.373723 },
|
||||||
{ latitude: 48.845578, longitude: 2.373732 },
|
{ latitude: 48.846386, longitude: 2.379495 },
|
||||||
{ latitude: 48.845591, longitude: 2.373811 },
|
{ latitude: 48.84733, longitude: 2.387452 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -118,37 +118,37 @@ describe('getDatasets', () => {
|
|||||||
time: 'Sun, 12 Sep 2021 13:29:24 GMT',
|
time: 'Sun, 12 Sep 2021 13:29:24 GMT',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
distance: 0,
|
distance: 0.66,
|
||||||
duration: 1,
|
duration: 493.855,
|
||||||
elevation: 83.7,
|
elevation: 95.4,
|
||||||
latitude: 48.845578,
|
latitude: 48.846386,
|
||||||
longitude: 2.373732,
|
longitude: 2.379495,
|
||||||
speed: 1.56,
|
speed: 20.64,
|
||||||
time: 'Sun, 12 Sep 2021 13:29:25 GMT',
|
time: 'Sun, 12 Sep 2021 13:37:38 GMT',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
distance: 0.01,
|
distance: 1.25,
|
||||||
duration: 96,
|
duration: 637.864,
|
||||||
elevation: 84.3,
|
elevation: 91.1,
|
||||||
latitude: 48.845591,
|
latitude: 48.84733,
|
||||||
longitude: 2.373811,
|
longitude: 2.387452,
|
||||||
speed: 14.73,
|
speed: 13.03,
|
||||||
time: 'Sun, 12 Sep 2021 13:31:00 GMT',
|
time: 'Sun, 12 Sep 2021 13:40:02 GMT',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
useImperialUnits: true,
|
useImperialUnits: true,
|
||||||
},
|
},
|
||||||
expected: {
|
expected: {
|
||||||
distance_labels: [0, 0, 0.01],
|
distance_labels: [0, 0.41, 0.78],
|
||||||
duration_labels: [0, 1, 96],
|
duration_labels: [0, 493.855, 637.864],
|
||||||
datasets: {
|
datasets: {
|
||||||
speed: {
|
speed: {
|
||||||
label: 'speed',
|
label: 'speed',
|
||||||
backgroundColor: ['#FFFFFF'],
|
backgroundColor: ['#FFFFFF'],
|
||||||
borderColor: ['#8884d8'],
|
borderColor: ['#8884d8'],
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
data: [1.8, 0.97, 9.15],
|
data: [1.8, 12.83, 8.1],
|
||||||
yAxisID: 'ySpeed',
|
yAxisID: 'ySpeed',
|
||||||
},
|
},
|
||||||
elevation: {
|
elevation: {
|
||||||
@ -157,14 +157,14 @@ describe('getDatasets', () => {
|
|||||||
borderColor: ['#cccccc'],
|
borderColor: ['#cccccc'],
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
fill: true,
|
fill: true,
|
||||||
data: [274.28, 274.61, 276.57],
|
data: [274.28, 312.99, 298.88],
|
||||||
yAxisID: 'yElevation',
|
yAxisID: 'yElevation',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
coordinates: [
|
coordinates: [
|
||||||
{ latitude: 48.845574, longitude: 2.373723 },
|
{ latitude: 48.845574, longitude: 2.373723 },
|
||||||
{ latitude: 48.845578, longitude: 2.373732 },
|
{ latitude: 48.846386, longitude: 2.379495 },
|
||||||
{ latitude: 48.845591, longitude: 2.373811 },
|
{ latitude: 48.84733, longitude: 2.387452 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user