-
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.
Remove empty table cells from the dialog of specialchar plugin (#3566)
Remove empty table cells from the dialog of specialchar plugin Co-authored-by: Tomasz Jakut <[email protected]>
- Loading branch information
Showing
5 changed files
with
124 additions
and
55 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
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
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,34 @@ | ||
/* bender-tags: specialchar */ | ||
/* bender-ckeditor-plugins: toolbar,wysiwygarea,specialchar */ | ||
|
||
( function() { | ||
'use strict'; | ||
|
||
bender.editor = true; | ||
|
||
bender.test( { | ||
tearDown: function() { | ||
var dialog; | ||
|
||
while ( ( dialog = CKEDITOR.dialog.getCurrent() ) ) { | ||
dialog.hide(); | ||
} | ||
}, | ||
|
||
'test specialchar dialog should have table cells with role="presentation" and don\'t have empty table cells': function() { | ||
var bot = this.editorBot; | ||
|
||
bot.dialog( 'specialchar', function( dialog ) { | ||
var tableWithCharacters = dialog.parts.contents.findOne( 'td.cke_dialog_ui_hbox_first table[role="listbox"]' ), | ||
tableCells = tableWithCharacters.find( 'td' ).toArray(), | ||
i; | ||
|
||
for ( i = 0; i < tableCells.length; i++ ) { | ||
assert.areSame( 'presentation', tableCells[ i ].getAttribute( 'role' ), | ||
'Table cell with index: ' + i + ' should have role="presentation". Instead it has following html: ' + tableCells[ i ].getOuterHtml() ); | ||
assert.areNotSame( ' ', tableCells[ i ].getHtml(), 'Table cell with index: ' + i + ' should not be empty.' ); | ||
} | ||
} ); | ||
} | ||
} ); | ||
} )(); |
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,11 @@ | ||
<h2>Classic editor</h2> | ||
<div id="classic"> | ||
<p>I'm CKEditor 4 instance.</p> | ||
</div> | ||
|
||
<script> | ||
if ( bender.tools.env.mobile ) { | ||
bender.ignore(); | ||
} | ||
CKEDITOR.replace( 'classic' ); | ||
</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,20 @@ | ||
@bender-ui: collapsed | ||
@bender-tags: 3544, 4.13.1, bug | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, specialchar | ||
|
||
1. Open specialchar dialog. | ||
2. Turn on Voice Over on MacOS (`CMD + F5`) or Narrator on Windows (`WIN + CTRL + Enter`). | ||
3. Move selection to the last character. | ||
4. For MacOS: press `CapsLock + Right Arrow`. | ||
5. For Windows: press `Right Arrow`. | ||
|
||
In case that you have problem with performing steps with assistive technology: | ||
1. Open console. | ||
2. Inspect if there exists empty table cells after last character in the dialog. | ||
|
||
### Expected result: | ||
Assisitve technology doesn't detect and read content of empty table cells at the end of special char dialog. | ||
There shouldn't be any empty cells at the end. | ||
|
||
### Unexpected result | ||
Empty table cells are added at the end of characters list. |