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
f0ffc19e
Commit
f0ffc19e
authored
May 04, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '44846-improve-web-ide-left-panel-and-modes' into ide-sidebar-commit-box
parents
80617b90
805302c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
36 deletions
+30
-36
app/assets/javascripts/ide/stores/getters.js
app/assets/javascripts/ide/stores/getters.js
+1
-5
spec/javascripts/ide/components/repo_file_spec.js
spec/javascripts/ide/components/repo_file_spec.js
+29
-31
No files found.
app/assets/javascripts/ide/stores/getters.js
View file @
f0ffc19e
<<<<<<<
HEAD
import
{
activityBarViews
}
from
'
../constants
'
;
=======
import
{
__
}
from
'
~/locale
'
;
import
{
getChangesCountForFiles
,
filePathMatches
}
from
'
./utils
'
;
>>>>>>>
master
import
{
activityBarViews
}
from
'
../constants
'
;
export
const
activeFile
=
state
=>
state
.
openFiles
.
find
(
file
=>
file
.
active
)
||
null
;
...
...
spec/javascripts/ide/components/repo_file_spec.js
View file @
f0ffc19e
...
...
@@ -73,38 +73,7 @@ describe('RepoFile', () => {
expect
(
treeChangesEl
).
not
.
toBeNull
();
expect
(
treeChangesEl
.
textContent
).
toContain
(
'
1
'
);
});
});
describe
(
'
locked file
'
,
()
=>
{
let
f
;
beforeEach
(()
=>
{
f
=
file
(
'
locked file
'
);
f
.
file_lock
=
{
user
:
{
name
:
'
testuser
'
,
updated_at
:
new
Date
(),
},
};
createComponent
({
file
:
f
,
level
:
0
,
});
});
it
(
'
renders lock icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.file-status-icon
'
)).
not
.
toBeNull
();
});
it
(
'
renders a tooltip
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ide-file-name span:nth-child(2)
'
).
dataset
.
originalTitle
,
).
toContain
(
'
Locked by testuser
'
);
});
});
describe
(
'
folder
'
,
()
=>
{
it
(
'
renders action dropdown
'
,
done
=>
{
createComponent
({
file
:
{
...
...
@@ -142,4 +111,33 @@ describe('RepoFile', () => {
});
});
});
describe
(
'
locked file
'
,
()
=>
{
let
f
;
beforeEach
(()
=>
{
f
=
file
(
'
locked file
'
);
f
.
file_lock
=
{
user
:
{
name
:
'
testuser
'
,
updated_at
:
new
Date
(),
},
};
createComponent
({
file
:
f
,
level
:
0
,
});
});
it
(
'
renders lock icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.file-status-icon
'
)).
not
.
toBeNull
();
});
it
(
'
renders a tooltip
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ide-file-name span:nth-child(2)
'
).
dataset
.
originalTitle
,
).
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