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 2020/10/29 11:05:33 UTC

[incubator-echarts] branch add-test-interactions created (now fa71a37)

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

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


      at fa71a37  test: add more recorded interactions.

This branch includes the following new commits:

     new 484f9ae  test: fix nth child query in recorder
     new fa71a37  test: add more recorded interactions.

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: fix nth child query in recorder

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

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

commit 484f9ae99f2749f834f6d26b3b16fe4ab3228d75
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Oct 29 12:57:12 2020 +0800

    test: fix nth child query in recorder
---
 test/runTest/recorder/recorder.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/runTest/recorder/recorder.js b/test/runTest/recorder/recorder.js
index 3d4fe62..66f18de 100644
--- a/test/runTest/recorder/recorder.js
+++ b/test/runTest/recorder/recorder.js
@@ -23,13 +23,15 @@ function getNthChild(el) {
     let i = 1;
     let elTagName = el.tagName;
     let elClassName = el.className;
+    let nthSameClass = 1;
     while (el.previousSibling) {
         el = el.previousSibling;
-        if (el.tagName === elTagName && el.className === elClassName) { // TODO extra space in class name?
-            i++;
+        if (el.tagName === elTagName && el.className === elClassName) {
+            nthSameClass++;
         }
+        i++;
     }
-    return i;
+    return [i, nthSameClass];
 }
 function getUniqueSelector(el) {
     if (el.tagName.toLowerCase() === 'body') {
@@ -45,8 +47,8 @@ function getUniqueSelector(el) {
         for (let className of el.classList) {
             selector += '.' + className;
         }
-        let idx = getNthChild(el);
-        if (idx > 1) {
+        let [idx, nthSameClass] = getNthChild(el);
+        if (nthSameClass > 1) {
             selector += `:nth-child(${idx})`;
         }
     }


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


[incubator-echarts] 02/02: test: add more recorded interactions.

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

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

commit fa71a373423a5acea1b94340f80ccb47957a481d
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Oct 29 19:04:25 2020 +0800

    test: add more recorded interactions.
---
 test/browser-esm.html                        | 2 +-
 test/runTest/actions/__meta__.json           | 7 +++++++
 test/runTest/actions/dataSelect.json         | 1 +
 test/runTest/actions/decal.json              | 1 +
 test/runTest/actions/funnel.json             | 2 +-
 test/runTest/actions/hoverFocus.json         | 1 +
 test/runTest/actions/hoverFocus2.json        | 1 +
 test/runTest/actions/label-layout.json       | 1 +
 test/runTest/actions/line-boldWhenHover.json | 1 +
 test/runTest/actions/pie-label-extreme.json  | 1 +
 test/visualMap-continuous.html               | 7 +++----
 11 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/test/browser-esm.html b/test/browser-esm.html
index b12519b..7cd4a7f 100644
--- a/test/browser-esm.html
+++ b/test/browser-esm.html
@@ -57,7 +57,7 @@ under the License.
         </div>
 
         <script type="module">
-            import * as echarts from '../dist/echarts.esm.min';
+            import * as echarts from '../dist/echarts.esm.min.js';
             const charts = [];
             allChartsOptions.forEach(function (chartOption) {
                 chartOption.series.forEach(function (series) {
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index 57eeff3..663ac84 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -55,6 +55,7 @@
   "custom-children-remove": 1,
   "custom-hexbin": 2,
   "custom-text-content": 6,
+  "dataSelect": 7,
   "dataZoom-action": 4,
   "dataZoom-axes": 4,
   "dataZoom-axis-type": 3,
@@ -70,6 +71,7 @@
   "dataZoom-sync": 1,
   "dataZoom-toolbox": 6,
   "dataZoomHighPrecision": 3,
+  "decal": 1,
   "drag-out": 3,
   "dynamic-splitNumber": 1,
   "ec-event": 4,
@@ -85,14 +87,18 @@
   "heatmap": 1,
   "heatmap-map": 1,
   "homepage3": 1,
+  "hoverFocus": 9,
+  "hoverFocus2": 2,
   "hoverStyle": 14,
   "hoverStyle2": 1,
+  "label-layout": 1,
   "label-position": 1,
   "largeLine-tooltip": 1,
   "legend": 11,
   "legend-visualMapColor": 2,
   "line": 1,
   "line-animation": 1,
+  "line-boldWhenHover": 1,
   "line-crash": 1,
   "map": 3,
   "map-contour": 2,
@@ -114,6 +120,7 @@
   "pie-alignTo": 4,
   "pie-animation": 1,
   "pie-calculable": 1,
+  "pie-label-extreme": 2,
   "polar-rounded": 3,
   "polarLine": 1,
   "polarScatter": 1,
diff --git a/test/runTest/actions/dataSelect.json b/test/runTest/actions/dataSelect.json
new file mode 100644
index 0000000..96a2f6e
--- /dev/null
+++ b/test/runTest/actions/dataSelect.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousedown","time":603,"x":440,"y":155},{"type":"mouseup","time":705,"x":440,"y":155},{"time":706,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1229,"x":440,"y":156},{"type":"mousemove","time":1429,"x":437,"y":176},{"type":"mousemove","time":1636,"x":435,"y":183},{"type":"mousedown","time":1661,"x":435,"y":183},{"type":"mouseup","time":1738,"x":435,"y":183},{"time":1739,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time": [...]
\ No newline at end of file
diff --git a/test/runTest/actions/decal.json b/test/runTest/actions/decal.json
new file mode 100644
index 0000000..67edc26
--- /dev/null
+++ b/test/runTest/actions/decal.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousedown","time":356,"x":79,"y":461},{"type":"mouseup","time":433,"x":79,"y":461},{"time":434,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":470,"x":79,"y":462},{"type":"mousemove","time":670,"x":69,"y":463},{"type":"mousedown","time":836,"x":69,"y":463},{"type":"mouseup","time":903,"x":69,"y":463},{"time":904,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1159,"x":69,"y":463},{"type":"mouseup","time":1218,"x":69,"y [...]
\ No newline at end of file
diff --git a/test/runTest/actions/funnel.json b/test/runTest/actions/funnel.json
index e8a34b6..11590f1 100644
--- a/test/runTest/actions/funnel.json
+++ b/test/runTest/actions/funnel.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":"descending","time":1595,"target":"select"},{"time":1596,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1885,"x":666,"y":41},{"type":"mousemove","time":2085,"x":665,"y":41},{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string:nth-child(2)>div>div.c>select","value":"left","time":2995,"target":"select"},{"time":2996,"delay":40 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousemove","time":117,"x":700,"y":8},{"type":"mousemove","time":325,"x":696,"y":9},{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"descending","time":1640,"target":"select"},{"time":1641,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1652,"x":695,"y":0},{"type":"mousemove","time":1852,"x":678,"y":33},{"type":"mousemove","time":2060,"x":675,"y":39},{"type":"valuechange","selector":"d [...]
\ No newline at end of file
diff --git a/test/runTest/actions/hoverFocus.json b/test/runTest/actions/hoverFocus.json
new file mode 100644
index 0000000..d9e7feb
--- /dev/null
+++ b/test/runTest/actions/hoverFocus.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":370,"x":409,"y":156},{"type":"mousemove","time":579,"x":448,"y":261},{"type":"mousemove","time":796,"x":464,"y":300},{"type":"screenshot","time":1752},{"type":"mousemove","time":1970,"x":464,"y":304},{"type":"mousemove","time":2171,"x":471,"y":404},{"type":"mousemove","time":2382,"x":472,"y":407},{"type":"mousemove","time":2622,"x":472,"y":407},{"type":"mousemove","time":3021,"x":471,"y":407},{"type":"screenshot","time":3164},{"type": [...]
\ No newline at end of file
diff --git a/test/runTest/actions/hoverFocus2.json b/test/runTest/actions/hoverFocus2.json
new file mode 100644
index 0000000..a53a5b6
--- /dev/null
+++ b/test/runTest/actions/hoverFocus2.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousedown","time":534,"x":348,"y":376},{"type":"mouseup","time":647,"x":348,"y":376},{"time":648,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1138,"x":341,"y":371},{"type":"mousemove","time":1338,"x":174,"y":134},{"type":"mousemove","time":1538,"x":78,"y":77},{"type":"mousemove","time":1744,"x":78,"y":76},{"type":"mousedown","time":1847,"x":78,"y":76},{"type":"mouseup","time":1928,"x":78,"y":76},{"time":1929,"delay":400,"type":"scre [...]
\ No newline at end of file
diff --git a/test/runTest/actions/label-layout.json b/test/runTest/actions/label-layout.json
new file mode 100644
index 0000000..1ff2825
--- /dev/null
+++ b/test/runTest/actions/label-layout.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":47,"x":689,"y":417},{"type":"mousemove","time":320,"x":689,"y":415},{"type":"mousemove","time":473,"x":689,"y":415},{"type":"mousedown","time":546,"x":689,"y":415},{"type":"mousemove","time":679,"x":682,"y":380},{"type":"mousemove","time":1002,"x":675,"y":339},{"type":"mouseup","time":1054,"x":675,"y":339},{"time":1055,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1240,"x":674,"y":339},{"type":"mousemove","time":144 [...]
\ No newline at end of file
diff --git a/test/runTest/actions/line-boldWhenHover.json b/test/runTest/actions/line-boldWhenHover.json
new file mode 100644
index 0000000..8446504
--- /dev/null
+++ b/test/runTest/actions/line-boldWhenHover.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":71,"x":357,"y":475},{"type":"mousemove","time":272,"x":352,"y":445},{"type":"screenshot","time":884},{"type":"mousemove","time":906,"x":352,"y":448},{"type":"mousemove","time":1106,"x":350,"y":488},{"type":"mousemove","time":1311,"x":349,"y":490},{"type":"mousemove","time":1748,"x":355,"y":488},{"type":"mousemove","time":1955,"x":408,"y":457},{"type":"mousemove","time":2164,"x":422,"y":449},{"type":"mousemove","time":2948,"x":421,"y": [...]
\ No newline at end of file
diff --git a/test/runTest/actions/pie-label-extreme.json b/test/runTest/actions/pie-label-extreme.json
new file mode 100644
index 0000000..a931fdc
--- /dev/null
+++ b/test/runTest/actions/pie-label-extreme.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":444,"x":641,"y":128},{"type":"mousedown","time":482,"x":642,"y":128},{"type":"mousemove","time":650,"x":648,"y":130},{"type":"mousemove","time":1019,"x":650,"y":130},{"type":"mouseup","time":1216,"x":650,"y":130},{"time":1217,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1528,"x":654,"y":126},{"type":"mousemove","time":1729,"x":697,"y":62},{"type":"mousemove","time":1936,"x":696,"y":64},{"type":"mousemove","time":21 [...]
\ No newline at end of file
diff --git a/test/visualMap-continuous.html b/test/visualMap-continuous.html
index fbdc1fa..b9aeb9f 100644
--- a/test/visualMap-continuous.html
+++ b/test/visualMap-continuous.html
@@ -290,14 +290,13 @@ under the License.
 
         <script type="text/javascript">
             require([
-                'echarts'
+                'echarts',
+                'map/js/world'
                 // 'echarts/chart/map',
                 // 'echarts/component/legend',
                 // 'echarts/component/visualMapContinuous',
             ], function (echarts) {
-                require(['map/js/world'], function () {
-                    renderWorldMap(echarts);
-                });
+                renderWorldMap(echarts);
             });
 
             function renderWorldMap(echarts) {


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