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 2021/05/01 01:30:32 UTC

[echarts] branch enhance-visual-regression-test updated: test(visual): add run progress

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

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


The following commit(s) were added to refs/heads/enhance-visual-regression-test by this push:
     new 1f501a1  test(visual): add run progress
1f501a1 is described below

commit 1f501a1d25469cb9f42d38fa62343839f9efd964
Author: pissang <bm...@gmail.com>
AuthorDate: Sat May 1 09:28:57 2021 +0800

    test(visual): add run progress
---
 test/runTest/client/client.css |  7 +++++++
 test/runTest/client/client.js  | 10 ++++++++++
 test/runTest/client/index.html | 10 ++++++++++
 3 files changed, 27 insertions(+)

diff --git a/test/runTest/client/client.css b/test/runTest/client/client.css
index cf2f96c..8171bf0 100644
--- a/test/runTest/client/client.css
+++ b/test/runTest/client/client.css
@@ -107,6 +107,13 @@
     color: #fff;
 }
 
+.run-config-item .el-progress-circle__track {
+    stroke: rgba(255, 255, 255, 0.3)!important;
+}
+.run-config-item .el-progress-circle__path {
+    stroke: rgba(255, 255, 255, 1)!important;
+}
+
 .run-config-item .el-input__inner,
 .run-config-item .el-button-group {
     border: none;
diff --git a/test/runTest/client/client.js b/test/runTest/client/client.js
index 274fb4c..8c3d841 100644
--- a/test/runTest/client/client.js
+++ b/test/runTest/client/client.js
@@ -144,6 +144,16 @@ const app = new Vue({
     },
 
     computed: {
+        finishedPercentage() {
+            let finishedCount = 0;
+            this.fullTests.forEach(test => {
+                if (test.status === 'finished') {
+                    finishedCount++;
+                }
+            });
+            return +(finishedCount / this.fullTests.length * 100).toFixed(0) || 0;
+        },
+
         tests() {
             let sortFunc = this.runConfig.sortBy === 'name'
                 ? (a, b) => a.name.localeCompare(b.name)
diff --git a/test/runTest/client/index.html b/test/runTest/client/index.html
index 6fafe6d..d8baaaa 100644
--- a/test/runTest/client/index.html
+++ b/test/runTest/client/index.html
@@ -118,6 +118,16 @@ under the License.
                             <el-button size="mini" :loading="true">Stop</el-button>
                             <el-button title="Run" @click="stopTests" size="mini" icon="el-icon-close" style="padding-left: 3px;padding-right:3px;"></el-button>
                         </el-button-group>
+
+                        <el-tooltip :content="'Finished ' + finishedPercentage + '%'">
+                            <el-progress
+                                type="circle"
+                                :percentage="finishedPercentage"
+                                :width="25"
+                                :stroke-width="4"
+                                :show-text="false"
+                            ></el-progress>
+                        </el-tooltip>
                     </div>
 
                     <div class="run-config-item">

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