Commit def8b913 authored by Phil Hughes's avatar Phil Hughes

spec fixes

parent 299da4ca
......@@ -40,7 +40,7 @@ export default class ShortcutsIssuable extends ShortcutsNavigation {
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
const separator = (this.$replyField.val().trim() !== '' && '\n\n') || '';
......
......@@ -9,19 +9,17 @@ describe('Shortcuts', () => {
preloadFixtures(fixtureName);
describe('toggleMarkdownPreview', () => {
let sc;
beforeEach(() => {
loadFixtures(fixtureName);
spyOnEvent('.js-new-note-form .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', () => {
sc.toggleMarkdownPreview(
Shortcuts.toggleMarkdownPreview(
createEvent('KeyboardEvent', document.querySelector('.js-new-note-form .js-note-text'),
));
......@@ -32,7 +30,7 @@ describe('Shortcuts', () => {
document.querySelector('.js-note-edit').click();
setTimeout(() => {
sc.toggleMarkdownPreview(
Shortcuts.toggleMarkdownPreview(
createEvent('KeyboardEvent', document.querySelector('.edit-note .js-note-text'),
));
......
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