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
Jérome Perrin
gitlab-ce
Commits
805302c0
Commit
805302c0
authored
May 04, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed duplicated tests
parent
64807dd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
spec/javascripts/ide/components/repo_file_spec.js
spec/javascripts/ide/components/repo_file_spec.js
+29
-31
No files found.
spec/javascripts/ide/components/repo_file_spec.js
View file @
805302c0
...
...
@@ -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