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
3f15afbe
Commit
3f15afbe
authored
Aug 07, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix karma repo_file_buttons_spec and repo_commit_section_spec
parent
8a6d236d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
17 deletions
+6
-17
spec/javascripts/repo/components/repo_commit_section_spec.js
spec/javascripts/repo/components/repo_commit_section_spec.js
+6
-2
spec/javascripts/repo/components/repo_file_buttons_spec.js
spec/javascripts/repo/components/repo_file_buttons_spec.js
+0
-15
No files found.
spec/javascripts/repo/components/repo_commit_section_spec.js
View file @
3f15afbe
...
...
@@ -6,21 +6,25 @@ import Api from '~/api';
describe
(
'
RepoCommitSection
'
,
()
=>
{
const
branch
=
'
master
'
;
const
projectUrl
=
'
projectUrl
'
;
const
openedFiles
=
[{
id
:
0
,
changed
:
true
,
url
:
`
${
branch
}
/url0
`
,
url
:
`
/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file0.ext
`
,
newContent
:
'
a
'
,
},
{
id
:
1
,
changed
:
true
,
url
:
`
${
branch
}
/url1
`
,
url
:
`
/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file1.ext
`
,
newContent
:
'
b
'
,
},
{
id
:
2
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file2.ext`
,
changed
:
false
,
}];
RepoStore
.
projectUrl
=
projectUrl
;
function
createComponent
()
{
const
RepoCommitSection
=
Vue
.
extend
(
repoCommitSection
);
...
...
spec/javascripts/repo/components/repo_file_buttons_spec.js
View file @
3f15afbe
...
...
@@ -30,7 +30,6 @@ describe('RepoFileButtons', () => {
const
history
=
vm
.
$el
.
querySelector
(
'
.history
'
);
expect
(
vm
.
$el
.
id
).
toEqual
(
'
repo-file-buttons
'
);
expect
(
vm
.
$el
.
style
.
borderBottom
).
toEqual
(
'
1px solid rgb(31, 120, 209)
'
);
expect
(
raw
.
href
).
toMatch
(
`/
${
activeFile
.
raw_path
}
`
);
expect
(
raw
.
textContent
).
toEqual
(
'
Raw
'
);
expect
(
blame
.
href
).
toMatch
(
`/
${
activeFile
.
blame_path
}
`
);
...
...
@@ -41,20 +40,6 @@ describe('RepoFileButtons', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.preview
'
).
textContent
).
toEqual
(
activeFileLabel
);
});
it
(
'
renders a white border if not editMode
'
,
()
=>
{
const
activeFile
=
{
extension
:
'
md
'
,
url
:
'
url
'
,
};
RepoStore
.
openedFiles
=
new
Array
(
1
);
RepoStore
.
activeFile
=
activeFile
;
RepoStore
.
editMode
=
false
;
const
vm
=
createComponent
();
expect
(
vm
.
$el
.
style
.
borderBottom
).
toEqual
(
'
1px solid rgb(240, 240, 240)
'
);
});
it
(
'
triggers rawPreviewToggle on preview click
'
,
()
=>
{
const
activeFile
=
{
extension
:
'
md
'
,
...
...
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