spec fixes
This commit is contained in:
parent
299da4ca07
commit
def8b913ff
2 changed files with 4 additions and 6 deletions
|
@ -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'),
|
||||
));
|
||||
|
||||
|
|
Loading…
Reference in a new issue