Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d8fc4012
Commit
d8fc4012
authored
Aug 07, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show resolved failures
parent
379083be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
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
No files found.
app/assets/javascripts/reports/components/grouped_test_reports_app.vue
View file @
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
View file @
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
View file @
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"
:
[]
}
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment