You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2023/05/14 10:21:59 UTC

[echarts] 01/01: test(pie): add a test case to cover #18412

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

wangzx pushed a commit to branch test/pie-selectedOffset
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit bb403c1d4d532c136a0f70b12d351a1474b8d201
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun May 7 02:16:36 2023 +0800

    test(pie): add a test case to cover #18412
---
 test/pie.html                      | 35 ++++++++++++++++++++++++++++++++++-
 test/runTest/actions/__meta__.json |  2 +-
 test/runTest/actions/pie.json      |  2 +-
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/test/pie.html b/test/pie.html
index 159c6199e..0c4c43254 100644
--- a/test/pie.html
+++ b/test/pie.html
@@ -35,7 +35,7 @@ under the License.
         <div id="main"></div>
         <div id="main2"></div>
         <div id="main3"></div>
-
+        <div id="main4"></div>
 
         <script>
             var chart;
@@ -387,7 +387,40 @@ under the License.
             });
         </script>
 
+        <script>
+            require([
+                'echarts'
+            ], function (echarts) {
+                var option = {
+                    series: [
+                        {
+                            type: 'pie',
+                            selectedMode: 'single',
+                            selectedOffset: 30,
+                            radius: [50, 100],
+                            hoverAnimation: false,
+                            animation: false,
+                            data: [
+                                { value: 0, name: 'Direct Access' },
+                                { value: 310, name: 'Email Marketing' },
+                                { value: 234, name: 'Website Ads' },
+                                { value: 135, name: 'Video Ads' },
+                                { value: 1548, name: 'Search Engine' }
+                            ]
+                        }
+                    ]
+                };
 
+                var chart = testHelper.create(echarts, 'main4', {
+                    title: [
+                        'Toggle select a sector and then hover on it',
+                        'The response area should be right when applied `selectedOffset` and disabled animation',
+                        'See also https://github.com/apache/echarts/issues/18412'
+                    ],
+                    option
+                });
+            });
+        </script>
 
     </body>
 </html>
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index b1cc9c96a..26040c210 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -148,7 +148,7 @@
   "parallel-aqi": 1,
   "parallel-nutrients": 1,
   "pictorial-repeat": 5,
-  "pie": 4,
+  "pie": 5,
   "pie-action": 1,
   "pie-alignTo": 4,
   "pie-animation": 2,
diff --git a/test/runTest/actions/pie.json b/test/runTest/actions/pie.json
index 7213f853c..4a490d017 100644
--- a/test/runTest/actions/pie.json
+++ b/test/runTest/actions/pie.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"inside","time":1802,"target":"select"},{"time":1803,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":2414,"x":654,"y":30},{"type":"mousemove","time":2615,"x":642,"y":22},{"type":"mousemove","time":2823,"x":638,"y":19},{"type":"mousemove","time":3040,"x":637,"y":17},{"type":"mousedown","time":3140,"x":637,"y":17},{"type":"mouseup","time":3240,"x": [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"inside","time":1802,"target":"select"},{"time":1803,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":2414,"x":654,"y":30},{"type":"mousemove","time":2615,"x":642,"y":22},{"type":"mousemove","time":2823,"x":638,"y":19},{"type":"mousemove","time":3040,"x":637,"y":17},{"type":"mousedown","time":3140,"x":637,"y":17},{"type":"mouseup","time":3240,"x": [...]
\ 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