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
Boxiang Sun
gitlab-ce
Commits
def8b913
Commit
def8b913
authored
Oct 10, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec fixes
parent
299da4ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
app/assets/javascripts/shortcuts_issuable.js
app/assets/javascripts/shortcuts_issuable.js
+1
-1
spec/javascripts/shortcuts_spec.js
spec/javascripts/shortcuts_spec.js
+3
-5
No files found.
app/assets/javascripts/shortcuts_issuable.js
View file @
def8b913
...
@@ -40,7 +40,7 @@ export default class ShortcutsIssuable extends ShortcutsNavigation {
...
@@ -40,7 +40,7 @@ export default class ShortcutsIssuable extends ShortcutsNavigation {
return
false
;
return
false
;
}
}
const
quote
=
_
.
map
(
selected
.
split
(
'
\n
'
),
val
=>
`
>
${
val
.
trim
()}
\n`
);
const
quote
=
_
.
map
(
selected
.
split
(
'
\n
'
),
val
=>
`
${(
`>
${
val
}
`
)
.
trim
()}
\n`
);
// If replyField already has some content, add a newline before our quote
// If replyField already has some content, add a newline before our quote
const
separator
=
(
this
.
$replyField
.
val
().
trim
()
!==
''
&&
'
\n\n
'
)
||
''
;
const
separator
=
(
this
.
$replyField
.
val
().
trim
()
!==
''
&&
'
\n\n
'
)
||
''
;
...
...
spec/javascripts/shortcuts_spec.js
View file @
def8b913
...
@@ -9,19 +9,17 @@ describe('Shortcuts', () => {
...
@@ -9,19 +9,17 @@ describe('Shortcuts', () => {
preloadFixtures
(
fixtureName
);
preloadFixtures
(
fixtureName
);
describe
(
'
toggleMarkdownPreview
'
,
()
=>
{
describe
(
'
toggleMarkdownPreview
'
,
()
=>
{
let
sc
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
loadFixtures
(
fixtureName
);
loadFixtures
(
fixtureName
);
spyOnEvent
(
'
.js-new-note-form .js-md-preview-button
'
,
'
focus
'
);
spyOnEvent
(
'
.js-new-note-form .js-md-preview-button
'
,
'
focus
'
);
spyOnEvent
(
'
.edit-note .js-md-preview-button
'
,
'
focus
'
);
spyOnEvent
(
'
.edit-note .js-md-preview-button
'
,
'
focus
'
);
sc
=
new
Shortcuts
();
new
Shortcuts
();
// eslint-disable-line no-new
});
});
it
(
'
focuses preview button in form
'
,
()
=>
{
it
(
'
focuses preview button in form
'
,
()
=>
{
sc
.
toggleMarkdownPreview
(
Shortcuts
.
toggleMarkdownPreview
(
createEvent
(
'
KeyboardEvent
'
,
document
.
querySelector
(
'
.js-new-note-form .js-note-text
'
),
createEvent
(
'
KeyboardEvent
'
,
document
.
querySelector
(
'
.js-new-note-form .js-note-text
'
),
));
));
...
@@ -32,7 +30,7 @@ describe('Shortcuts', () => {
...
@@ -32,7 +30,7 @@ describe('Shortcuts', () => {
document
.
querySelector
(
'
.js-note-edit
'
).
click
();
document
.
querySelector
(
'
.js-note-edit
'
).
click
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
sc
.
toggleMarkdownPreview
(
Shortcuts
.
toggleMarkdownPreview
(
createEvent
(
'
KeyboardEvent
'
,
document
.
querySelector
(
'
.edit-note .js-note-text
'
),
createEvent
(
'
KeyboardEvent
'
,
document
.
querySelector
(
'
.edit-note .js-note-text
'
),
));
));
...
...
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