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
1cc09301
Commit
1cc09301
authored
Oct 26, 2018
by
Filipa Lacerda
Committed by
Phil Hughes
Oct 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stage dropdown rendering only in English
parent
9b36f523
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
14 deletions
+18
-14
app/assets/javascripts/jobs/components/sidebar.vue
app/assets/javascripts/jobs/components/sidebar.vue
+6
-5
app/assets/javascripts/jobs/components/stages_dropdown.vue
app/assets/javascripts/jobs/components/stages_dropdown.vue
+0
-1
app/assets/javascripts/jobs/store/mutations.js
app/assets/javascripts/jobs/store/mutations.js
+1
-1
app/assets/javascripts/jobs/store/state.js
app/assets/javascripts/jobs/store/state.js
+1
-3
changelogs/unreleased/53133-jobs-list.yml
changelogs/unreleased/53133-jobs-list.yml
+5
-0
spec/javascripts/jobs/components/sidebar_spec.js
spec/javascripts/jobs/components/sidebar_spec.js
+3
-2
spec/javascripts/jobs/store/mutations_spec.js
spec/javascripts/jobs/store/mutations_spec.js
+2
-2
No files found.
app/assets/javascripts/jobs/components/sidebar.vue
View file @
1cc09301
...
@@ -31,7 +31,7 @@ export default {
...
@@ -31,7 +31,7 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
...
mapState
([
'
job
'
,
'
stages
'
,
'
jobs
'
,
'
selectedStage
'
]),
...
mapState
([
'
job
'
,
'
stages
'
,
'
jobs
'
,
'
selectedStage
'
,
'
isLoadingStages
'
]),
coverage
()
{
coverage
()
{
return
`
${
this
.
job
.
coverage
}
%`
;
return
`
${
this
.
job
.
coverage
}
%`
;
},
},
...
@@ -270,6 +270,7 @@ export default {
...
@@ -270,6 +270,7 @@ export default {
/>
/>
<stages-dropdown
<stages-dropdown
v-if=
"!isLoadingStages"
:stages=
"stages"
:stages=
"stages"
:pipeline=
"job.pipeline"
:pipeline=
"job.pipeline"
:selected-stage=
"selectedStage"
:selected-stage=
"selectedStage"
...
...
app/assets/javascripts/jobs/components/stages_dropdown.vue
View file @
1cc09301
...
@@ -22,7 +22,6 @@ export default {
...
@@ -22,7 +22,6 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
computed
:
{
computed
:
{
hasRef
()
{
hasRef
()
{
return
!
_
.
isEmpty
(
this
.
pipeline
.
ref
);
return
!
_
.
isEmpty
(
this
.
pipeline
.
ref
);
...
...
app/assets/javascripts/jobs/store/mutations.js
View file @
1cc09301
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
* after the first request,
* after the first request,
* and we do not want to hijack that
* and we do not want to hijack that
*/
*/
if
(
state
.
selectedStage
===
'
More
'
&&
job
.
stage
)
{
if
(
state
.
selectedStage
===
''
&&
job
.
stage
)
{
state
.
selectedStage
=
job
.
stage
;
state
.
selectedStage
=
job
.
stage
;
}
}
},
},
...
...
app/assets/javascripts/jobs/store/state.js
View file @
1cc09301
import
{
__
}
from
'
~/locale
'
;
export
default
()
=>
({
export
default
()
=>
({
jobEndpoint
:
null
,
jobEndpoint
:
null
,
traceEndpoint
:
null
,
traceEndpoint
:
null
,
...
@@ -29,7 +27,7 @@ export default () => ({
...
@@ -29,7 +27,7 @@ export default () => ({
// sidebar dropdown & list of jobs
// sidebar dropdown & list of jobs
isLoadingStages
:
false
,
isLoadingStages
:
false
,
isLoadingJobs
:
false
,
isLoadingJobs
:
false
,
selectedStage
:
__
(
'
More
'
)
,
selectedStage
:
''
,
stages
:
[],
stages
:
[],
jobs
:
[],
jobs
:
[],
});
});
changelogs/unreleased/53133-jobs-list.yml
0 → 100644
View file @
1cc09301
---
title
:
Fix stage dropdown not rendering in different languages
merge_request
:
22604
author
:
type
:
other
spec/javascripts/jobs/components/sidebar_spec.js
View file @
1cc09301
...
@@ -140,10 +140,11 @@ describe('Sidebar details block', () => {
...
@@ -140,10 +140,11 @@ describe('Sidebar details block', () => {
});
});
describe
(
'
while fetching stages
'
,
()
=>
{
describe
(
'
while fetching stages
'
,
()
=>
{
it
(
'
renders dropdown with More label
'
,
()
=>
{
it
(
'
it does not render dropdown
'
,
()
=>
{
store
.
dispatch
(
'
requestStages
'
);
vm
=
mountComponentWithStore
(
SidebarComponent
,
{
store
});
vm
=
mountComponentWithStore
(
SidebarComponent
,
{
store
});
expect
(
vm
.
$el
.
querySelector
(
'
.js-selected-stage
'
)
.
textContent
.
trim
()).
toEqual
(
'
More
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-selected-stage
'
)
).
toBeNull
(
);
});
});
});
});
...
...
spec/javascripts/jobs/store/mutations_spec.js
View file @
1cc09301
...
@@ -124,8 +124,8 @@ describe('Jobs Store Mutations', () => {
...
@@ -124,8 +124,8 @@ describe('Jobs Store Mutations', () => {
expect
(
stateCopy
.
job
).
toEqual
({
id
:
1312321
});
expect
(
stateCopy
.
job
).
toEqual
({
id
:
1312321
});
});
});
it
(
'
sets selectedStage when the selectedStage is
More
'
,
()
=>
{
it
(
'
sets selectedStage when the selectedStage is
empty
'
,
()
=>
{
expect
(
stateCopy
.
selectedStage
).
toEqual
(
'
More
'
);
expect
(
stateCopy
.
selectedStage
).
toEqual
(
''
);
mutations
[
types
.
RECEIVE_JOB_SUCCESS
](
stateCopy
,
{
id
:
1312321
,
stage
:
'
deploy
'
});
mutations
[
types
.
RECEIVE_JOB_SUCCESS
](
stateCopy
,
{
id
:
1312321
,
stage
:
'
deploy
'
});
expect
(
stateCopy
.
selectedStage
).
toEqual
(
'
deploy
'
);
expect
(
stateCopy
.
selectedStage
).
toEqual
(
'
deploy
'
);
...
...
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