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
03445de8
Commit
03445de8
authored
Nov 02, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix karma
parent
a153f006
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+2
-2
spec/javascripts/vue_shared/components/markdown/header_spec.js
...javascripts/vue_shared/components/markdown/header_spec.js
+6
-4
No files found.
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
03445de8
...
...
@@ -53,7 +53,7 @@
class=
"js-write-link"
href=
"#md-write-holder"
tabindex=
"-1"
@
click.prevent=
"writeMarkdownTab($event
, form
)"
>
@
click.prevent=
"writeMarkdownTab($event)"
>
Write
</a>
</li>
...
...
@@ -62,7 +62,7 @@
class=
"js-preview-link"
href=
"#md-preview-holder"
tabindex=
"-1"
@
click.prevent=
"previewMarkdownTab($event
, form
)"
>
@
click.prevent=
"previewMarkdownTab($event)"
>
Preview
</a>
</li>
...
...
spec/javascripts/vue_shared/components/markdown/header_spec.js
View file @
03445de8
...
...
@@ -43,11 +43,13 @@ describe('Markdown field header component', () => {
it
(
'
emits toggle markdown event when clicking preview
'
,
()
=>
{
spyOn
(
vm
,
'
$emit
'
);
vm
.
$el
.
querySelector
(
'
li:nth-child(2) a
'
).
click
();
vm
.
$el
.
querySelector
(
'
.js-preview-link
'
).
click
();
expect
(
vm
.
$emit
,
).
toHaveBeenCalledWith
(
'
toggle-markdown
'
);
expect
(
vm
.
$emit
).
toHaveBeenCalledWith
(
'
preview-markdown
'
);
vm
.
$el
.
querySelector
(
'
.js-write-link
'
).
click
();
expect
(
vm
.
$emit
).
toHaveBeenCalledWith
(
'
write-markdown
'
);
});
it
(
'
blurs preview link after click
'
,
(
done
)
=>
{
...
...
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