Skip to content

Commit

Permalink
More test modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Stolarsky committed Aug 18, 2014
1 parent 999ae52 commit 2ccf0b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/plugins/paste.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/plugins/textpattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

equal(
editor.getContent(),
'<p><strong>abc</strong></p><p></p>'
'<p><strong>abc</strong></p><p><strong></strong></p>'
);
});

Expand Down
17 changes: 8 additions & 9 deletions tests/tinymce/EnterKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ test('Enter inside empty li in the middle of ol', function() {
});

// Nested lists in LI elements

test('Enter inside empty LI in beginning of OL in LI', function() {
editor.getBody().innerHTML = Utils.trimBrsOnIE(
'<ol>' +
Expand Down Expand Up @@ -384,7 +383,7 @@ test('Enter inside empty LI in middle of OL in LI', function() {
'<li>a</li>' +
'</ol>' +
'</li>' +
'<li>' +
'<li>\u00A0' +
'<ol>' +
'<li>b</li>' +
'</ol>' +
Expand Down Expand Up @@ -451,7 +450,7 @@ if (!tinymce.Env.ie || tinymce.Env.ie > 8) {
equal(editor.getContent(),
'<ol>' +
'<li>a</li>' +
'<li>' +
'<li>\u00A0' +
'<ul>' +
'<li>b</li>' +
'<li>c</li>' +
Expand Down Expand Up @@ -556,47 +555,47 @@ test('Enter at beginning of first DT inside DL', function() {
editor.getBody().innerHTML = '<dl><dt>a</dt></dl>';
Utils.setSelection('dt', 0);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dt></dt><dt>a</dt></dl>');
equal(editor.getContent(),'<dl><dt>\u00A0</dt><dt>a</dt></dl>');
equal(editor.selection.getNode().nodeName, 'DT');
});

test('Enter at beginning of first DD inside DL', function() {
editor.getBody().innerHTML = '<dl><dd>a</dd></dl>';
Utils.setSelection('dd', 0);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dd></dd><dd>a</dd></dl>');
equal(editor.getContent(),'<dl><dd>\u00A0</dd><dd>a</dd></dl>');
equal(editor.selection.getNode().nodeName, 'DD');
});

test('Enter at beginning of middle DT inside DL', function() {
editor.getBody().innerHTML = '<dl><dt>a</dt><dt>b</dt><dt>c</dt></dl>';
Utils.setSelection('dt:nth-child(2)', 0);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dt>a</dt><dt></dt><dt>b</dt><dt>c</dt></dl>');
equal(editor.getContent(),'<dl><dt>a</dt><dt>\u00A0</dt><dt>b</dt><dt>c</dt></dl>');
equal(editor.selection.getNode().nodeName, 'DT');
});

test('Enter at beginning of middle DD inside DL', function() {
editor.getBody().innerHTML = '<dl><dd>a</dd><dd>b</dd><dd>c</dd></dl>';
Utils.setSelection('dd:nth-child(2)', 0);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dd>a</dd><dd></dd><dd>b</dd><dd>c</dd></dl>');
equal(editor.getContent(),'<dl><dd>a</dd><dd>\u00A0</dd><dd>b</dd><dd>c</dd></dl>');
equal(editor.selection.getNode().nodeName, 'DD');
});

test('Enter at end of last DT inside DL', function() {
editor.getBody().innerHTML = '<dl><dt>a</dt></dl>';
Utils.setSelection('dt', 1);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dt>a</dt><dt></dt></dl>');
equal(editor.getContent(),'<dl><dt>a</dt><dt>\u00A0</dt></dl>');
equal(editor.selection.getNode().nodeName, 'DT');
});

test('Enter at end of last DD inside DL', function() {
editor.getBody().innerHTML = '<dl><dd>a</dd></dl>';
Utils.setSelection('dd', 1);
Utils.pressEnter();
equal(editor.getContent(),'<dl><dd>a</dd><dd></dd></dl>');
equal(editor.getContent(),'<dl><dd>a</dd><dd>\u00A0</dd></dl>');
equal(editor.selection.getNode().nodeName, 'DD');
});

Expand Down

0 comments on commit 2ccf0b0

Please sign in to comment.