You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2019/10/30 18:39:18 UTC

[incubator-echarts] branch fix-11112 created (now b64bb3b)

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a change to branch fix-11112
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


      at b64bb3b  test(visual): decrease the pass threshold of image diff.

This branch includes the following new commits:

     new 6b37ebc  test: add test case for #11112
     new b64bb3b  test(visual): decrease the pass threshold of image diff.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/02: test: add test case for #11112

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch fix-11112
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6b37ebc762592b9b19db99d498ebab17e873f4ab
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Oct 31 02:37:20 2019 +0800

    test: add test case for #11112
---
 test/axis-interval.html                 | 96 ++++++++++++++++++++++-----------
 test/runTest/actions/__meta__.json      |  1 +
 test/runTest/actions/axis-interval.json |  1 +
 3 files changed, 68 insertions(+), 30 deletions(-)

diff --git a/test/axis-interval.html b/test/axis-interval.html
index 46862a4..eae7abc 100644
--- a/test/axis-interval.html
+++ b/test/axis-interval.html
@@ -28,6 +28,7 @@ under the License.
     <script src="lib/jquery.min.js"></script>
     <script src="lib/facePrint.js"></script>
     <script src="lib/testHelper.js"></script>
+    <script src="lib/draggable.js"></script>
     <meta name="viewport" content="width=device-width, initial-scale=1" />
     <link rel="stylesheet" href="lib/reset.css">
 </head>
@@ -50,9 +51,7 @@ under the License.
     </style>
 
     <div class="chart" id="mainA"></div>
-    <h1>[ Test minInterval ]&nbsp;&nbsp;&nbsp; yAxis: {minInterval: 1, min: 0}, series.data: [1]</h1>
     <div class="chart" id="main0"></div>
-    <h1>[ Test category axis interval ]&nbsp;&nbsp;&nbsp; interval of xAxis should be approperiate after rotated.</h1>
     <div class="chart" id="main1"></div>
     <h1>[ Test time axis interval ]&nbsp;&nbsp;&nbsp; should not overlap when data zoom.</h1>
     <div class="chart" id="main2"></div>
@@ -65,8 +64,9 @@ under the License.
     <div class="chart" id="main34"></div>
     <div class="chart" id="main35"></div>
 
-
-
+    <div style="height: 600px;">
+        <div class="chart" id="main4"></div>
+    </div>
 
 
 
@@ -174,7 +174,10 @@ under the License.
                 ]
             };
 
-            testHelper.createChart(echarts, 'main0', option);
+            testHelper.create(echarts, 'main0', {
+                title: '[ Test minInterval ] yAxis: {minInterval: 1, min: 0}, series.data: [1]',
+                option: option
+            });
         });
 
     </script>
@@ -197,7 +200,7 @@ under the License.
 
             var categoryData = [];
             var data = [];
-            var rotate = 20;
+            var rotate = 0;
 
             for (var i = 0; i < 100; i++) {
                 categoryData.push(i + 'longlonglong');
@@ -252,31 +255,32 @@ under the License.
                 ]
             };
 
-            var chart = testHelper.createChart(echarts, 'main1', option, {height: 600});
-
-            chart && next();
-
-            function next() {
-                var nextInterval = rotate % 90 === 0 ? 2000 : 70;
-                rotate = (rotate + 1) % 360;
-                setTimeout(function () {
-                    chart.setOption({
-                        xAxis: {
-                            id: 'category',
-                            axisLabel: {
-                                rotate: rotate
-                            }
-                        },
-                        yAxis: {
-                            id: 'category',
-                            axisLabel: {
-                                rotate: rotate
+            var chart = testHelper.create(echarts, 'main1', {
+                title: '[ Test category axis interval ] interval of xAxis should be approperiate after rotated.',
+                option: option,
+                height: 600,
+
+                buttons: [{
+                    text: 'Rotate',
+                    onclick: function () {
+                        rotate = (rotate + 30) % 360;
+                        chart.setOption({
+                            xAxis: {
+                                id: 'category',
+                                axisLabel: {
+                                    rotate: rotate
+                                }
+                            },
+                            yAxis: {
+                                id: 'category',
+                                axisLabel: {
+                                    rotate: rotate
+                                }
                             }
-                        }
-                    });
-                    next();
-                }, nextInterval);
-            }
+                        });
+                    }
+                }]
+            });
         });
 
     </script>
@@ -423,7 +427,39 @@ under the License.
 
 
 
+    <script>
 
+        require([
+            'echarts'
+        ], function (echarts) {
+
+            var option = {
+                xAxis: {
+                    type: 'category',
+                    data: ['Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun'],
+                    axisLabel: {
+                        fontSize: 20
+                    }
+                },
+                yAxis: {
+                    type: 'value'
+                },
+                series: [{
+                    data: [120, 200, 150, 80, 70, 110, 130],
+                    type: 'bar'
+                }]
+            };
+
+
+            testHelper.create(echarts, 'main4', {
+                title: 'Label should not disappear after size changed. #11112',
+                option: option,
+                width: 700,
+                height: 300,
+                draggable: true
+            });
+        });
+    </script>
 
 
 </body>
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index 72d35ac..28b0f14 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -9,6 +9,7 @@
   "axes": 0,
   "axis": 1,
   "axis-boundaryGap": 1,
+  "axis-interval": 3,
   "axis-lastLabel": 5,
   "axis-multiple": 1,
   "axis-style": 2,
diff --git a/test/runTest/actions/axis-interval.json b/test/runTest/actions/axis-interval.json
new file mode 100644
index 0000000..cfeb3c6
--- /dev/null
+++ b/test/runTest/actions/axis-interval.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousedown","time":401,"x":450,"y":436},{"type":"mousemove","time":694,"x":450,"y":436},{"type":"mousemove","time":894,"x":479,"y":435},{"type":"mousemove","time":1104,"x":491,"y":433},{"type":"mouseup","time":1308,"x":491,"y":433},{"time":1309,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1848,"x":491,"y":433},{"type":"mousemove","time":2002,"x":492,"y":433},{"type":"mousemove","time":2202,"x":560,"y":438},{"type":"mousemove","time": [...]
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 02/02: test(visual): decrease the pass threshold of image diff.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch fix-11112
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit b64bb3b7ac0894b8f4d8394e9488f4a4039857b4
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Oct 31 02:38:31 2019 +0800

    test(visual): decrease the pass threshold of image diff.
---
 test/runTest/client/client.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/runTest/client/client.js b/test/runTest/client/client.js
index d574574..053e73f 100644
--- a/test/runTest/client/client.js
+++ b/test/runTest/client/client.js
@@ -26,7 +26,7 @@ function processTestsData(tests, oldTestsData) {
         test.index = idx;
         test.results.forEach(result => {
             // Threshold?
-            if (result.diffRatio < 0.001) {
+            if (result.diffRatio < 0.0001) {
                 passed++;
             }
             let timestamp = test.lastRun || 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org