Skip to content

Commit 26514ec

Browse files
Update 'autolink' tests
Fixes #192
1 parent 8183477 commit 26514ec

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/ui/react/test/autolink.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,41 @@
2626

2727
it('should create a link when pressing SPACE', function() {
2828
testLink.call(this, {
29-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>',
29+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>',
3030
html: '<p>link www.liferay.com { }</p>',
3131
keyCode: KEY_SPACE
3232
});
3333

3434
testLink.call(this, {
35-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>',
35+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>',
3636
html: '<p>link www.liferay.com { }text</p>',
3737
keyCode: KEY_SPACE
3838
});
3939
});
4040

4141
it('should create a link when pressing COMMA', function() {
4242
testLink.call(this, {
43-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>',
43+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>',
4444
html: '<p>link www.liferay.com { }</p>',
4545
keyCode: KEY_COMMA
4646
});
4747

4848
testLink.call(this, {
49-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>',
49+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>',
5050
html: '<p>link www.liferay.com { }text</p>',
5151
keyCode: KEY_COMMA
5252
});
5353
});
5454

5555
it('should create a link when pressing SEMICOLON', function() {
5656
testLink.call(this, {
57-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>',
57+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>',
5858
html: '<p>link www.liferay.com { }</p>',
5959
keyCode: KEY_SEMICOLON
6060
});
6161

6262
testLink.call(this, {
63-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>',
63+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>',
6464
html: '<p>link www.liferay.com { }text</p>',
6565
keyCode: KEY_SEMICOLON
6666
});
@@ -69,10 +69,10 @@
6969
it('should create a link when pressing ENTER', function() {
7070
// FIXME: Is there a way to force CKEDITOR to generate consistent markup in case of pressing ENTER?
7171
// Bender does not fix the generated markup neither.
72-
var expected = '<p>link <a href="www.liferay.com">www.liferay.com</a></p><p>text</p>';
72+
var expected = '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p><p>text</p>';
7373

7474
if (CKEDITOR.env.ie && CKEDITOR.env.version < 11) {
75-
expected = '<p>link <a href="www.liferay.com">www.liferay.com</a><br />&nbsp;</p><p>text</p>';
75+
expected = '<p>link <a href="http://www.liferay.com">www.liferay.com</a><br />&nbsp;</p><p>text</p>';
7676
}
7777

7878
testLink.call(this, {
@@ -128,15 +128,15 @@
128128

129129
it('should not remove a link that has not just been created', function() {
130130
testLink.call(this, {
131-
expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>',
132-
html: '<p>link <a href="www.liferay.com">www.liferay.com</a> { }</p>',
131+
expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>',
132+
html: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> { }</p>',
133133
keyCode: KEY_BACK
134134
});
135135
});
136136

137137
it('should convert only valid urls as links', function() {
138138
testLink.call(this, {
139-
expected: '<p>link <a href="www.liferay.org">www.liferay.org</a></p>',
139+
expected: '<p>link <a href="http://www.liferay.org">www.liferay.org</a></p>',
140140
html: '<p>link www.liferay.org { }</p>',
141141
keyCode: KEY_SPACE
142142
});

0 commit comments

Comments
 (0)