diff --git a/spec/anchor-preview.spec.js b/spec/anchor-preview.spec.js index 2249e0f01..6426a0ec0 100644 --- a/spec/anchor-preview.spec.js +++ b/spec/anchor-preview.spec.js @@ -413,8 +413,8 @@ describe('Anchor Preview TestCase', function () { editor, anchorPreview; container.style.position = 'absolute'; - container.style.left = '100px'; - container.style.top = '100px'; + container.style.left = '200px'; + container.style.top = '200px'; document.body.appendChild(container); editor = this.newMediumEditor('.editor', { @@ -434,10 +434,10 @@ describe('Anchor Preview TestCase', function () { fireEvent(document.getElementById('test-link'), 'mouseover'); // preview shows only after delay - jasmine.clock().tick(1); + jasmine.clock().tick(501); expect(anchorPreview.classList.contains('medium-editor-anchor-preview-active')).toBe(true); - expect(parseInt(anchorPreview.style.left, 10)).toBeLessThan(100); - expect(parseInt(anchorPreview.style.top, 10)).toBeLessThan(100); + expect(parseInt(anchorPreview.style.left, 10)).toBeLessThan(200); + expect(parseInt(anchorPreview.style.top, 10)).toBeLessThan(200); document.body.removeChild(container); }); diff --git a/spec/auto-link.spec.js b/spec/auto-link.spec.js index c0bb543ac..75e759ee9 100644 --- a/spec/auto-link.spec.js +++ b/spec/auto-link.spec.js @@ -460,7 +460,7 @@ describe('Autolink', function () { }); it('should stop attempting to auto-link on keypress if an error is encountered', function () { - var spy = spyOn(MediumEditor.extensions.autoLink.prototype, 'performLinking').and.throwError('DOM ERROR'); + var spy = spyOn(MediumEditor.extensions.autoLink.prototype, 'performLinking'); this.el.innerHTML = 'lorem ipsum

lorem ipsum

'; var editor = this.newMediumEditor('.editor', { - allowMultiParagraphSelection: false + toolbar: { + allowMultiParagraphSelection: false + } }), toolbar = editor.getExtensionByName('toolbar'); selectElementContentsAndFire(document.getElementById('p-one')); @@ -368,8 +370,8 @@ describe('MediumEditor.extensions.toolbar TestCase', function () { editor, toolbar; container.style.position = 'absolute'; - container.style.left = '100px'; - container.style.top = '100px'; + container.style.left = '200px'; + container.style.top = '200px'; document.body.appendChild(container); this.el.innerHTML = 'lorem'; @@ -381,8 +383,8 @@ describe('MediumEditor.extensions.toolbar TestCase', function () { selectElementContentsAndFire(this.el); expect(toolbar.classList.contains('medium-editor-toolbar-active')).toBe(true); - expect(parseInt(toolbar.style.left, 10)).toBeLessThan(100); - expect(parseInt(toolbar.style.top, 10)).toBeLessThan(100); + expect(parseInt(toolbar.style.left, 10)).toBeLessThan(200); + expect(parseInt(toolbar.style.top, 10)).toBeLessThan(200); document.body.removeChild(container); });