Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Five-菜鸟级
echarts
提交
59e5b808
E
echarts
项目概览
Five-菜鸟级
/
echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59e5b808
编写于
4月 29, 2021
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(visual): optimize running status
上级
9b97e376
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
14 deletion
+36
-14
test/runTest/client/client.js
test/runTest/client/client.js
+13
-1
test/runTest/client/index.html
test/runTest/client/index.html
+1
-1
test/runTest/server.js
test/runTest/server.js
+18
-12
test/runTest/store.js
test/runTest/store.js
+4
-0
未找到文件。
test/runTest/client/client.js
浏览文件 @
59e5b808
...
...
@@ -423,7 +423,19 @@ function updateUrl(notRefresh) {
history
.
pushState
({},
''
,
location
.
pathname
+
'
?
'
+
searchUrl
);
}
else
{
window
.
location
.
search
=
'
?
'
+
searchUrl
;
if
(
app
.
running
)
{
app
.
$confirm
(
'
Change versions will stop the running tests. <br />Do you still want to continue?
'
,
'
Warn
'
,
{
confirmButtonText
:
'
Yes
'
,
cancelButtonText
:
'
No
'
,
dangerouslyUseHTMLString
:
true
,
center
:
true
}).
then
(
value
=>
{
window
.
location
.
search
=
'
?
'
+
searchUrl
;
}).
catch
(()
=>
{});
}
else
{
window
.
location
.
search
=
'
?
'
+
searchUrl
;
}
}
}
...
...
test/runTest/client/index.html
浏览文件 @
59e5b808
...
...
@@ -84,7 +84,7 @@ under the License.
</el-tooltip>
<el-tooltip
content=
"Not yet run"
v-else
v-else
-if=
"!(test.status === 'pending' && running)"
>
<i
class=
"el-icon-question"
style=
"color: #ccc;font-size: 20px;"
...
...
test/runTest/server.js
浏览文件 @
59e5b808
...
...
@@ -54,7 +54,7 @@ function serve() {
let
runningThreads
=
[];
let
pendingTests
;
let
aborted
=
tru
e
;
let
running
=
fals
e
;
function
stopRunningTests
()
{
if
(
runningThreads
)
{
...
...
@@ -67,6 +67,7 @@ function stopRunningTests() {
testOpt
.
status
=
'
unsettled
'
;
}
});
saveTestsList
();
pendingTests
=
null
;
}
}
...
...
@@ -133,13 +134,14 @@ function startTests(testsNameList, socket, {
testOpt
.
results
=
[];
});
if
(
!
aborted
)
{
if
(
running
)
{
socket
.
emit
(
'
update
'
,
{
tests
:
getTestsList
(),
running
:
true
});
}
}
let
runningCount
=
0
;
function
onExit
()
{
runningCount
--
;
...
...
@@ -150,7 +152,7 @@ function startTests(testsNameList, socket, {
}
function
onUpdate
()
{
// Merge tests.
if
(
!
aborted
&&
!
noSave
)
{
if
(
running
&&
!
noSave
)
{
socket
.
emit
(
'
update
'
,
{
tests
:
getTestsList
(),
running
:
true
...
...
@@ -210,7 +212,8 @@ async function start() {
return
;
}
updateTestsList
(
true
);
let
_currentTestHash
;
// let runtimeCode = await buildRuntimeCode();
// fse.outputFileSync(path.join(__dirname, 'tmp/testRuntime.js'), runtimeCode, 'utf-8');
...
...
@@ -220,20 +223,22 @@ async function start() {
io
.
of
(
'
/client
'
).
on
(
'
connect
'
,
async
socket
=>
{
function
abortTests
()
{
if
(
aborted
)
{
if
(
!
running
)
{
return
;
}
stopRunningTests
();
io
.
of
(
'
/client
'
).
emit
(
'
abort
'
);
aborted
=
tru
e
;
running
=
fals
e
;
}
socket
.
on
(
'
setTestVersions
'
,
async
(
params
)
=>
{
abortTests
();
if
(
_currentTestHash
!==
getTestHash
(
params
))
{
abortTests
();
}
await
updateTestsList
(
getTestHash
(
params
),
true
_currentTestHash
=
getTestHash
(
params
),
!
running
// Set to unsettled if not running
);
socket
.
emit
(
'
update
'
,
{
...
...
@@ -245,12 +250,12 @@ async function start() {
socket
.
on
(
'
run
'
,
async
data
=>
{
let
startTime
=
Date
.
now
();
aborted
=
fals
e
;
running
=
tru
e
;
await
prepareEChartsLib
(
data
.
expectedVersion
);
// Expected version.
await
prepareEChartsLib
(
data
.
actualVersion
);
// Version to test
if
(
aborted
)
{
// If it is aborted when downloading echarts lib.
if
(
!
running
)
{
// If it is aborted when downloading echarts lib.
return
;
}
...
...
@@ -274,13 +279,14 @@ async function start() {
console
.
error
(
e
);
}
if
(
!
aborted
)
{
if
(
running
)
{
console
.
log
(
'
Finished
'
);
io
.
of
(
'
/client
'
).
emit
(
'
finish
'
,
{
time
:
Date
.
now
()
-
startTime
,
count
:
data
.
tests
.
length
,
threads
:
data
.
threads
});
running
=
false
;
}
else
{
console
.
log
(
'
Aborted!
'
);
...
...
test/runTest/store.js
浏览文件 @
59e5b808
...
...
@@ -137,6 +137,10 @@ module.exports.updateTestsList = async function (
_tests
.
forEach
(
testOpt
=>
{
testOpt
.
actions
=
actionsMetaData
[
testOpt
.
name
]
||
0
;
});
// Save once.
module
.
exports
.
saveTestsList
();
return
_tests
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录