Skip to content
Snippets Groups Projects
Verified Commit def8b913 authored by Phil Hughes's avatar Phil Hughes
Browse files

spec fixes

parent 299da4ca
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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') || '';
Loading
Loading
Loading
Loading
@@ -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'),
));
 
Loading
Loading
@@ -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'),
));
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment