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

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

commit ea2c006f4c3c5e11e85f2d3e540063cca7dcb5a4
Author: pissang <bm2736...@gmail.com>
AuthorDate: Wed Sep 11 20:16:04 2019 +0800

    test: fix some running status issue in visual regression testing tool
---
 package-lock.json              | 359 +++++++++++++++++++++--------------------
 package.json                   |  17 +-
 test/runTest/cli.js            |   4 +-
 test/runTest/client/client.js  |  10 +-
 test/runTest/client/index.html |   4 +-
 test/runTest/server.js         |  56 +++++--
 test/runTest/store.js          |   8 +-
 7 files changed, 257 insertions(+), 201 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 8b995ed..58127e3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,7 @@
       "integrity": 
"sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
       "dev": true,
       "requires": {
-        "@babel/highlight": "7.5.0"
+        "@babel/highlight": "^7.0.0"
       }
     },
     "@babel/core": {
@@ -19,20 +19,20 @@
       "integrity": 
"sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==",
       "dev": true,
       "requires": {
-        "@babel/code-frame": "7.5.5",
-        "@babel/generator": "7.6.0",
-        "@babel/helpers": "7.6.0",
-        "@babel/parser": "7.5.5",
-        "@babel/template": "7.6.0",
-        "@babel/traverse": "7.6.0",
-        "@babel/types": "7.6.1",
-        "convert-source-map": "1.6.0",
-        "debug": "4.1.1",
-        "json5": "2.1.0",
-        "lodash": "4.17.15",
-        "resolve": "1.12.0",
-        "semver": "5.7.1",
-        "source-map": "0.5.7"
+        "@babel/code-frame": "^7.0.0",
+        "@babel/generator": "^7.3.4",
+        "@babel/helpers": "^7.2.0",
+        "@babel/parser": "^7.3.4",
+        "@babel/template": "^7.2.2",
+        "@babel/traverse": "^7.3.4",
+        "@babel/types": "^7.3.4",
+        "convert-source-map": "^1.1.0",
+        "debug": "^4.1.0",
+        "json5": "^2.1.0",
+        "lodash": "^4.17.11",
+        "resolve": "^1.3.2",
+        "semver": "^5.4.1",
+        "source-map": "^0.5.0"
       },
       "dependencies": {
         "@babel/template": {
@@ -41,9 +41,9 @@
           "integrity": 
"sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==",
           "dev": true,
           "requires": {
-            "@babel/code-frame": "7.5.5",
-            "@babel/parser": "7.6.0",
-            "@babel/types": "7.6.1"
+            "@babel/code-frame": "^7.0.0",
+            "@babel/parser": "^7.6.0",
+            "@babel/types": "^7.6.0"
           },
           "dependencies": {
             "@babel/parser": {
@@ -60,9 +60,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         },
         "semver": {
@@ -79,11 +79,11 @@
       "integrity": 
"sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA==",
       "dev": true,
       "requires": {
-        "@babel/types": "7.6.1",
-        "jsesc": "2.5.2",
-        "lodash": "4.17.15",
-        "source-map": "0.5.7",
-        "trim-right": "1.0.1"
+        "@babel/types": "^7.6.0",
+        "jsesc": "^2.5.1",
+        "lodash": "^4.17.13",
+        "source-map": "^0.5.0",
+        "trim-right": "^1.0.1"
       },
       "dependencies": {
         "@babel/types": {
@@ -92,9 +92,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -105,9 +105,9 @@
       "integrity": 
"sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==",
       "dev": true,
       "requires": {
-        "@babel/helper-get-function-arity": "7.0.0",
-        "@babel/template": "7.6.0",
-        "@babel/types": "7.6.1"
+        "@babel/helper-get-function-arity": "^7.0.0",
+        "@babel/template": "^7.1.0",
+        "@babel/types": "^7.0.0"
       },
       "dependencies": {
         "@babel/parser": {
@@ -122,9 +122,9 @@
           "integrity": 
"sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==",
           "dev": true,
           "requires": {
-            "@babel/code-frame": "7.5.5",
-            "@babel/parser": "7.6.0",
-            "@babel/types": "7.6.1"
+            "@babel/code-frame": "^7.0.0",
+            "@babel/parser": "^7.6.0",
+            "@babel/types": "^7.6.0"
           }
         },
         "@babel/types": {
@@ -133,9 +133,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -146,7 +146,7 @@
       "integrity": 
"sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==",
       "dev": true,
       "requires": {
-        "@babel/types": "7.6.1"
+        "@babel/types": "^7.0.0"
       },
       "dependencies": {
         "@babel/types": {
@@ -155,9 +155,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -169,7 +169,7 @@
       "dev": true,
       "requires": {
         "@babel/types": "7.0.0-beta.31",
-        "lodash": "4.17.15"
+        "lodash": "^4.2.0"
       }
     },
     "@babel/helper-module-transforms": {
@@ -182,7 +182,7 @@
         "@babel/helper-simple-access": "7.0.0-beta.31",
         "@babel/template": "7.0.0-beta.31",
         "@babel/types": "7.0.0-beta.31",
-        "lodash": "4.17.15"
+        "lodash": "^4.2.0"
       }
     },
     "@babel/helper-simple-access": {
@@ -193,7 +193,7 @@
       "requires": {
         "@babel/template": "7.0.0-beta.31",
         "@babel/types": "7.0.0-beta.31",
-        "lodash": "4.17.15"
+        "lodash": "^4.2.0"
       }
     },
     "@babel/helper-split-export-declaration": {
@@ -202,7 +202,7 @@
       "integrity": 
"sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==",
       "dev": true,
       "requires": {
-        "@babel/types": "7.6.1"
+        "@babel/types": "^7.4.4"
       },
       "dependencies": {
         "@babel/types": {
@@ -211,9 +211,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -224,9 +224,9 @@
       "integrity": 
"sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ==",
       "dev": true,
       "requires": {
-        "@babel/template": "7.6.0",
-        "@babel/traverse": "7.6.0",
-        "@babel/types": "7.6.1"
+        "@babel/template": "^7.6.0",
+        "@babel/traverse": "^7.6.0",
+        "@babel/types": "^7.6.0"
       },
       "dependencies": {
         "@babel/parser": {
@@ -241,9 +241,9 @@
           "integrity": 
"sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==",
           "dev": true,
           "requires": {
-            "@babel/code-frame": "7.5.5",
-            "@babel/parser": "7.6.0",
-            "@babel/types": "7.6.1"
+            "@babel/code-frame": "^7.0.0",
+            "@babel/parser": "^7.6.0",
+            "@babel/types": "^7.6.0"
           }
         },
         "@babel/types": {
@@ -252,9 +252,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -265,9 +265,9 @@
       "integrity": 
"sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
       "dev": true,
       "requires": {
-        "chalk": "2.4.2",
-        "esutils": "2.0.3",
-        "js-tokens": "4.0.0"
+        "chalk": "^2.0.0",
+        "esutils": "^2.0.2",
+        "js-tokens": "^4.0.0"
       }
     },
     "@babel/parser": {
@@ -285,7 +285,7 @@
         "@babel/code-frame": "7.0.0-beta.31",
         "@babel/types": "7.0.0-beta.31",
         "babylon": "7.0.0-beta.31",
-        "lodash": "4.17.15"
+        "lodash": "^4.2.0"
       },
       "dependencies": {
         "@babel/code-frame": {
@@ -294,9 +294,9 @@
           "integrity": 
"sha512-yd7CkUughvHQoEahQqcMdrZw6o/6PwUxiRkfZuVDVHCDe77mysD/suoNyk5mK6phTnRW1kyIbPHyCJgxw++LXg==",
           "dev": true,
           "requires": {
-            "chalk": "2.4.2",
-            "esutils": "2.0.3",
-            "js-tokens": "3.0.2"
+            "chalk": "^2.0.0",
+            "esutils": "^2.0.2",
+            "js-tokens": "^3.0.0"
           }
         },
         "js-tokens": {
@@ -313,15 +313,15 @@
       "integrity": 
"sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ==",
       "dev": true,
       "requires": {
-        "@babel/code-frame": "7.5.5",
-        "@babel/generator": "7.6.0",
-        "@babel/helper-function-name": "7.1.0",
-        "@babel/helper-split-export-declaration": "7.4.4",
-        "@babel/parser": "7.6.0",
-        "@babel/types": "7.6.1",
-        "debug": "4.1.1",
-        "globals": "11.12.0",
-        "lodash": "4.17.15"
+        "@babel/code-frame": "^7.5.5",
+        "@babel/generator": "^7.6.0",
+        "@babel/helper-function-name": "^7.1.0",
+        "@babel/helper-split-export-declaration": "^7.4.4",
+        "@babel/parser": "^7.6.0",
+        "@babel/types": "^7.6.0",
+        "debug": "^4.1.0",
+        "globals": "^11.1.0",
+        "lodash": "^4.17.13"
       },
       "dependencies": {
         "@babel/parser": {
@@ -336,9 +336,9 @@
           "integrity": 
"sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
           "dev": true,
           "requires": {
-            "esutils": "2.0.3",
-            "lodash": "4.17.15",
-            "to-fast-properties": "2.0.0"
+            "esutils": "^2.0.2",
+            "lodash": "^4.17.13",
+            "to-fast-properties": "^2.0.0"
           }
         }
       }
@@ -349,9 +349,9 @@
       "integrity": 
"sha512-exAHB+NeFGxkfQ5dSUD03xl3zYGneeSk2Mw2ldTt/nTvYxuDiuSp3DlxgUBgzbdTFG4fbwPk0WtKWOoTXCmNGg==",
       "dev": true,
       "requires": {
-        "esutils": "2.0.3",
-        "lodash": "4.17.15",
-        "to-fast-properties": "2.0.0"
+        "esutils": "^2.0.2",
+        "lodash": "^4.2.0",
+        "to-fast-properties": "^2.0.0"
       }
     },
     "accepts": {
@@ -360,7 +360,7 @@
       "integrity": 
"sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
       "dev": true,
       "requires": {
-        "mime-types": "2.1.24",
+        "mime-types": "~2.1.24",
         "negotiator": "0.6.2"
       },
       "dependencies": {
@@ -406,7 +406,7 @@
       "integrity": 
"sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
       "dev": true,
       "requires": {
-        "color-convert": "1.9.3"
+        "color-convert": "^1.9.0"
       }
     },
     "arraybuffer.slice": {
@@ -481,7 +481,7 @@
       "integrity": 
"sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
       "dev": true,
       "requires": {
-        "balanced-match": "1.0.0",
+        "balanced-match": "^1.0.0",
         "concat-map": "0.0.1"
       }
     },
@@ -526,9 +526,9 @@
       "integrity": 
"sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
       "dev": true,
       "requires": {
-        "ansi-styles": "3.2.1",
-        "escape-string-regexp": "1.0.5",
-        "supports-color": "5.5.0"
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
       }
     },
     "color-convert": {
@@ -588,7 +588,7 @@
       "integrity": 
"sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
       "dev": true,
       "requires": {
-        "safe-buffer": "5.1.2"
+        "safe-buffer": "~5.1.1"
       }
     },
     "cookie": {
@@ -609,7 +609,7 @@
       "integrity": 
"sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
       "dev": true,
       "requires": {
-        "ms": "2.1.2"
+        "ms": "^2.1.1"
       }
     },
     "deep-is": {
@@ -624,12 +624,12 @@
       "integrity": 
"sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w==",
       "dev": true,
       "requires": {
-        "accepts": "1.3.7",
+        "accepts": "~1.3.4",
         "base64id": "1.0.0",
         "cookie": "0.3.1",
-        "debug": "3.1.0",
-        "engine.io-parser": "2.1.3",
-        "ws": "6.1.4"
+        "debug": "~3.1.0",
+        "engine.io-parser": "~2.1.0",
+        "ws": "~6.1.0"
       },
       "dependencies": {
         "debug": {
@@ -657,14 +657,14 @@
       "requires": {
         "component-emitter": "1.2.1",
         "component-inherit": "0.0.3",
-        "debug": "3.1.0",
-        "engine.io-parser": "2.1.3",
+        "debug": "~3.1.0",
+        "engine.io-parser": "~2.1.1",
         "has-cors": "1.1.0",
         "indexof": "0.0.1",
         "parseqs": "0.0.5",
         "parseuri": "0.0.5",
-        "ws": "6.1.4",
-        "xmlhttprequest-ssl": "1.5.5",
+        "ws": "~6.1.0",
+        "xmlhttprequest-ssl": "~1.5.4",
         "yeast": "0.1.2"
       },
       "dependencies": {
@@ -692,10 +692,10 @@
       "dev": true,
       "requires": {
         "after": "0.8.2",
-        "arraybuffer.slice": "0.0.7",
+        "arraybuffer.slice": "~0.0.7",
         "base64-arraybuffer": "0.1.5",
         "blob": "0.0.5",
-        "has-binary2": "1.0.3"
+        "has-binary2": "~1.0.2"
       }
     },
     "escape-string-regexp": {
@@ -710,11 +710,11 @@
       "integrity": "sha1-skaq6CnOc9WeLFVyc1nt0cEwqBs=",
       "dev": true,
       "requires": {
-        "esprima": "2.7.2",
-        "estraverse": "1.9.3",
-        "esutils": "2.0.3",
-        "optionator": "0.8.2",
-        "source-map": "0.2.0"
+        "esprima": "^2.7.1",
+        "estraverse": "^1.9.1",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1",
+        "source-map": "~0.2.0"
       },
       "dependencies": {
         "estraverse": {
@@ -730,7 +730,7 @@
           "dev": true,
           "optional": true,
           "requires": {
-            "amdefine": "1.0.1"
+            "amdefine": ">=0.0.4"
           }
         }
       }
@@ -771,7 +771,7 @@
       "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=",
       "dev": true,
       "requires": {
-        "punycode": "1.4.1"
+        "punycode": "^1.3.2"
       }
     },
     "fs-extra": {
@@ -780,11 +780,11 @@
       "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
       "dev": true,
       "requires": {
-        "graceful-fs": "4.2.2",
-        "jsonfile": "2.4.0",
-        "klaw": "1.3.1",
-        "path-is-absolute": "1.0.1",
-        "rimraf": "2.7.1"
+        "graceful-fs": "^4.1.2",
+        "jsonfile": "^2.1.0",
+        "klaw": "^1.0.0",
+        "path-is-absolute": "^1.0.0",
+        "rimraf": "^2.2.8"
       }
     },
     "fs.realpath": {
@@ -799,11 +799,11 @@
       "integrity": "sha1-OyCjV//89GuzhK7W+K6aZH/basQ=",
       "dev": true,
       "requires": {
-        "inflight": "1.0.6",
-        "inherits": "2.0.1",
-        "minimatch": "3.0.4",
-        "once": "1.4.0",
-        "path-is-absolute": "1.0.1"
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "2 || 3",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
       }
     },
     "globals": {
@@ -851,8 +851,8 @@
       "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
       "dev": true,
       "requires": {
-        "once": "1.4.0",
-        "wrappy": "1.0.2"
+        "once": "^1.3.0",
+        "wrappy": "1"
       }
     },
     "inherits": {
@@ -867,6 +867,12 @@
       "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
       "dev": true
     },
+    "is-wsl": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz";,
+      "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+      "dev": true
+    },
     "isarray": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz";,
@@ -891,7 +897,7 @@
       "integrity": 
"sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==",
       "dev": true,
       "requires": {
-        "minimist": "1.2.0"
+        "minimist": "^1.2.0"
       }
     },
     "jsonfile": {
@@ -900,7 +906,7 @@
       "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
       "dev": true,
       "requires": {
-        "graceful-fs": "4.2.2"
+        "graceful-fs": "^4.1.6"
       }
     },
     "klaw": {
@@ -909,7 +915,7 @@
       "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
       "dev": true,
       "requires": {
-        "graceful-fs": "4.2.2"
+        "graceful-fs": "^4.1.9"
       }
     },
     "levn": {
@@ -918,8 +924,8 @@
       "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
       "dev": true,
       "requires": {
-        "prelude-ls": "1.1.2",
-        "type-check": "0.3.2"
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2"
       }
     },
     "lodash": {
@@ -934,7 +940,7 @@
       "integrity": 
"sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==",
       "dev": true,
       "requires": {
-        "vlq": "0.2.3"
+        "vlq": "^0.2.2"
       }
     },
     "mime-db": {
@@ -949,7 +955,7 @@
       "integrity": 
"sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
       "dev": true,
       "requires": {
-        "mime-db": "1.33.0"
+        "mime-db": "~1.33.0"
       }
     },
     "minimatch": {
@@ -958,7 +964,7 @@
       "integrity": 
"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
       "dev": true,
       "requires": {
-        "brace-expansion": "1.1.11"
+        "brace-expansion": "^1.1.7"
       }
     },
     "minimist": {
@@ -991,7 +997,16 @@
       "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
       "dev": true,
       "requires": {
-        "wrappy": "1.0.2"
+        "wrappy": "1"
+      }
+    },
+    "open": {
+      "version": "6.4.0",
+      "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz";,
+      "integrity": 
"sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==",
+      "dev": true,
+      "requires": {
+        "is-wsl": "^1.1.0"
       }
     },
     "optionator": {
@@ -1000,12 +1015,12 @@
       "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
       "dev": true,
       "requires": {
-        "deep-is": "0.1.3",
-        "fast-levenshtein": "2.0.6",
-        "levn": "0.3.0",
-        "prelude-ls": "1.1.2",
-        "type-check": "0.3.2",
-        "wordwrap": "1.0.0"
+        "deep-is": "~0.1.3",
+        "fast-levenshtein": "~2.0.4",
+        "levn": "~0.3.0",
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2",
+        "wordwrap": "~1.0.0"
       }
     },
     "parseqs": {
@@ -1014,7 +1029,7 @@
       "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
       "dev": true,
       "requires": {
-        "better-assert": "1.0.2"
+        "better-assert": "~1.0.0"
       }
     },
     "parseuri": {
@@ -1023,7 +1038,7 @@
       "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
       "dev": true,
       "requires": {
-        "better-assert": "1.0.2"
+        "better-assert": "~1.0.0"
       }
     },
     "path-is-absolute": {
@@ -1056,7 +1071,7 @@
       "integrity": 
"sha512-b65UpTI40rGFY8QwN6IYuCbpmwAOL6M8d6voX4F3zR99UmDqh7r2QWLxoeHOazBRgEmDUdqNVESDREqFxQS7rQ==",
       "dev": true,
       "requires": {
-        "pngjs": "3.4.0"
+        "pngjs": "^3.4.0"
       }
     },
     "pngjs": {
@@ -1089,7 +1104,7 @@
       "integrity": 
"sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
       "dev": true,
       "requires": {
-        "path-parse": "1.0.6"
+        "path-parse": "^1.0.6"
       }
     },
     "rimraf": {
@@ -1098,7 +1113,7 @@
       "integrity": 
"sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
       "dev": true,
       "requires": {
-        "glob": "7.1.4"
+        "glob": "^7.1.3"
       },
       "dependencies": {
         "glob": {
@@ -1107,12 +1122,12 @@
           "integrity": 
"sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
           "dev": true,
           "requires": {
-            "fs.realpath": "1.0.0",
-            "inflight": "1.0.6",
-            "inherits": "2.0.1",
-            "minimatch": "3.0.4",
-            "once": "1.4.0",
-            "path-is-absolute": "1.0.1"
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
           }
         }
       }
@@ -1129,11 +1144,11 @@
       "integrity": 
"sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==",
       "dev": true,
       "requires": {
-        "acorn": "5.7.3",
-        "estree-walker": "0.5.2",
-        "magic-string": "0.22.5",
-        "resolve": "1.12.0",
-        "rollup-pluginutils": "2.8.1"
+        "acorn": "^5.2.1",
+        "estree-walker": "^0.5.0",
+        "magic-string": "^0.22.4",
+        "resolve": "^1.4.0",
+        "rollup-pluginutils": "^2.0.1"
       }
     },
     "rollup-plugin-node-resolve": {
@@ -1142,10 +1157,10 @@
       "integrity": "sha1-i4l8TDAw1QASd7BRSyXSygloPuA=",
       "dev": true,
       "requires": {
-        "browser-resolve": "1.11.3",
-        "builtin-modules": "1.1.1",
-        "is-module": "1.0.0",
-        "resolve": "1.12.0"
+        "browser-resolve": "^1.11.0",
+        "builtin-modules": "^1.1.0",
+        "is-module": "^1.0.0",
+        "resolve": "^1.1.6"
       }
     },
     "rollup-plugin-uglify": {
@@ -1154,7 +1169,7 @@
       "integrity": "sha1-Z7N60e/a+9g69MNrQMGJ7khmyWk=",
       "dev": true,
       "requires": {
-        "uglify-js": "3.6.0"
+        "uglify-js": "^3.0.9"
       }
     },
     "rollup-pluginutils": {
@@ -1163,7 +1178,7 @@
       "integrity": 
"sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==",
       "dev": true,
       "requires": {
-        "estree-walker": "0.6.1"
+        "estree-walker": "^0.6.1"
       },
       "dependencies": {
         "estree-walker": {
@@ -1209,9 +1224,9 @@
       }
     },
     "slugify": {
-      "version": "1.3.5",
-      "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.5.tgz";,
-      "integrity": 
"sha512-5VCnH7aS13b0UqWOs7Ef3E5rkhFe8Od+cp7wybFv5mv/sYSRkucZlJX0bamAJky7b2TTtGvrJBWVdpdEicsSrA==",
+      "version": "1.3.4",
+      "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz";,
+      "integrity": 
"sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw==",
       "dev": true
     },
     "socket.io": {
@@ -1220,12 +1235,12 @@
       "integrity": 
"sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w==",
       "dev": true,
       "requires": {
-        "debug": "4.1.1",
-        "engine.io": "3.3.2",
-        "has-binary2": "1.0.3",
-        "socket.io-adapter": "1.1.1",
+        "debug": "~4.1.0",
+        "engine.io": "~3.3.1",
+        "has-binary2": "~1.0.2",
+        "socket.io-adapter": "~1.1.0",
         "socket.io-client": "2.2.0",
-        "socket.io-parser": "3.3.0"
+        "socket.io-parser": "~3.3.0"
       }
     },
     "socket.io-adapter": {
@@ -1244,15 +1259,15 @@
         "base64-arraybuffer": "0.1.5",
         "component-bind": "1.0.0",
         "component-emitter": "1.2.1",
-        "debug": "3.1.0",
-        "engine.io-client": "3.3.2",
-        "has-binary2": "1.0.3",
+        "debug": "~3.1.0",
+        "engine.io-client": "~3.3.1",
+        "has-binary2": "~1.0.2",
         "has-cors": "1.1.0",
         "indexof": "0.0.1",
         "object-component": "0.0.3",
         "parseqs": "0.0.5",
         "parseuri": "0.0.5",
-        "socket.io-parser": "3.3.0",
+        "socket.io-parser": "~3.3.0",
         "to-array": "0.1.4"
       },
       "dependencies": {
@@ -1280,7 +1295,7 @@
       "dev": true,
       "requires": {
         "component-emitter": "1.2.1",
-        "debug": "3.1.0",
+        "debug": "~3.1.0",
         "isarray": "2.0.1"
       },
       "dependencies": {
@@ -1313,7 +1328,7 @@
       "integrity": 
"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
       "dev": true,
       "requires": {
-        "has-flag": "3.0.0"
+        "has-flag": "^3.0.0"
       }
     },
     "to-array": {
@@ -1340,7 +1355,7 @@
       "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
       "dev": true,
       "requires": {
-        "prelude-ls": "1.1.2"
+        "prelude-ls": "~1.1.2"
       }
     },
     "uglify-js": {
@@ -1349,8 +1364,8 @@
       "integrity": 
"sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
       "dev": true,
       "requires": {
-        "commander": "2.20.0",
-        "source-map": "0.6.1"
+        "commander": "~2.20.0",
+        "source-map": "~0.6.1"
       },
       "dependencies": {
         "commander": {
@@ -1400,7 +1415,7 @@
       "integrity": 
"sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
       "dev": true,
       "requires": {
-        "async-limiter": "1.0.1"
+        "async-limiter": "~1.0.0"
       }
     },
     "xmlhttprequest-ssl": {
diff --git a/package.json b/package.json
index 9b61471..3efacc5 100644
--- a/package.json
+++ b/package.json
@@ -34,16 +34,17 @@
     "estraverse": "4.1.1",
     "fs-extra": "0.26.7",
     "glob": "7.0.0",
-    "pixelmatch": "^5.0.2",
-    "pngjs": "^3.4.0",
+    "open": "6.4.0",
+    "pixelmatch": "5.0.2",
+    "pngjs": "3.4.0",
     "rollup": "0.50.0",
-    "rollup-plugin-commonjs": "^8.4.1",
+    "rollup-plugin-commonjs": "8.4.1",
     "rollup-plugin-node-resolve": "3.0.0",
     "rollup-plugin-uglify": "2.0.1",
-    "seedrandom": "^3.0.3",
-    "semver": "^6.3.0",
-    "serve-handler": "^6.1.1",
-    "slugify": "^1.3.4",
-    "socket.io": "^2.2.0"
+    "seedrandom": "3.0.3",
+    "semver": "6.3.0",
+    "serve-handler": "6.1.1",
+    "slugify": "1.3.4",
+    "socket.io": "2.2.0"
   }
 }
diff --git a/test/runTest/cli.js b/test/runTest/cli.js
index ffd133d..1bda323 100644
--- a/test/runTest/cli.js
+++ b/test/runTest/cli.js
@@ -63,7 +63,7 @@ function getClientRelativePath(absPath) {
 function replaceEChartsVersion(interceptedRequest, version) {
     // TODO Extensions and maps
     if (interceptedRequest.url().endsWith('dist/echarts.js')) {
-        console.log(getVersionDir(version));
+        console.log('Use echarts version: ' + getVersionDir(version));
         interceptedRequest.continue({
             url: `${origin}/test/runTest/${getVersionDir(version)}/echarts.js`
         });
@@ -269,6 +269,6 @@ runTests(program.tests.split(',').map(testName => {
         fileUrl: fileNameFromTest(testName),
         name: testName,
         results: [],
-        status: 'unsettled'
+        status: 'pending'
     };
 }));
\ No newline at end of file
diff --git a/test/runTest/client/client.js b/test/runTest/client/client.js
index 7f644ed..463b788 100644
--- a/test/runTest/client/client.js
+++ b/test/runTest/client/client.js
@@ -258,7 +258,7 @@ socket.on('update', msg => {
         }).catch(() => {});
     }
     // TODO
-    // app.running = !!msg.running;
+    app.running = !!msg.running;
     app.fullTests = processTestsData(msg.tests, app.fullTests);
 
     firstUpdate = false;
@@ -274,6 +274,14 @@ socket.on('finish', res => {
     console.log(`${res.count} test complete, Cost: ${(res.time / 
1000).toFixed(1)} s. Threads: ${res.threads}`);
     app.running = false;
 });
+socket.on('abort', res => {
+    app.$notify({
+        type: 'info',
+        title: `Aborted`,
+        duration: 4000
+    });
+    app.running = false;
+});
 socket.on('versions', versions => {
     app.versions = versions.filter(version => {
         return !version.startsWith('2.')
diff --git a/test/runTest/client/index.html b/test/runTest/client/index.html
index 4b1f8d0..2b7fcee 100644
--- a/test/runTest/client/index.html
+++ b/test/runTest/client/index.html
@@ -24,6 +24,8 @@ under the License.
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <link rel="shortcut icon" 
href="https://www.echartsjs.com/zh/images/favicon.png";>
+    <title>Visual Regression Testing Tool</title>
 </head>
 <body>
 <div id="app" style="display: none">
@@ -31,7 +33,7 @@ under the License.
         <el-header class="header" height="50">
             <div id="logo">
                 <img src="https://echarts.apache.org/zh/images/logo.png"; />
-                <h1>Visual Regression Test</h1>
+                <h1>Visual Regression Testing Tool</h1>
             </div>
         </el-header>
         <el-container style="min-height: 0"> <!-- 
https://juejin.im/post/5c642f2ff265da2de660ecfc -->
diff --git a/test/runTest/server.js b/test/runTest/server.js
index da2f769..2a35c8e 100644
--- a/test/runTest/server.js
+++ b/test/runTest/server.js
@@ -28,6 +28,7 @@ const {getTestsList, updateTestsList, saveTestsList, 
mergeTestsResults, updateAc
 const {prepareEChartsLib, getActionsFullPath, fetchVersions} = 
require('./util');
 const fse = require('fs-extra');
 const fs = require('fs');
+const open = require('open');
 
 function serve() {
     const server = http.createServer((request, response) => {
@@ -51,6 +52,7 @@ function serve() {
 
 let runningThreads = [];
 let pendingTests;
+let aborted = false;
 
 function stopRunningTests() {
     if (runningThreads) {
@@ -131,18 +133,23 @@ function startTests(testsNameList, socket, {
             testOpt.results = [];
         });
 
-        socket.emit('update', {tests: getTestsList()});
+        if (!aborted) {
+            socket.emit('update', {tests: getTestsList(), running: true});
+        }
 
         let runningCount = 0;
         function onExit() {
             runningCount--;
             if (runningCount === 0) {
+                runningThreads = [];
                 resolve();
             }
         }
         function onUpdate() {
             // Merge tests.
-            socket.emit('update', {tests: getTestsList(), running: true});
+            if (!aborted) {
+                socket.emit('update', {tests: getTestsList(), running: true});
+            }
         }
         threadsCount = Math.min(threadsCount, pendingTests.length);
         // Assigning tests to threads
@@ -180,7 +187,10 @@ async function start() {
         return;
     }
 
-    let versions = await fetchVersions();
+    let [versions] = await Promise.all([
+        fetchVersions(),
+        updateTestsList(true)
+    ]);
 
     // let runtimeCode = await buildRuntimeCode();
     // fse.outputFileSync(path.join(__dirname, 'tmp/testRuntime.js'), 
runtimeCode, 'utf-8');
@@ -191,20 +201,28 @@ async function start() {
     io.of('/client').on('connect', async socket => {
         await updateTestsList();
 
-        socket.emit('update', {tests: getTestsList()});
+        socket.emit('update', {
+            tests: getTestsList(),
+            running: runningThreads.length > 0
+        });
 
         socket.on('run', async data => {
 
             let startTime = Date.now();
+            aborted = false;
 
             await prepareEChartsLib(data.expectedVersion); // Expected version.
             await prepareEChartsLib(data.actualVersion); // Version to test
 
+            if (aborted) {  // If it is aborted when downloading echarts lib.
+                return;
+            }
+
             // TODO Should broadcast to all sockets.
             try {
                 await startTests(
                     data.tests,
-                    socket,
+                    io.of('/client'),
                     {
                         noHeadless: data.noHeadless,
                         threadsCount: data.threads,
@@ -214,16 +232,26 @@ async function start() {
                     }
                 );
             }
-            catch (e) { console.error(e); }
-            console.log('Finished');
-            socket.emit('finish', {
-                time: Date.now() - startTime,
-                count: data.tests.length,
-                threads: data.threads
-            });
+            catch (e) {
+                console.error(e);
+            }
+
+            if (!aborted) {
+                console.log('Finished');
+                io.of('/client').emit('finish', {
+                    time: Date.now() - startTime,
+                    count: data.tests.length,
+                    threads: data.threads
+                });
+            }
+            else {
+                console.log('Aborted!');
+            }
         });
         socket.on('stop', () => {
             stopRunningTests();
+            io.of('/client').emit('abort');
+            aborted = true;
         });
 
         socket.emit('versions', versions);
@@ -280,8 +308,8 @@ async function start() {
     });
 
     console.log(`Dashboard: ${origin}/test/runTest/client/index.html`);
-    // console.log(`Interaction Recorder: 
${origin}/test/runTest/recorder/index.html`);
-    // open(`${origin}/test/runTest/client/index.html`);
+    console.log(`Interaction Recorder: 
${origin}/test/runTest/recorder/index.html`);
+    open(`${origin}/test/runTest/client/index.html`);
 
 }
 
diff --git a/test/runTest/store.js b/test/runTest/store.js
index 14f68ec..406a3c6 100644
--- a/test/runTest/store.js
+++ b/test/runTest/store.js
@@ -40,7 +40,7 @@ module.exports.getTestByFileUrl = function (url) {
     return _testsMap[url];
 };
 
-module.exports.updateTestsList = async function () {
+module.exports.updateTestsList = async function (setPendingTestToUnsettled) {
     let tmpFolder = path.join(__dirname, 'tmp');
     fse.ensureDirSync(tmpFolder);
     _tests = [];
@@ -51,8 +51,10 @@ module.exports.updateTestsList = async function () {
         _tests.forEach(test => {
             // In somehow tests are stopped and leave the status pending.
             // Set the status to unsettled again.
-            if (test.status === 'pending') {
-                test.status = 'unsettled';
+            if (setPendingTestToUnsettled) {
+                if (test.status === 'pending') {
+                    test.status = 'unsettled';
+                }
             }
             _testsMap[test.fileUrl] = test;
         });


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

Reply via email to