BigW Consortium Gitlab

Add spec for previewing a note

parent 9addd980
......@@ -72,7 +72,8 @@
Preview
</a>
</li>
<li class="md-header-toolbar"
<li
class="md-header-toolbar"
:class="{ active: !previewMarkdown }">
<toolbar-button
tag="**"
......
......@@ -102,7 +102,6 @@
}
}
.referenced-users {
color: $gl-text-color;
padding-top: 10px;
......
......@@ -66,6 +66,21 @@ describe 'Merge requests > User posts notes', :js do
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
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment