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
35c1f28b
Commit
35c1f28b
authored
Nov 19, 2019
by
Lee Tickett
Committed by
Fatih Acet
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove done callbacks from vue components markdown
parent
f556e3de
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
changelogs/unreleased/remove-done-callbacks-from-vue-components-markdown.yml
...ed/remove-done-callbacks-from-vue-components-markdown.yml
+5
-0
spec/frontend/vue_shared/components/markdown/header_spec.js
spec/frontend/vue_shared/components/markdown/header_spec.js
+2
-6
spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
...shared/components/markdown/suggestion_diff_header_spec.js
+6
-12
No files found.
changelogs/unreleased/remove-done-callbacks-from-vue-components-markdown.yml
0 → 100644
View file @
35c1f28b
---
title
:
Remove done callbacks from vue_shared/components/markdown
merge_request
:
16842
author
:
Lee Tickett
type
:
other
spec/frontend/vue_shared/components/markdown/header_spec.js
View file @
35c1f28b
...
...
@@ -5,7 +5,7 @@ import headerComponent from '~/vue_shared/components/markdown/header.vue';
describe
(
'
Markdown field header component
'
,
()
=>
{
let
vm
;
beforeEach
(
done
=>
{
beforeEach
(
()
=>
{
const
Component
=
Vue
.
extend
(
headerComponent
);
vm
=
new
Component
({
...
...
@@ -13,8 +13,6 @@ describe('Markdown field header component', () => {
previewMarkdown
:
false
,
},
}).
$mount
();
Vue
.
nextTick
(
done
);
});
it
(
'
renders markdown header buttons
'
,
()
=>
{
...
...
@@ -42,13 +40,11 @@ describe('Markdown field header component', () => {
expect
(
vm
.
$el
.
querySelector
(
'
li:nth-child(1)
'
).
classList
.
contains
(
'
active
'
)).
toBeTruthy
();
});
it
(
'
renders `preview` link as active when previewMarkdown is true
'
,
done
=>
{
it
(
'
renders `preview` link as active when previewMarkdown is true
'
,
()
=>
{
vm
.
previewMarkdown
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
li:nth-child(2)
'
).
classList
.
contains
(
'
active
'
)).
toBeTruthy
();
done
();
});
});
...
...
spec/frontend/vue_shared/components/markdown/suggestion_diff_header_spec.js
View file @
35c1f28b
...
...
@@ -64,12 +64,10 @@ describe('Suggestion Diff component', () => {
});
describe
(
'
when apply suggestion is clicked
'
,
()
=>
{
beforeEach
(
done
=>
{
beforeEach
(
()
=>
{
createComponent
();
findApplyButton
().
vm
.
$emit
(
'
click
'
);
wrapper
.
vm
.
$nextTick
(
done
);
});
it
(
'
emits apply
'
,
()
=>
{
...
...
@@ -88,19 +86,15 @@ describe('Suggestion Diff component', () => {
expect
(
wrapper
.
text
()).
toContain
(
'
Applying suggestion
'
);
});
it
(
'
when callback of apply is called, hides loading
'
,
done
=>
{
it
(
'
when callback of apply is called, hides loading
'
,
()
=>
{
const
[
callback
]
=
wrapper
.
emitted
().
apply
[
0
];
callback
();
wrapper
.
vm
.
$nextTick
()
.
then
(()
=>
{
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
findApplyButton
().
exists
()).
toBe
(
true
);
expect
(
findLoading
().
exists
()).
toBe
(
false
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
});
});
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