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
4ab0aaeb
Commit
4ab0aaeb
authored
Jul 20, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix markdown toolbar specs.
parent
665471e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
spec/features/issues/markdown_toolbar_spec.rb
spec/features/issues/markdown_toolbar_spec.rb
+10
-10
No files found.
spec/features/issues/markdown_toolbar_spec.rb
View file @
4ab0aaeb
...
...
@@ -12,26 +12,26 @@ feature 'Issue markdown toolbar', feature: true, js: true do
end
it
"doesn't include first new line when adding bold"
do
find
(
'#note
_note
'
).
native
.
send_keys
(
'test'
)
find
(
'#note
_note
'
).
native
.
send_key
(
:enter
)
find
(
'#note
_note
'
).
native
.
send_keys
(
'bold'
)
find
(
'#note
-body
'
).
native
.
send_keys
(
'test'
)
find
(
'#note
-body
'
).
native
.
send_key
(
:enter
)
find
(
'#note
-body
'
).
native
.
send_keys
(
'bold'
)
page
.
evaluate_script
(
'document.querySelectorAll(".js-main-target-form #note
_note
")[0].setSelectionRange(4, 9)'
)
page
.
evaluate_script
(
'document.querySelectorAll(".js-main-target-form #note
-body
")[0].setSelectionRange(4, 9)'
)
first
(
'.toolbar-btn'
).
click
expect
(
find
(
'#note
_note
'
)[
:value
]).
to
eq
(
"test
\n
**bold**
\n
"
)
expect
(
find
(
'#note
-body
'
)[
:value
]).
to
eq
(
"test
\n
**bold**
\n
"
)
end
it
"doesn't include first new line when adding underline"
do
find
(
'#note
_note
'
).
native
.
send_keys
(
'test'
)
find
(
'#note
_note
'
).
native
.
send_key
(
:enter
)
find
(
'#note
_note
'
).
native
.
send_keys
(
'underline'
)
find
(
'#note
-body
'
).
native
.
send_keys
(
'test'
)
find
(
'#note
-body
'
).
native
.
send_key
(
:enter
)
find
(
'#note
-body
'
).
native
.
send_keys
(
'underline'
)
page
.
evaluate_script
(
'document.querySelectorAll(".js-main-target-form #note
_note
")[0].setSelectionRange(4, 50)'
)
page
.
evaluate_script
(
'document.querySelectorAll(".js-main-target-form #note
-body
")[0].setSelectionRange(4, 50)'
)
find
(
'.toolbar-btn:nth-child(2)'
).
click
expect
(
find
(
'#note
_note
'
)[
:value
]).
to
eq
(
"test
\n
*underline*
\n
"
)
expect
(
find
(
'#note
-body
'
)[
:value
]).
to
eq
(
"test
\n
*underline*
\n
"
)
end
end
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