Skip to content

Commit 4f5119d

Browse files
authored
Merge pull request #51 from vizzuhq/veghdev
integration test: add option tests
2 parents 611a2e8 + e593cb3 commit 4f5119d

File tree

55 files changed

+1001
-0
lines changed

Some content is hidden

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

55 files changed

+1001
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url)),
6+
Chart.animated(new URL(import.meta.url))
7+
]
8+
9+
10+
export default testSteps
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url)),
6+
Chart.animated(new URL(import.meta.url))
7+
]
8+
9+
10+
export default testSteps
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { data } from "/test/integration/test_options/data2.js";
2+
3+
4+
export default class Chart {
5+
static static(width, type) {
6+
return chart => {
7+
let name = width.pathname.split("/").pop().split(".").shift();
8+
let length1 = name.split("-").shift();
9+
if (type) {
10+
length1 = length1.toString() + type;
11+
}
12+
console.log("plot xAxis ticks length: " + length1);
13+
return chart.animate(
14+
{
15+
data: data,
16+
config : {
17+
geometry: "circle",
18+
channels: {
19+
x: { attach: [ "Foo"] },
20+
y: { attach: [ "Bar"] }
21+
},
22+
title: null,
23+
legend: null,
24+
},
25+
style: {
26+
plot: {
27+
xAxis: {
28+
ticks: {
29+
length: length1
30+
}
31+
}
32+
}
33+
}
34+
});
35+
}
36+
}
37+
38+
static animated(width, type) {
39+
return chart => {
40+
let name = width.pathname.split("/").pop().split(".").shift();
41+
let length2 = name.split("-").pop();
42+
if (type) {
43+
length2 = length2.toString() + type;
44+
}
45+
console.log("plot xAxis ticks length: " + length2);
46+
return chart.animate(
47+
{
48+
style: {
49+
plot: {
50+
xAxis: {
51+
ticks: {
52+
length: length2
53+
}
54+
}
55+
}
56+
}
57+
})
58+
};
59+
}
60+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), 'em')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), 'em')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), 'em')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), '%')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), '%')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url), '%')
6+
]
7+
8+
9+
export default testSteps
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Chart from "/test/integration/test_options/style/plot/xAxis/ticks/length/chart.js";
2+
3+
4+
const testSteps = [
5+
Chart.static(new URL(import.meta.url))
6+
]
7+
8+
9+
export default testSteps

0 commit comments

Comments
 (0)