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/12/02 11:13:12 UTC

[incubator-echarts] branch fix-interaction-test created (now 3fff2a6)

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

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


      at 3fff2a6  test(visual): fix replay of interactions.

This branch includes the following new commits:

     new 3fff2a6  test(visual): fix replay of interactions.

The 1 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/01: test(visual): fix replay of interactions.

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

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

commit 3fff2a698814cf8c5065a9ed1aaa76976f87e0bf
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Dec 2 19:12:42 2019 +0800

    test(visual): fix replay of interactions.
---
 test/lib/config.js                           | 11 +++++++++--
 test/polar-rounded.html                      |  4 ++--
 test/runTest/actions/__meta__.json           |  2 +-
 test/runTest/actions/area-stack.json         |  2 +-
 test/runTest/actions/axis-lastLabel.json     |  2 +-
 test/runTest/actions/bar-label-rotation.json |  2 +-
 test/runTest/actions/bar-large.json          |  2 +-
 test/runTest/actions/bar.json                |  2 +-
 test/runTest/actions/bar2.json               |  2 +-
 test/runTest/actions/brush.json              |  2 +-
 test/runTest/actions/polar-rounded.json      |  2 +-
 11 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/test/lib/config.js b/test/lib/config.js
index 379d7b6..c980f4e 100644
--- a/test/lib/config.js
+++ b/test/lib/config.js
@@ -90,8 +90,15 @@
 
     // Not let scrollbar affect page size.
     // It will AFFECT interaction in the automatic testing.
