diff --git a/spec/anchor-preview.spec.js b/spec/anchor-preview.spec.js index cb2e50917..fff98ba45 100644 --- a/spec/anchor-preview.spec.js +++ b/spec/anchor-preview.spec.js @@ -139,6 +139,9 @@ describe('Anchor Preview TestCase', function () { expect(toolbar.isDisplayed()).toBe(true); expect(anchor.isDisplayed()).toBe(true); + // textbox should contain the url + expect(anchor.getInput().value).toEqual('http://test.com'); + // the checkboxes should be unchecked expect(anchor.getAnchorTargetCheckbox().checked).toBe(false); expect(anchor.getAnchorButtonCheckbox().checked).toBe(false); @@ -306,7 +309,7 @@ describe('Anchor Preview TestCase', function () { }); // https://github.com/yabwe/medium-editor/issues/1047 - it('should display the anchor form in the toolbar when clicked when showWhenToolbarIsVisible is set to true adn toolbar is visible', function () { + it('should display the anchor form in the toolbar when clicked when showWhenToolbarIsVisible is set to true and toolbar is visible', function () { var editor = this.newMediumEditor('.editor', { anchorPreview: { showWhenToolbarIsVisible: true diff --git a/src/js/extensions/anchor-preview.js b/src/js/extensions/anchor-preview.js index a186ae821..464379e43 100644 --- a/src/js/extensions/anchor-preview.js +++ b/src/js/extensions/anchor-preview.js @@ -155,7 +155,7 @@ this.base.delay(function () { if (activeAnchor) { var opts = { - url: activeAnchor.attributes.href.value, + value: activeAnchor.attributes.href.value, target: activeAnchor.getAttribute('target'), buttonClass: activeAnchor.getAttribute('class') };