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
2675dcb4
Commit
2675dcb4
authored
Mar 23, 2019
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove now-unnecessary md-preview class
parent
92184ca9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+2
-2
app/views/projects/_md_preview.html.haml
app/views/projects/_md_preview.html.haml
+1
-1
ee/spec/features/epics/update_epic_spec.rb
ee/spec/features/epics/update_epic_spec.rb
+2
-2
spec/features/snippets/notes_on_personal_snippets_spec.rb
spec/features/snippets/notes_on_personal_snippets_spec.rb
+1
-1
spec/features/snippets/user_creates_snippet_spec.rb
spec/features/snippets/user_creates_snippet_spec.rb
+1
-1
spec/javascripts/vue_shared/components/markdown/field_spec.js
.../javascripts/vue_shared/components/markdown/field_spec.js
+5
-3
No files found.
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
2675dcb4
...
...
@@ -215,7 +215,7 @@ export default {
<div
v-show=
"previewMarkdown"
ref=
"markdown-preview"
class=
"
md-preview
js-vue-md-preview md-preview-holder"
class=
"js-vue-md-preview md-preview-holder"
>
<suggestions
v-if=
"hasSuggestion"
...
...
@@ -233,7 +233,7 @@ export default {
<div
v-show=
"previewMarkdown"
ref=
"markdown-preview"
class=
"
md-preview
js-vue-md-preview md md-preview-holder"
class=
"js-vue-md-preview md md-preview-holder"
v-html=
"markdownPreview"
></div>
</
template
>
...
...
app/views/projects/_md_preview.html.haml
View file @
2675dcb4
...
...
@@ -22,7 +22,7 @@
.md-write-holder
=
yield
.md.md-preview-holder.js-md-preview.hide
.md-preview
{
data:
{
url:
url
}
}
.md.md-preview-holder.js-md-preview.hide
{
data:
{
url:
url
}
}
.referenced-commands.hide
-
if
referenced_users
...
...
ee/spec/features/epics/update_epic_spec.rb
View file @
2675dcb4
...
...
@@ -48,7 +48,7 @@ describe 'Update Epic', :js do
page
.
within
(
'.detail-page-description'
)
do
click_button
(
'Preview'
)
expect
(
find
(
'.md-preview'
)).
to
have_content
(
'New epic description'
)
expect
(
find
(
'.md-preview
-holder
'
)).
to
have_content
(
'New epic description'
)
end
click_button
'Save changes'
...
...
@@ -100,7 +100,7 @@ describe 'Update Epic', :js do
click_button
(
'Preview'
)
wait_for_requests
within
(
'.md-preview'
)
do
within
(
'.md-preview
-holder
'
)
do
link
=
find
(
link_css
)[
'src'
]
expect
(
link
).
to
match
(
link_match
)
end
...
...
spec/features/snippets/notes_on_personal_snippets_spec.rb
View file @
2675dcb4
...
...
@@ -70,7 +70,7 @@ describe 'Comments on personal snippets', :js do
fill_in
'note[note]'
,
with:
'This is **awesome**!'
find
(
'.js-md-preview-button'
).
click
page
.
within
(
'.new-note .md-preview'
)
do
page
.
within
(
'.new-note .md-preview
-holder
'
)
do
expect
(
page
).
to
have_content
(
'This is awesome!'
)
expect
(
page
).
to
have_selector
(
'strong'
)
end
...
...
spec/features/snippets/user_creates_snippet_spec.rb
View file @
2675dcb4
...
...
@@ -37,7 +37,7 @@ describe 'User creates snippet', :js do
dropzone_file
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'banana_sample.gif'
)
find
(
'.js-md-preview-button'
).
click
page
.
within
(
'#new_personal_snippet .md-preview'
)
do
page
.
within
(
'#new_personal_snippet .md-preview
-holder
'
)
do
expect
(
page
).
to
have_content
(
'My Snippet'
)
link
=
find
(
'a.no-attachment-icon img[alt="banana_sample"]'
)[
'src'
]
...
...
spec/javascripts/vue_shared/components/markdown/field_spec.js
View file @
2675dcb4
...
...
@@ -5,7 +5,7 @@ import fieldComponent from '~/vue_shared/components/markdown/field.vue';
function
assertMarkdownTabs
(
isWrite
,
writeLink
,
previewLink
,
vm
)
{
expect
(
writeLink
.
parentNode
.
classList
.
contains
(
'
active
'
)).
toEqual
(
isWrite
);
expect
(
previewLink
.
parentNode
.
classList
.
contains
(
'
active
'
)).
toEqual
(
!
isWrite
);
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview
'
).
style
.
display
).
toEqual
(
isWrite
?
'
none
'
:
''
);
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview
-holder
'
).
style
.
display
).
toEqual
(
isWrite
?
'
none
'
:
''
);
}
describe
(
'
Markdown field component
'
,
()
=>
{
...
...
@@ -80,7 +80,9 @@ describe('Markdown field component', () => {
previewLink
.
click
();
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview
'
).
textContent
.
trim
()).
toContain
(
'
Loading…
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview-holder
'
).
textContent
.
trim
()).
toContain
(
'
Loading…
'
,
);
done
();
});
...
...
@@ -90,7 +92,7 @@ describe('Markdown field component', () => {
previewLink
.
click
();
setTimeout
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview
'
).
innerHTML
).
toContain
(
expect
(
vm
.
$el
.
querySelector
(
'
.md-preview
-holder
'
).
innerHTML
).
toContain
(
'
<p>markdown preview</p>
'
,
);
...
...
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