Skip to content

Commit 3323f77

Browse files
committed
integration test: restructure option tests
1 parent 2e1de87 commit 3323f77

File tree

129 files changed

+1087
-584
lines changed

Some content is hidden

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

129 files changed

+1087
-584
lines changed

test/integration/modules/integration-test/test-case/test-cases.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class TestCases {
3030
testCasesList = testCasesList.flat(1);
3131
Promise.all(filteredTestCasesReadyList).then(filteredTestCasesList => {
3232
filteredTestCasesList = filteredTestCasesList.flat(1);
33+
testCasesList.sort();
34+
filteredTestCasesList.sort();
3335
return resolve({testCases: testCasesList, filteredTestCases: filteredTestCasesList});
3436
});
3537
}).catch(err => {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
export var colors = {
2+
black: {
3+
hex: "000000",
4+
rgb: "0,0,0"
5+
},
6+
blue: {
7+
hex: "0000FF",
8+
rgb: "0,0,255"
9+
},
10+
blue_custom: {
11+
hex: "1A2B3C",
12+
rgb: "26,43,60"
13+
},
14+
lime: {
15+
hex: "00FF00",
16+
rgb: "0,255,0"
17+
},
18+
cyan: {
19+
hex: "00FFFF",
20+
rgb: "0,255,255"
21+
},
22+
red: {
23+
hex: "FF0000",
24+
rgb: "255,0,0"
25+
},
26+
magenta: {
27+
hex: "FF00FF",
28+
rgb: "255,0,255"
29+
},
30+
yellow: {
31+
hex: "FFFF00",
32+
rgb: "255,255,0"
33+
},
34+
yellow_custom: {
35+
hex: "E5D4C3",
36+
rgb: "229,212,195"
37+
},
38+
white: {
39+
hex: "FFFFFF",
40+
rgb: "255,255,255"
41+
}
42+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { data } from "/test/integration/test_options/style/plot/backgroundColor/data.js";
2+
3+
4+
export default class Chart {
5+
static static(color) {
6+
return chart => {
7+
console.log("plot backgroundColor color: " + color);
8+
return chart.animate(
9+
{
10+
data: data,
11+
config : {
12+
channels: {
13+
x: { attach: [ "Foo"] },
14+
y: { attach: [ "Bar"] }
15+
},
16+
title: null,
17+
legend: null,
18+
},
19+
style: {
20+
plot: { backgroundColor: color }
21+
}
22+
});
23+
}
24+
}
25+
26+
static animated(color) {
27+
return chart => {
28+
console.log("plot backgroundColor color: " + color);
29+
return chart.animate(
30+
{
31+
style: {
32+
plot: { backgroundColor: color }
33+
}
34+
})
35+
};
36+
}
37+
};

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

File renamed without changes.

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

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 color = name.split("-").shift();
8+
let type = name.split("-").pop();
9+
let ans = "#" + colors[color].hex.toUpperCase();
10+
if (type === "lowercase") {
11+
ans = ans.toLowerCase();
12+
}
13+
return ans;
14+
}
15+
}

test/integration/test_options/style/plot/backgroundColor/static/hex/000000.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/integration/test_options/style/plot/backgroundColor/static/hex/0000FF.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/integration/test_options/style/plot/backgroundColor/static/hex/00FF00.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/integration/test_options/style/plot/backgroundColor/static/hex/00FFFF.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)