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
Léo-Paul Géneau
gitlab-ce
Commits
d40f393d
Commit
d40f393d
authored
Dec 20, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for previewing a note
parent
9addd980
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+2
-1
app/assets/stylesheets/framework/markdown_area.scss
app/assets/stylesheets/framework/markdown_area.scss
+0
-1
spec/features/merge_requests/user_posts_notes_spec.rb
spec/features/merge_requests/user_posts_notes_spec.rb
+15
-0
No files found.
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
d40f393d
...
@@ -72,7 +72,8 @@
...
@@ -72,7 +72,8 @@
Preview
Preview
</a>
</a>
</li>
</li>
<li
class=
"md-header-toolbar"
<li
class=
"md-header-toolbar"
:class=
"
{ active: !previewMarkdown }">
:class=
"
{ active: !previewMarkdown }">
<toolbar-button
<toolbar-button
tag=
"**"
tag=
"**"
...
...
app/assets/stylesheets/framework/markdown_area.scss
View file @
d40f393d
...
@@ -102,7 +102,6 @@
...
@@ -102,7 +102,6 @@
}
}
}
}
.referenced-users
{
.referenced-users
{
color
:
$gl-text-color
;
color
:
$gl-text-color
;
padding-top
:
10px
;
padding-top
:
10px
;
...
...
spec/features/merge_requests/user_posts_notes_spec.rb
View file @
d40f393d
...
@@ -66,6 +66,21 @@ describe 'Merge requests > User posts notes', :js do
...
@@ -66,6 +66,21 @@ describe 'Merge requests > User posts notes', :js do
end
end
end
end
describe
'when previewing a note'
do
it
'shows the toolbar buttons when editing a note'
do
page
.
within
(
'.js-main-target-form'
)
do
expect
(
page
).
to
have_css
(
'.md-header-toolbar.active'
)
end
end
it
'hides the toolbar buttons when previewing a note'
do
find
(
'.js-md-preview-button'
).
click
page
.
within
(
'.js-main-target-form'
)
do
expect
(
page
).
not_to
have_css
(
'.md-header-toolbar.active'
)
end
end
end
describe
'when editing a note'
do
describe
'when editing a note'
do
it
'there should be a hidden edit form'
do
it
'there should be a hidden edit form'
do
is_expected
.
to
have_css
(
'.note-edit-form:not(.mr-note-edit-form)'
,
visible:
false
,
count:
1
)
is_expected
.
to
have_css
(
'.note-edit-form:not(.mr-note-edit-form)'
,
visible:
false
,
count:
1
)
...
...
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