-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mateusz Samsel
committed
Sep 7, 2017
1 parent
141fd23
commit 5308b70
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* bender-tags: editor */ | ||
/* bender-ckeditor-plugins: toolbar,indentlist,list,wysiwygarea */ | ||
/* bender-ui: collapsed */ | ||
|
||
( function() { | ||
'use strict'; | ||
|
||
bender.editor = true; | ||
|
||
bender.test( { | ||
'test indention keeps proper list tags': function() { | ||
var bot = this.editorBot; | ||
|
||
bot.setHtmlWithSelection( '<ul><li>foo</li><li>bar<ol><li>111</li></ol><li>[222</li><li>333]</li></li><li>baz</li></ul>' ); | ||
bot.execCommand( 'indent' ); | ||
|
||
assert.beautified.html( '<ul><li>foo</li><li>bar<ol><li>111</li><li>222</li><li>333</li></ol></li><li>baz</li></ul>', bot.getData() ); | ||
}, | ||
|
||
'test outdent and indent get proper list tags': function() { | ||
var bot = this.editorBot; | ||
|
||
bot.setHtmlWithSelection( '<ol><li>foo</li><li>bar<ul><li>111</li><li>2^22</li><li>333</li></ul></li><li>baz</li></ol>' ); | ||
|
||
bot.execCommand( 'outdent' ); | ||
assert.beautified.html( '<ol><li>foo</li><li>bar<ul><li>111</li></ul></li><li>222<ul><li>333</li></ul></li><li>baz</li></ol>', bot.getData() ); | ||
|
||
bot.execCommand( 'indent' ); | ||
assert.beautified.html( '<ol><li>foo</li><li>bar<ul><li>111</li><li>222<ul><li>333</li></ul></li></ul></li><li>baz</li></ol>', bot.getData() ); | ||
} | ||
} ); | ||
} )(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<textarea name="" id="editor" cols="30" rows="10"> | ||
<ol><li>one</li><li>two<ul><li>111</li><li>222</li><li>333</li></ul></li><li>three</li></ol> | ||
</textarea> | ||
|
||
<script> | ||
CKEDITOR.replace( 'editor' ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@bender-tags: 4.7.3, 842, bug | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: toolbar, wysiwygarea, list, indentlist | ||
|
||
---- | ||
|
||
1. Put caret in paragraph with `333`. | ||
1. Use `Decrease indent` to move paragraph to the left. | ||
1. Use `Increase indent` to move paragraph to the right. | ||
|
||
**Expected:** List item with `333` has circle as a list tag. | ||
|
||
**Unexpected:** List item with `333` has number as a list tag. | ||
|