Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
d8fc4012
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d8fc4012
编写于
8月 07, 2018
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show resolved failures
上级
379083be
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
74 addition
and
1 deletion
+74
-1
app/assets/javascripts/reports/components/grouped_test_reports_app.vue
...vascripts/reports/components/grouped_test_reports_app.vue
+1
-1
spec/javascripts/reports/components/grouped_test_reports_app_spec.js
...ripts/reports/components/grouped_test_reports_app_spec.js
+36
-0
spec/javascripts/reports/mock_data/resolved_failures.json
spec/javascripts/reports/mock_data/resolved_failures.json
+37
-0
未找到文件。
app/assets/javascripts/reports/components/grouped_test_reports_app.vue
浏览文件 @
d8fc4012
...
...
@@ -69,7 +69,7 @@
return
(
report
.
existing_failures
.
length
>
0
||
report
.
new_failures
.
length
>
0
||
report
.
resolved_failures
>
0
report
.
resolved_failures
.
length
>
0
);
},
},
...
...
spec/javascripts/reports/components/grouped_test_reports_app_spec.js
浏览文件 @
d8fc4012
...
...
@@ -7,6 +7,7 @@ import mountComponent from '../../helpers/vue_mount_component_helper';
import
newFailedTestReports
from
'
../mock_data/new_failures_report.json
'
;
import
successTestReports
from
'
../mock_data/no_failures_report.json
'
;
import
mixedResultsTestReports
from
'
../mock_data/new_and_fixed_failures_report.json
'
;
import
resolvedFailures
from
'
../mock_data/resolved_failures.json
'
;
describe
(
'
Grouped Test Reports App
'
,
()
=>
{
let
vm
;
...
...
@@ -123,6 +124,41 @@ describe('Grouped Test Reports App', () => {
});
});
describe
(
'
with resolved failures
'
,
()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
'
test_results.json
'
).
reply
(
200
,
resolvedFailures
,
{});
vm
=
mountComponent
(
Component
,
{
endpoint
:
'
test_results.json
'
,
});
});
it
(
'
renders summary text
'
,
done
=>
{
setTimeout
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.fa-spinner
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-code-text
'
).
textContent
.
trim
()).
toEqual
(
'
Test summary contained 2 fixed test results out of 11 total tests
'
,
);
expect
(
vm
.
$el
.
textContent
).
toContain
(
'
rspec:pg found 2 fixed test results out of 8 total tests
'
,
);
done
();
},
0
);
});
it
(
'
renders resolved failures
'
,
done
=>
{
setTimeout
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-code-resolved-issues
'
).
textContent
).
toContain
(
resolvedFailures
.
suites
[
0
].
resolved_failures
[
0
].
name
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-code-resolved-issues
'
).
textContent
).
toContain
(
resolvedFailures
.
suites
[
0
].
resolved_failures
[
1
].
name
,
);
done
()
},
0
);
});
});
describe
(
'
with error
'
,
()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
'
test_results.json
'
).
reply
(
500
,
{},
{});
...
...
spec/javascripts/reports/mock_data/resolved_failures.json
0 → 100644
浏览文件 @
d8fc4012
{
"status"
:
"success"
,
"summary"
:
{
"total"
:
11
,
"resolved"
:
2
,
"failed"
:
0
},
"suites"
:
[
{
"name"
:
"rspec:pg"
,
"status"
:
"success"
,
"summary"
:
{
"total"
:
8
,
"resolved"
:
2
,
"failed"
:
0
},
"new_failures"
:
[],
"resolved_failures"
:
[
{
"status"
:
"success"
,
"name"
:
"Test#sum when a is 1 and b is 2 returns summary"
,
"execution_time"
:
0.000411
,
"system_output"
:
null
,
"stack_trace"
:
null
},
{
"status"
:
"success"
,
"name"
:
"Test#sum when a is 100 and b is 200 returns summary"
,
"execution_time"
:
7.6e-5
,
"system_output"
:
null
,
"stack_trace"
:
null
}
],
"existing_failures"
:
[]
},
{
"name"
:
"java ant"
,
"status"
:
"success"
,
"summary"
:
{
"total"
:
3
,
"resolved"
:
0
,
"failed"
:
0
},
"new_failures"
:
[],
"resolved_failures"
:
[],
"existing_failures"
:
[]
}
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录