-    window.onload = function () {
-        document.body.style.cssText = 'overflow:overlay!important';
+    if (typeof MutationObserver !== 'undefined') {
+        // Must be set as soon as possible(before chart is created)
+        var observer = new MutationObserver(function() {
+            if (document.body) {
+                document.body.style.cssText = 'overflow:overlay!important';
+                observer.disconnect();
+            }
+        });
+        observer.observe(document.documentElement, {childList: true});
     };
 
     // It is not a good solution.
diff --git a/test/polar-rounded.html b/test/polar-rounded.html
index 3e4f8a8..19b2cef 100644
--- a/test/polar-rounded.html
+++ b/test/polar-rounded.html
@@ -317,12 +317,12 @@ under the License.
                         coordinateSystem: 'polar',
                         name: 'A',
                         roundCap: true,
-                        animationDuration:5 * 1000,
+                        animationDuration:500,
                         color: `rgba(${hoverColors[hoverIndex]},0.5)`,
                         itemStyle: {
                             borderColor: `rgb(${hoverColors[hoverIndex]})`,
                             borderWidth: 0
-                        }, 
+                        },
                         emphasis: {
                             itemStyle: {
                                 color: `rgb(${hoverColors[hoverIndex]})`,
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index 8fcd269..81220b7 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -109,7 +109,7 @@
   "pie-action": 1,
   "pie-alignTo": 4,
   "pie-calculable": 1,
-  "polar-rounded": 2,
+  "polar-rounded": 3,
   "polarLine": 1,
   "polarScatter": 1,
   "radar": 1,
diff --git a/test/runTest/actions/area-stack.json b/test/runTest/actions/area-stack.json
index 347fce4..1a5c995 100644
--- a/test/runTest/actions/area-stack.json
+++ b/test/runTest/actions/area-stack.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":430,"x":95,"y":71},{"type":"mouseup","time":539,"x":95,"y":71},{"time":540,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":655,"x":96,"y":70},{"type":"mousemove","time":856,"x":144,"y":71},{"type":"mousedown","time":1036,"x":144,"y":71},{"type":"mouseup","time":1139,"x":144,"y":71},{"time":1140,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":1239,"x":145,"y":70},{"type":"mousemove","time":1439,"x":166 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":408,"x":78,"y":68},{"type":"mouseup","time":513,"x":78,"y":68},{"time":514,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":653,"x":79,"y":68},{"type":"mousemove","time":866,"x":134,"y":63},{"type":"mousedown","time":1068,"x":135,"y":63},{"type":"mousemove","time":1120,"x":135,"y":63},{"type":"mouseup","time":1187,"x":135,"y":63},{"time":1188,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":1287,"x":136 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/axis-lastLabel.json b/test/runTest/actions/axis-lastLabel.json
index 8888196..b0bba4f 100644
--- a/test/runTest/actions/axis-lastLabel.json
+++ b/test/runTest/actions/axis-lastLabel.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":503,"x":385,"y":433},{"type":"mousemove","time":1342,"x":385,"y":433},{"type":"mousemove","time":1542,"x":353,"y":433},{"type":"mousemove","time":1748,"x":310,"y":432},{"type":"mousemove","time":1948,"x":279,"y":433},{"type":"mousemove","time":2152,"x":242,"y":433},{"type":"mousemove","time":2352,"x":226,"y":434},{"type":"mousemove","time":2557,"x":205,"y":435},{"type":"mousemove","time":2768,"x":188,"y":436},{"type":"mousemove","time [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":503,"x":385,"y":433},{"type":"mousemove","time":1342,"x":385,"y":433},{"type":"mousemove","time":1542,"x":353,"y":433},{"type":"mousemove","time":1748,"x":310,"y":432},{"type":"mousemove","time":1948,"x":279,"y":433},{"type":"mousemove","time":2152,"x":242,"y":433},{"type":"mousemove","time":2352,"x":226,"y":434},{"type":"mousemove","time":2557,"x":205,"y":435},{"type":"mousemove","time":2768,"x":188,"y":436},{"type":"mousemove","time [...]
\ No newline at end of file
diff --git a/test/runTest/actions/bar-label-rotation.json b/test/runTest/actions/bar-label-rotation.json
index f073cf2..340a46f 100644
--- a/test/runTest/actions/bar-label-rotation.json
+++ b/test/runTest/actions/bar-label-rotation.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":298,"x":329,"y":9},{"type":"mouseup","time":470,"x":329,"y":9},{"time":471,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1166,"x":333,"y":9},{"type":"mousemove","time":1367,"x":379,"y":13},{"type":"mousedown","time":1447,"x":379,"y":13},{"type":"mouseup","time":1565,"x":379,"y":13},{"time":1566,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1625,"x":380,"y":13},{"type":"mousemove","time":1834,"x":3 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":318,"x":322,"y":14},{"type":"mouseup","time":438,"x":322,"y":14},{"time":439,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":688,"x":322,"y":13},{"type":"mousemove","time":888,"x":374,"y":3},{"type":"mousedown","time":1054,"x":376,"y":4},{"type":"mouseup","time":1137,"x":376,"y":4},{"time":1138,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1167,"x":376,"y":4},{"type":"mousemove","time":1202,"x":376, [...]
\ No newline at end of file
diff --git a/test/runTest/actions/bar-large.json b/test/runTest/actions/bar-large.json
index 5f0a3bf..6201047 100644
--- a/test/runTest/actions/bar-large.json
+++ b/test/runTest/actions/bar-large.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":427,"x":308,"y":15},{"type":"mouseup","time":529,"x":308,"y":15},{"time":530,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":1244,"x":310,"y":15},{"type":"mousemove","time":1445,"x":349,"y":12},{"type":"mousedown","time":1537,"x":349,"y":12},{"type":"mouseup","time":1649,"x":349,"y":12},{"time":1650,"delay":800,"type":"screenshot-auto"},{"type":"mousemove","time":1702,"x":349,"y":12},{"type":"mousemove","time":1902,"x [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":476,"x":296,"y":46},{"type":"mouseup","time":566,"x":296,"y":46},{"time":567,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":767,"x":297,"y":46},{"type":"mousemove","time":978,"x":416,"y":52},{"type":"mousemove","time":1180,"x":410,"y":51},{"type":"mousemove","time":1380,"x":385,"y":48},{"type":"mousedown","time":1466,"x":385,"y":48},{"type":"mouseup","time":1543,"x":385,"y":48},{"time":1544,"delay":400,"type":"screen [...]
\ No newline at end of file
diff --git a/test/runTest/actions/bar.json b/test/runTest/actions/bar.json
index 0752913..70f5984 100644
--- a/test/runTest/actions/bar.json
+++ b/test/runTest/actions/bar.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"screenshot","time":1529},{"type":"mousedown","time":2115,"x":183,"y":21},{"type":"mouseup","time":2205,"x":183,"y":21},{"time":2206,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":2482,"x":184,"y":21},{"type":"mousemove","time":2683,"x":219,"y":20},{"type":"mousemove","time":2825,"x":222,"y":20},{"type":"mousemove","time":3026,"x":225,"y":19},{"type":"mousedown","time":3058,"x":225,"y":19},{"type":"mouseup","time":3139,"x":225,"y":19}, [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":284,"x":187,"y":16},{"type":"mouseup","time":401,"x":187,"y":16},{"time":402,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":488,"x":187,"y":16},{"type":"mousemove","time":690,"x":237,"y":18},{"type":"mousemove","time":890,"x":241,"y":17},{"type":"mousedown","time":954,"x":241,"y":17},{"type":"mouseup","time":1037,"x":241,"y":17},{"time":1038,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1338,"x":24 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/bar2.json b/test/runTest/actions/bar2.json
index 2fe2e42..7e371cb 100644
--- a/test/runTest/actions/bar2.json
+++ b/test/runTest/actions/bar2.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousemove","time":50,"x":246,"y":222},{"type":"mousemove","time":256,"x":337,"y":215},{"type":"mousemove","time":470,"x":344,"y":215},{"type":"mousedown","time":681,"x":344,"y":215},{"type":"mousemove","time":691,"x":344,"y":215},{"type":"mouseup","time":807,"x":344,"y":215},{"time":808,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1823,"x":344,"y":215},{"type":"mouseup","time":1958,"x":344,"y":215},{"time":1959,"delay":400,"type":"s [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":378,"x":371,"y":225},{"type":"mouseup","time":493,"x":371,"y":225},{"time":494,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":631,"x":371,"y":225},{"type":"mousemove","time":831,"x":430,"y":227},{"type":"mousedown","time":1014,"x":431,"y":227},{"type":"mouseup","time":1097,"x":431,"y":227},{"time":1098,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1133,"x":431,"y":227},{"type":"mousedown","time":15 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/brush.json b/test/runTest/actions/brush.json
index f4aca38..5b6c3ad 100644
--- a/test/runTest/actions/brush.json
+++ b/test/runTest/actions/brush.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":306,"x":293,"y":336},{"type":"mousemove","time":439,"x":294,"y":337},{"type":"mousemove","time":646,"x":361,"y":342},{"type":"mousemove","time":852,"x":362,"y":343},{"type":"mouseup","time":1052,"x":362,"y":343},{"time":1053,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":1184,"x":360,"y":346},{"type":"mousemove","time":1384,"x":345,"y":456},{"type":"mousemove","time":1586,"x":346,"y":471},{"type":"mousemove","time":1 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":306,"x":293,"y":336},{"type":"mousemove","time":439,"x":294,"y":337},{"type":"mousemove","time":646,"x":361,"y":342},{"type":"mousemove","time":852,"x":362,"y":343},{"type":"mouseup","time":1052,"x":362,"y":343},{"time":1053,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":1184,"x":360,"y":346},{"type":"mousemove","time":1384,"x":345,"y":456},{"type":"mousemove","time":1586,"x":346,"y":471},{"type":"mousemove","time":1 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/polar-rounded.json b/test/runTest/actions/polar-rounded.json
index 0a74a49..9f13920 100644
--- a/test/runTest/actions/polar-rounded.json
+++ b/test/runTest/actions/polar-rounded.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousemove","time":483,"x":796,"y":244},{"type":"mousemove","time":691,"x":694,"y":198},{"type":"mousemove","time":910,"x":672,"y":197},{"type":"mousemove","time":1115,"x":671,"y":197},{"type":"mousemove","time":1315,"x":433,"y":121},{"type":"mousemove","time":1523,"x":415,"y":121},{"type":"mousedown","time":1617,"x":418,"y":126},{"type":"mousemove","time":1728,"x":418,"y":126},{"type":"mouseup","time":1796,"x":418,"y":126},{"time":1797,"delay":400,"typ [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":475,"x":454,"y":90},{"type":"mouseup","time":548,"x":454,"y":90},{"time":549,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":862,"x":453,"y":90},{"type":"mousemove","time":1062,"x":347,"y":82},{"type":"mousedown","time":1273,"x":347,"y":82},{"type":"mouseup","time":1351,"x":347,"y":82},{"time":1352,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2041,"x":347,"y":82},{"type":"mouseup","time":2115,"x":3 [...]
\ 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