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
bc955da8
Commit
bc955da8
authored
Jun 25, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the IDE commit list item loosing its active state
Closes #48125
parent
9490c378
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
app/assets/javascripts/ide/components/repo_tab.vue
app/assets/javascripts/ide/components/repo_tab.vue
+2
-0
spec/javascripts/ide/components/repo_tab_spec.js
spec/javascripts/ide/components/repo_tab_spec.js
+23
-3
No files found.
app/assets/javascripts/ide/components/repo_tab.vue
View file @
bc955da8
...
@@ -44,6 +44,8 @@ export default {
...
@@ -44,6 +44,8 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'
closeFile
'
,
'
updateDelayViewerUpdated
'
,
'
openPendingTab
'
]),
...
mapActions
([
'
closeFile
'
,
'
updateDelayViewerUpdated
'
,
'
openPendingTab
'
]),
clickFile
(
tab
)
{
clickFile
(
tab
)
{
if
(
tab
.
active
)
return
;
this
.
updateDelayViewerUpdated
(
true
);
this
.
updateDelayViewerUpdated
(
true
);
if
(
tab
.
pending
)
{
if
(
tab
.
pending
)
{
...
...
spec/javascripts/ide/components/repo_tab_spec.js
View file @
bc955da8
...
@@ -38,6 +38,26 @@ describe('RepoTab', () => {
...
@@ -38,6 +38,26 @@ describe('RepoTab', () => {
expect
(
name
.
textContent
.
trim
()).
toEqual
(
vm
.
tab
.
name
);
expect
(
name
.
textContent
.
trim
()).
toEqual
(
vm
.
tab
.
name
);
});
});
it
(
'
does not call openPendingTab when tab is active
'
,
done
=>
{
vm
=
createComponent
({
tab
:
{
...
file
(),
pending
:
true
,
active
:
true
,
},
});
spyOn
(
vm
,
'
openPendingTab
'
);
vm
.
$el
.
click
();
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
openPendingTab
).
not
.
toHaveBeenCalled
();
done
();
});
});
it
(
'
fires clickFile when the link is clicked
'
,
()
=>
{
it
(
'
fires clickFile when the link is clicked
'
,
()
=>
{
vm
=
createComponent
({
vm
=
createComponent
({
tab
:
file
(),
tab
:
file
(),
...
@@ -112,9 +132,9 @@ describe('RepoTab', () => {
...
@@ -112,9 +132,9 @@ describe('RepoTab', () => {
});
});
it
(
'
renders a tooltip
'
,
()
=>
{
it
(
'
renders a tooltip
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
span:nth-child(2)
'
).
dataset
.
originalTitle
).
toContain
(
vm
.
$el
.
querySelector
(
'
span:nth-child(2)
'
).
dataset
.
originalTitle
,
'
Locked by testuser
'
,
)
.
toContain
(
'
Locked by testuser
'
)
;
);
});
});
});
});
...
...
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