Skip to content

Commit 546dbae

Browse files
committed
integration test: add option tests
1 parent 7353916 commit 546dbae

File tree

118 files changed

+1886
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1886
-1
lines changed

test/integration/test_options/style/plot/backgroundColor/data.js renamed to test/integration/test_options/data.js

File renamed without changes.

test/integration/test_options/style/plot/backgroundColor/chart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { data } from "/test/integration/test_options/style/plot/backgroundColor/data.js";
1+
import { data } from "/test/integration/test_options/data.js";
22

33

44
export default class Chart {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { colors } from "/test/integration/test_options/style/colors.js";
2+
3+
4+
export default class Hex {
5+
static color(url) {
6+
let name = url.pathname.split("/").pop().split(".").shift();
7+
let color1 = "#" + colors[name.split("-").shift()].hex;
8+
let color2 = "#" + colors[name.split("-").pop()].hex;
9+
return {color1, color2};
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hex from "/test/integration/test_options/style/plot/borderColor/animated/hex.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hex.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hex.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hex from "/test/integration/test_options/style/plot/borderColor/animated/hex.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hex.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hex.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hex from "/test/integration/test_options/style/plot/borderColor/animated/hex.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hex.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hex.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hex from "/test/integration/test_options/style/plot/borderColor/animated/hex.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hex.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hex.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { colors } from "/test/integration/test_options/style/colors.js";
2+
import { transparency } from "/test/integration/test_options/style/transparency.js";
3+
4+
5+
export default class Hexa {
6+
static color(url) {
7+
let nameParts = url.pathname.split("/").pop().split(".");
8+
nameParts.pop();
9+
let name = nameParts.slice().join(".");
10+
let color1 = name.split("-")[0];
11+
let tr1 = name.split("-")[1];
12+
let color2 = name.split("-")[2];
13+
let tr2 = name.split("-")[3];
14+
color1 = "#" + colors[color1].hex + transparency[tr1];
15+
color2 = "#" + colors[color2].hex + transparency[tr2];
16+
return {color1, color2};
17+
}
18+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hexa from "/test/integration/test_options/style/plot/borderColor/animated/hexa.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hexa.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hexa.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Chart from "/test/integration/test_options/style/plot/borderColor/chart.js";
2+
import Hexa from "/test/integration/test_options/style/plot/borderColor/animated/hexa.js";
3+
4+
5+
const testSteps = [
6+
Chart.static(Hexa.color(new URL(import.meta.url)).color1),
7+
Chart.animated(Hexa.color(new URL(import.meta.url)).color2)
8+
]
9+
10+
11+
export default testSteps

0 commit comments

Comments
 (0)