diff --git a/test/e2e/accept-changes.cjs b/test/e2e/accept-changes.cjs index 2391c6ac3..8983f1b07 100644 --- a/test/e2e/accept-changes.cjs +++ b/test/e2e/accept-changes.cjs @@ -31,6 +31,8 @@ function copyHashes(failHashFile, refHashFile) { copyHashes('test_report/results/test_cases/test_cases.json', 'test_cases/test_cases.json') copyHashes('test_report/results/tests/style_tests/style_tests.json', 'tests/style_tests.json') +copyHashes('test_report/results/tests/docs/docs.json', 'tests/docs.json') copyHashes('test_report/results/tests/features/features.json', 'tests/features.json') copyHashes('test_report/results/tests/fixes/fixes.json', 'tests/fixes.json') +copyHashes('test_report/results/tests/tickets/tickets.json', 'tests/tickets.json') copyHashes('test_report/results/tests/config_tests/config_tests.json', 'tests/config_tests.json') diff --git a/test/e2e/man.cjs b/test/e2e/man.cjs index d001352a9..876187d57 100644 --- a/test/e2e/man.cjs +++ b/test/e2e/man.cjs @@ -42,6 +42,7 @@ The animation of the selected test case will be displayed using the chosen Vizzu '/test/e2e/tests/style_tests.json', '/test/e2e/tests/features.json', '/test/e2e/tests/fixes.json', + '/test/e2e/tests/tickets.json', '/test/e2e/tests/docs.json' ]) diff --git a/test/e2e/test.cjs b/test/e2e/test.cjs index dca08bf7d..0fa499a8b 100644 --- a/test/e2e/test.cjs +++ b/test/e2e/test.cjs @@ -61,6 +61,7 @@ Please note that the test require Chrome, ChromeDriver and Selenium Webdriver to '/test/e2e/tests/style_tests.json', '/test/e2e/tests/features.json', '/test/e2e/tests/fixes.json', + '/test/e2e/tests/tickets.json', '/test/e2e/tests/docs.json' ]) diff --git a/test/e2e/tests/tickets.json b/test/e2e/tests/tickets.json new file mode 100644 index 000000000..2f19cee55 --- /dev/null +++ b/test/e2e/tests/tickets.json @@ -0,0 +1,47 @@ +{ + "suite": "/test/e2e/tests/tickets", + "test": { + "138": { + "refs": ["9a881ef"] + }, + "142": { + "refs": ["50c45bb"] + }, + "145": { + "refs": ["3614647"] + }, + "146": { + "refs": ["b7a8d80"] + }, + "255": { + "refs": ["29b4a25"] + }, + "268": { + "refs": ["af2ddae"] + }, + "300": { + "refs": ["604d28a"] + }, + "361": { + "refs": ["5173b48"] + }, + "372": { + "refs": ["3738bd2"] + }, + "376": { + "refs": ["688e9fe"] + }, + "377": { + "refs": ["c6798ba"] + }, + "378": { + "refs": ["bc76860"] + }, + "397": { + "refs": ["f205e84"] + }, + "398": { + "refs": ["3a4906a"] + } + } +} diff --git a/test/e2e/tests/tickets/138.mjs b/test/e2e/tests/tickets/138.mjs new file mode 100644 index 000000000..fb5284faa --- /dev/null +++ b/test/e2e/tests/tickets/138.mjs @@ -0,0 +1,22 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['A', 'B', 'C', 'A', 'B', 'C'] }, + { name: 'Foo2', values: ['1', '1', '1', '2', '2', '2'] }, + { name: 'Bar', values: [15, 32, 12, 3, 2, 4] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + x: 'Foo', + color: 'Foo2', + y: { set: ['Bar', 'Foo2'], range: { max: 1.2 } }, + align: 'stretch' + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/142.mjs b/test/e2e/tests/tickets/142.mjs new file mode 100644 index 000000000..a32755a8b --- /dev/null +++ b/test/e2e/tests/tickets/142.mjs @@ -0,0 +1,29 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'X', values: ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B'] }, + { name: 'Y0', values: ['A', 'A', 'B', 'B', 'A', 'A', 'B', 'B'] }, + { name: 'Y1', values: ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'] }, + { name: 'm', values: [4, 3, 2, 1, 10, 6, 7, -8] }, + { name: 'm0', values: [1, 2, 1, 3, 2, 1, 4, 3] }, + { name: 'm1', values: [2, 2.5, 3, 1, 1, 3, 2, 1.5] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + y: ['Y0', 'm'], + x: ['X', 'm0'] + }), + (chart) => + chart.animate({ + y: ['Y1', 'm'], + x: ['X', 'm1'], + color: 'Y1' + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/145.mjs b/test/e2e/tests/tickets/145.mjs new file mode 100644 index 000000000..5206baafe --- /dev/null +++ b/test/e2e/tests/tickets/145.mjs @@ -0,0 +1,30 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'X', values: ['A', 'B', 'C', 'D'] }, + { name: 'm', values: [3, 1, 2, 4] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + config: { + y: 'm', + x: { set: 'X', range: { min: 1, max: 3 } }, + geometry: 'line' + }, + style: { + paddingRight: 100, + paddingLeft: 100 + } + }), + (chart) => + chart.animate({ + x: { range: { min: 0.99, max: 3.01 } } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/146.mjs b/test/e2e/tests/tickets/146.mjs new file mode 100644 index 000000000..71b2f0230 --- /dev/null +++ b/test/e2e/tests/tickets/146.mjs @@ -0,0 +1,33 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { + name: 'Colors', + type: 'dimension', + values: ['red', 'green', 'blue', 'red', 'green', 'blue', 'red', 'green', 'blue'] + }, + { + name: 'Letters', + type: 'dimension', + values: ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'] + }, + { + name: 'Val', + type: 'measure', + values: [3, -5, 4, -4, 6, 5, -5, 7, 6] + } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + y: ['Colors', 'Val'], + x: 'Letters', + split: true + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/255.mjs b/test/e2e/tests/tickets/255.mjs new file mode 100644 index 000000000..08f239a65 --- /dev/null +++ b/test/e2e/tests/tickets/255.mjs @@ -0,0 +1,34 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Bar', values: [15, 32, 12] }, + { name: 'Baz', values: [5, 3, 2] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + config: { + x: 'Foo', + y: { set: 'Bar', markerGuides: true }, + geometry: 'area' + }, + style: { + plot: { + marker: { + fillOpacity: 0.3, + guides: { + lineWidth: 2, + color: '#FF0000' + } + } + } + } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/268.mjs b/test/e2e/tests/tickets/268.mjs new file mode 100644 index 000000000..d8af0b7ce --- /dev/null +++ b/test/e2e/tests/tickets/268.mjs @@ -0,0 +1,27 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Alice', 'Bob'] }, + { name: 'Foo2', values: ['A', 'A', 'B', 'B'] }, + { name: 'Bar', values: [15, 32, 12, 23] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + x: ['Foo', 'Foo2'], + y: 'max(Bar)', + color: 'Foo2' + }), + (chart) => + chart.animate({ + x: 'Foo', + y: 'max(Bar)', + color: null + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/300.mjs b/test/e2e/tests/tickets/300.mjs new file mode 100644 index 000000000..c9d45d46d --- /dev/null +++ b/test/e2e/tests/tickets/300.mjs @@ -0,0 +1,29 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Bar', values: [15, 32, 12] }, + { name: 'Baz', values: [5, 3, 2] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + title: 'Foo' + }), + (chart) => + chart.animate({ + config: { + x: 'Foo', + y: 'Bar' + }, + style: { + paddingLeft: '200px' + } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/361.mjs b/test/e2e/tests/tickets/361.mjs new file mode 100644 index 000000000..469a1f971 --- /dev/null +++ b/test/e2e/tests/tickets/361.mjs @@ -0,0 +1,23 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Bar', values: [15, 32, 28] }, + { name: 'Baz', values: [5, 3, 2] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + x: ['Foo', 'Baz'], + y: { set: ['Bar'], range: { max: 20 } }, + label: 'Bar', + color: 'Foo', + coordSystem: 'polar' + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/372.mjs b/test/e2e/tests/tickets/372.mjs new file mode 100644 index 000000000..a8f1d7aca --- /dev/null +++ b/test/e2e/tests/tickets/372.mjs @@ -0,0 +1,23 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted', 'Alice', 'Bob', 'Ted'] }, + { name: 'Foo3', values: ['a', 'a', 'b', 'b', 'c', 'c'] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + color: ['Foo'] + }), + (chart) => + chart.animate({ + color: ['Foo3'], + label: ['Foo'] + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/376.mjs b/test/e2e/tests/tickets/376.mjs new file mode 100644 index 000000000..7c26757e1 --- /dev/null +++ b/test/e2e/tests/tickets/376.mjs @@ -0,0 +1,29 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Bar', values: [15, 0.1, 12] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + config: { + size: 'Bar', + color: 'Foo', + geometry: 'circle' + }, + style: { + plot: { + marker: { + circleMinRadius: 0.05 + } + } + } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/377.mjs b/test/e2e/tests/tickets/377.mjs new file mode 100644 index 000000000..4860da2d3 --- /dev/null +++ b/test/e2e/tests/tickets/377.mjs @@ -0,0 +1,35 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Bar', values: [15, 4, 12] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate( + { + y: 'Bar' + }, + 1 + ), + (chart) => + chart.animate({ + config: { + x: 'Foo', + color: 'Foo' + }, + style: { + plot: { + marker: { + colorPalette: '#9355e8FF #123456FF #BDAF10FF' + } + } + } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/378.mjs b/test/e2e/tests/tickets/378.mjs new file mode 100644 index 000000000..41026f556 --- /dev/null +++ b/test/e2e/tests/tickets/378.mjs @@ -0,0 +1,26 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: Array.from(Array(120).keys()).map((x) => x + '.') }, + { + name: 'Bar', + values: [100, 100, 100, 100, 100, 100, 65].concat( + Array.from(Array(113).keys()).map((x) => 1) + ) + } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + size: 'Bar', + color: 'Foo', + geometry: 'circle', + legend: null + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/397.mjs b/test/e2e/tests/tickets/397.mjs new file mode 100644 index 000000000..5f8be0ac2 --- /dev/null +++ b/test/e2e/tests/tickets/397.mjs @@ -0,0 +1,27 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted'] }, + { name: 'Baz', values: [3, 5, 2] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + x: 'Foo', + y: 'Baz' + }), + (chart) => + chart.animate({ + x: { step: 2 } + }), + (chart) => + chart.animate({ + x: { step: 3 } + }) +] + +export default testSteps diff --git a/test/e2e/tests/tickets/398.mjs b/test/e2e/tests/tickets/398.mjs new file mode 100644 index 000000000..aa28933ce --- /dev/null +++ b/test/e2e/tests/tickets/398.mjs @@ -0,0 +1,28 @@ +const testSteps = [ + (chart) => { + const data = { + series: [ + { name: 'Foo', values: ['Alice', 'Bob', 'Ted', 'Alice', 'Bob', 'Ted', 'Alice'] }, + { name: 'Foo2', values: ['A', 'A', 'A', 'B', 'B', 'B', 'A'] }, + { name: 'Foo3', values: ['X', 'X', 'X', 'X', 'X', 'X', 'Y'] }, + { name: 'Baz', values: [17, 5, 2, 10, 30, 31, 10] } + ] + } + + return chart.animate({ data }) + }, + (chart) => + chart.animate({ + x: ['Foo', 'Foo2'], + y: 'Baz', + color: 'Foo', + geometry: 'circle', + sort: 'byValue' + }), + (chart) => + chart.animate({ + y: ['Foo3', 'Baz'] + }) +] + +export default testSteps