-
Notifications
You must be signed in to change notification settings - Fork 245
Tests for createlink bugs #190
Changes from 1 commit
a67e999
ed1d7b0
4c8b536
b922bcc
9d42197
26df696
a09a182
47d2b14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -400,4 +400,21 @@ describe('commands', function () { | |
}); | ||
}); | ||
}); | ||
|
||
describe('createlink', function () { | ||
given('an empty editor', function () { | ||
when('the command is executed', function () { | ||
beforeEach(function () { | ||
scribeNode.click(); | ||
executeCommand('createlink', 'http://example.com'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The command name should be camelcased. |
||
}); | ||
|
||
it('should insert A with specified URL and content followed by BR', function () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “followed by BR” probably isn't what you want to test here. We have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was looking for something that would just check for existence of A. Is there any helper like that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The way you’ve done it is probably how I would do it (without parsing the DOM and looking for child nodes, etc. – seems a bit pointless). |
||
return scribeNode.getInnerHTML().then(function (innerHTML) { | ||
expect(innerHTML).to.have.html('<p><a href="http://example.com">http://example.com</a><br></p>'); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command name should be camelcased.