From dc3520bd92a4cc5ef0a24d76e2d7234bc71fff1d Mon Sep 17 00:00:00 2001 From: kurkle Date: Sun, 27 Oct 2019 08:17:34 +0200 Subject: [PATCH] Don't use deprecated options in tests --- .../controller.bar/bar-thickness-absolute.json | 6 +++--- .../bar-thickness-flex-offset.json | 6 +++--- .../bar-thickness-flex-single-reverse.json | 6 +++--- .../bar-thickness-flex-single.json | 6 +++--- .../controller.bar/bar-thickness-flex.json | 6 +++--- .../controller.bar/bar-thickness-max.json | 6 +++--- .../bar-thickness-min-interval.json | 4 ++-- .../controller.bar/bar-thickness-multiple.json | 8 ++++++-- .../bar-thickness-no-overlap.json | 8 ++++++-- .../controller.bar/bar-thickness-offset.json | 8 ++++++-- .../controller.bar/bar-thickness-reverse.json | 8 ++++++-- .../bar-thickness-single-xy.json | 4 ++-- .../controller.bar/bar-thickness-single.json | 4 ++-- .../controller.bar/bar-thickness-stacked.json | 8 ++++++-- test/specs/controller.bar.tests.js | 18 +++++++++++++++--- 15 files changed, 69 insertions(+), 37 deletions(-) diff --git a/test/fixtures/controller.bar/bar-thickness-absolute.json b/test/fixtures/controller.bar/bar-thickness-absolute.json index 58b6e113244..4c5ed53391d 100644 --- a/test/fixtures/controller.bar/bar-thickness-absolute.json +++ b/test/fixtures/controller.bar/bar-thickness-absolute.json @@ -5,6 +5,9 @@ "labels": ["2017", "2018", "2019", "2024", "2025"], "datasets": [{ "backgroundColor": "rgba(255, 99, 132, 0.5)", + "barPercentage": 1, + "categoryPercentage": 1, + "barThickness": 128, "data": [1, null, 3, 4, 5] }] }, @@ -17,9 +20,6 @@ "type": "time", "offset": true, "display": false, - "barPercentage": 1, - "categoryPercentage": 1, - "barThickness": 128, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-flex-offset.json b/test/fixtures/controller.bar/bar-thickness-flex-offset.json index 6b0829dd561..6672516e472 100644 --- a/test/fixtures/controller.bar/bar-thickness-flex-offset.json +++ b/test/fixtures/controller.bar/bar-thickness-flex-offset.json @@ -5,6 +5,9 @@ "labels": ["2017", "2018", "2020", "2024", "2038"], "datasets": [{ "backgroundColor": "#FF6384", + "barPercentage": 1, + "categoryPercentage": 1, + "barThickness": "flex", "data": [1, null, 3, 4, 5] }] }, @@ -17,9 +20,6 @@ "type": "time", "offset": true, "display": false, - "barPercentage": 1, - "categoryPercentage": 1, - "barThickness": "flex", "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json b/test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json index 6f63ca93468..e6d12373666 100644 --- a/test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json +++ b/test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json @@ -5,6 +5,9 @@ "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ "backgroundColor": "#FF6384", + "barThickness": "flex", + "barPercentage": 1, + "categoryPercentage": 1, "data": [1] }] }, @@ -16,9 +19,6 @@ "xAxes": [{ "type": "time", "display": false, - "barThickness": "flex", - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-flex-single.json b/test/fixtures/controller.bar/bar-thickness-flex-single.json index f523f4f5fc6..a59b2aff802 100644 --- a/test/fixtures/controller.bar/bar-thickness-flex-single.json +++ b/test/fixtures/controller.bar/bar-thickness-flex-single.json @@ -5,6 +5,9 @@ "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ "backgroundColor": "#FF6384", + "barThickness": "flex", + "barPercentage": 1, + "categoryPercentage": 1, "data": [1] }] }, @@ -16,9 +19,6 @@ "xAxes": [{ "type": "time", "display": false, - "barThickness": "flex", - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-flex.json b/test/fixtures/controller.bar/bar-thickness-flex.json index c800a0af067..b9048faed0a 100644 --- a/test/fixtures/controller.bar/bar-thickness-flex.json +++ b/test/fixtures/controller.bar/bar-thickness-flex.json @@ -5,6 +5,9 @@ "labels": ["2017", "2018", "2020", "2024", "2038"], "datasets": [{ "backgroundColor": "#FF6384", + "barPercentage": 1, + "categoryPercentage": 1, + "barThickness": "flex", "data": [1, null, 3, 4, 5] }] }, @@ -16,9 +19,6 @@ "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, - "barThickness": "flex", "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-max.json b/test/fixtures/controller.bar/bar-thickness-max.json index 3430b8c9390..2ca185516bc 100644 --- a/test/fixtures/controller.bar/bar-thickness-max.json +++ b/test/fixtures/controller.bar/bar-thickness-max.json @@ -5,6 +5,9 @@ "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ "backgroundColor": "#FF6384", + "barPercentage": 1, + "categoryPercentage": 1, + "maxBarThickness": 8, "data": [1, null, 3, 4, 5] }] }, @@ -16,9 +19,6 @@ "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, - "maxBarThickness": 8, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-min-interval.json b/test/fixtures/controller.bar/bar-thickness-min-interval.json index 41fd8676a45..954e15cfdf6 100644 --- a/test/fixtures/controller.bar/bar-thickness-min-interval.json +++ b/test/fixtures/controller.bar/bar-thickness-min-interval.json @@ -5,6 +5,8 @@ "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ "backgroundColor": "#FF6384", + "barPercentage": 1, + "categoryPercentage": 1, "data": [1, null, 3, 4, 5] }] }, @@ -16,8 +18,6 @@ "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-multiple.json b/test/fixtures/controller.bar/bar-thickness-multiple.json index 3dcddaff0e7..f26a395fb4d 100644 --- a/test/fixtures/controller.bar/bar-thickness-multiple.json +++ b/test/fixtures/controller.bar/bar-thickness-multiple.json @@ -18,12 +18,16 @@ "responsive": false, "legend": false, "title": false, + "datasets": { + "bar": { + "barPercentage": 1, + "categoryPercentage": 1 + } + }, "scales": { "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-no-overlap.json b/test/fixtures/controller.bar/bar-thickness-no-overlap.json index 9b06e512718..2bfee4436c6 100644 --- a/test/fixtures/controller.bar/bar-thickness-no-overlap.json +++ b/test/fixtures/controller.bar/bar-thickness-no-overlap.json @@ -18,12 +18,16 @@ "responsive": false, "legend": false, "title": false, + "datasets": { + "bar": { + "barPercentage": 1, + "categoryPercentage": 1 + } + }, "scales": { "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY-MM" }, diff --git a/test/fixtures/controller.bar/bar-thickness-offset.json b/test/fixtures/controller.bar/bar-thickness-offset.json index 78ff4e2dd9c..8785569570b 100644 --- a/test/fixtures/controller.bar/bar-thickness-offset.json +++ b/test/fixtures/controller.bar/bar-thickness-offset.json @@ -18,13 +18,17 @@ "responsive": false, "legend": false, "title": false, + "datasets": { + "bar": { + "barPercentage": 1, + "categoryPercentage": 1 + } + }, "scales": { "xAxes": [{ "type": "time", "offset": true, "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-reverse.json b/test/fixtures/controller.bar/bar-thickness-reverse.json index 5e868370f75..215858dd8b7 100644 --- a/test/fixtures/controller.bar/bar-thickness-reverse.json +++ b/test/fixtures/controller.bar/bar-thickness-reverse.json @@ -18,12 +18,16 @@ "responsive": false, "legend": false, "title": false, + "datasets": { + "bar": { + "barPercentage": 1, + "categoryPercentage": 1 + } + }, "scales": { "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-single-xy.json b/test/fixtures/controller.bar/bar-thickness-single-xy.json index 20446e80887..68a99a90853 100644 --- a/test/fixtures/controller.bar/bar-thickness-single-xy.json +++ b/test/fixtures/controller.bar/bar-thickness-single-xy.json @@ -4,6 +4,8 @@ "data": { "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ + "barPercentage": 1, + "categoryPercentage": 1, "backgroundColor": "#FF6384", "data": [{"x": "2022", "y": 42}] }] @@ -16,8 +18,6 @@ "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-single.json b/test/fixtures/controller.bar/bar-thickness-single.json index 59e5fcb9a90..1b6565ed0a2 100644 --- a/test/fixtures/controller.bar/bar-thickness-single.json +++ b/test/fixtures/controller.bar/bar-thickness-single.json @@ -4,6 +4,8 @@ "data": { "labels": ["2016", "2018", "2020", "2024", "2030"], "datasets": [{ + "barPercentage": 1, + "categoryPercentage": 1, "backgroundColor": "#FF6384", "data": [1] }] @@ -16,8 +18,6 @@ "xAxes": [{ "type": "time", "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/fixtures/controller.bar/bar-thickness-stacked.json b/test/fixtures/controller.bar/bar-thickness-stacked.json index effb2f4fb71..3c9f01c2867 100644 --- a/test/fixtures/controller.bar/bar-thickness-stacked.json +++ b/test/fixtures/controller.bar/bar-thickness-stacked.json @@ -18,13 +18,17 @@ "responsive": false, "legend": false, "title": false, + "datasets": { + "bar": { + "barPercentage": 1, + "categoryPercentage": 1 + } + }, "scales": { "xAxes": [{ "type": "time", "stacked": true, "display": false, - "barPercentage": 1, - "categoryPercentage": 1, "time": { "parser": "YYYY" }, diff --git a/test/specs/controller.bar.tests.js b/test/specs/controller.bar.tests.js index e52c9340fc1..49b586fd81e 100644 --- a/test/specs/controller.bar.tests.js +++ b/test/specs/controller.bar.tests.js @@ -1214,12 +1214,16 @@ describe('Chart.controllers.bar', function() { options: { legend: false, title: false, + datasets: { + bar: { + barPercentage: 1, + } + }, scales: { xAxes: [{ type: 'category', display: false, stacked: true, - barPercentage: 1, }], yAxes: [{ type: 'logarithmic', @@ -1275,12 +1279,16 @@ describe('Chart.controllers.bar', function() { options: { legend: false, title: false, + datasets: { + bar: { + barPercentage: 1, + } + }, scales: { xAxes: [{ type: 'category', display: false, stacked: true, - barPercentage: 1, }], yAxes: [{ type: 'logarithmic', @@ -1670,11 +1678,15 @@ describe('Chart.controllers.bar', function() { options: { legend: false, title: false, + datasets: { + bar: { + barThickness: barThickness + } + }, scales: { xAxes: [{ id: 'x', type: 'category', - barThickness: barThickness }], yAxes: [{ type: 'linear',