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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
30cb18d1
Commit
30cb18d1
authored
Oct 29, 2019
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand sections by default
parent
8bbc2066
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/jobs/store/utils.js
app/assets/javascripts/jobs/store/utils.js
+1
-1
spec/frontend/jobs/components/log/log_spec.js
spec/frontend/jobs/components/log/log_spec.js
+2
-2
spec/frontend/jobs/store/utils_spec.js
spec/frontend/jobs/store/utils_spec.js
+10
-10
No files found.
app/assets/javascripts/jobs/store/utils.js
View file @
30cb18d1
...
...
@@ -17,7 +17,7 @@ export const parseLine = (line = {}, lineNumber) => ({
* @param Number lineNumber
*/
export
const
parseHeaderLine
=
(
line
=
{},
lineNumber
)
=>
({
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
parseLine
(
line
,
lineNumber
),
lines
:
[],
...
...
spec/frontend/jobs/components/log/log_spec.js
View file @
30cb18d1
...
...
@@ -60,8 +60,8 @@ describe('Job Log', () => {
expect
(
wrapper
.
find
(
'
.collapsible-line
'
).
attributes
(
'
role
'
)).
toBe
(
'
button
'
);
});
it
(
'
renders an icon with the
closed
state
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.collapsible-line svg
'
).
classes
()).
toContain
(
'
ic-angle-
right
'
);
it
(
'
renders an icon with the
open
state
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.collapsible-line svg
'
).
classes
()).
toContain
(
'
ic-angle-
down
'
);
});
describe
(
'
on click header section
'
,
()
=>
{
...
...
spec/frontend/jobs/store/utils_spec.js
View file @
30cb18d1
...
...
@@ -26,7 +26,7 @@ describe('Jobs Store Utils', () => {
const
parsedHeaderLine
=
parseHeaderLine
(
headerLine
,
2
);
expect
(
parsedHeaderLine
).
toEqual
({
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
...
headerLine
,
...
...
@@ -57,7 +57,7 @@ describe('Jobs Store Utils', () => {
it
(
'
adds the section duration to the correct header
'
,
()
=>
{
const
parsed
=
[
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
section
:
'
prepare-script
'
,
...
...
@@ -66,7 +66,7 @@ describe('Jobs Store Utils', () => {
lines
:
[],
},
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
section
:
'
foo-bar
'
,
...
...
@@ -85,7 +85,7 @@ describe('Jobs Store Utils', () => {
it
(
'
does not add the section duration when the headers do not match
'
,
()
=>
{
const
parsed
=
[
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
section
:
'
bar-foo
'
,
...
...
@@ -94,7 +94,7 @@ describe('Jobs Store Utils', () => {
lines
:
[],
},
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
section
:
'
foo-bar
'
,
...
...
@@ -183,7 +183,7 @@ describe('Jobs Store Utils', () => {
describe
(
'
collpasible section
'
,
()
=>
{
it
(
'
adds a `isClosed` property
'
,
()
=>
{
expect
(
result
[
1
].
isClosed
).
toEqual
(
tru
e
);
expect
(
result
[
1
].
isClosed
).
toEqual
(
fals
e
);
});
it
(
'
adds a `isHeader` property
'
,
()
=>
{
...
...
@@ -213,7 +213,7 @@ describe('Jobs Store Utils', () => {
const
existingLog
=
[
{
isHeader
:
true
,
isClosed
:
tru
e
,
isClosed
:
fals
e
,
line
:
{
content
:
[{
text
:
'
bar
'
}],
offset
:
10
,
lineNumber
:
1
},
},
];
...
...
@@ -263,7 +263,7 @@ describe('Jobs Store Utils', () => {
const
existingLog
=
[
{
isHeader
:
true
,
isClosed
:
tru
e
,
isClosed
:
fals
e
,
lines
:
[{
offset
:
101
,
content
:
[{
text
:
'
foobar
'
}],
lineNumber
:
2
}],
line
:
{
offset
:
10
,
...
...
@@ -435,7 +435,7 @@ describe('Jobs Store Utils', () => {
expect
(
result
).
toEqual
([
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
offset
:
1
,
...
...
@@ -461,7 +461,7 @@ describe('Jobs Store Utils', () => {
expect
(
result
).
toEqual
([
{
isClosed
:
tru
e
,
isClosed
:
fals
e
,
isHeader
:
true
,
line
:
{
offset
:
1
,
...
...
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