BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f235a51e
Unverified
Commit
f235a51e
authored
Jul 25, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added to repo file buttons spec
parent
b259c6e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
repo_file_buttons_spec.js
spec/javascripts/repo/repo_file_buttons_spec.js
+33
-0
No files found.
spec/javascripts/repo/repo_file_buttons_spec.js
View file @
f235a51e
...
...
@@ -55,6 +55,39 @@ describe('RepoFileButtons', () => {
expect
(
deleteBtn
.
textContent
).
toEqual
(
'Delete'
);
});
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'
,
url
:
'url'
,
};
RepoStore
.
openedFiles
=
new
Array
(
1
);
RepoStore
.
activeFile
=
activeFile
;
RepoStore
.
editMode
=
true
;
const
vm
=
createComponent
();
const
preview
=
vm
.
$el
.
querySelector
(
'.preview'
);
spyOn
(
vm
,
'rawPreviewToggle'
);
preview
.
click
();
expect
(
vm
.
rawPreviewToggle
).
toHaveBeenCalled
();
});
it
(
'does not render preview toggle if not canPreview'
,
()
=>
{
const
activeFile
=
{
extension
:
'abcd'
,
...
...
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