mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: Automatically add http:// when adding links without them via composer
This commit is contained in:
parent
aa001fcfc4
commit
f3efe657fa
2 changed files with 21 additions and 3 deletions
|
@ -207,6 +207,16 @@ testCase('link modal (simple link)', function(assert, textarea) {
|
|||
});
|
||||
});
|
||||
|
||||
testCase('link modal auto http addition', function(assert) {
|
||||
click('button.link');
|
||||
fillIn('.insert-link input', 'sam.com');
|
||||
click('.insert-link button.btn-primary');
|
||||
const desc = I18n.t('composer.link_description');
|
||||
andThen(() => {
|
||||
assert.equal(this.get('value'), `hello world.[${desc}](http://sam.com)`);
|
||||
});
|
||||
});
|
||||
|
||||
testCase('link modal (simple link) with selected text', function(assert, textarea) {
|
||||
textarea.selectionStart = 0;
|
||||
textarea.selectionEnd = 12;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue