Skip to content

Commit

Permalink
Manual tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed Jun 27, 2017
1 parent aff1091 commit 5bb4ad9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/plugins/a11yhelp/manual/commandstable.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<textarea id="editor1">
<h1>Hello world!</h1>
<p>I&#39;m an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
</textarea>

<button onclick="addCommands();" >Re-create editor</button>

<script>
if ( bender.tools.env.mobile ) {
bender.ignore();
}

var editor = CKEDITOR.replace( 'editor1' );


function addCommands() {
editor.destroy();
editor =CKEDITOR.replace( 'editor1' );

editor.addCommand( 'extra1', {
exec: function() {},
label: 'Extra command 1'
} );
editor.addCommand( 'extra2', {
exec: function() {},
label: 'Extra command 2',
description: 'This command contains some description.'
} );
editor.addCommand( 'extra3', {
exec: function() {},
label: 'Extra command 3',
} );

editor.setKeystroke( CKEDITOR.SHIFT + CKEDITOR.ALT + 65, 'extra1' );
editor.setKeystroke( CKEDITOR.SHIFT + CKEDITOR.ALT + 66, 'extra2' );
editor.setKeystroke( CKEDITOR.SHIFT + CKEDITOR.ALT + 67, 'extra3' );

editor.on( 'keystrokeEntry', function( evt ) {
if ( evt.data.commandName === 'extra3' ) {
evt.data.label = 'This label was modified by event.'
}
} );
}
</script>

15 changes: 15 additions & 0 deletions tests/plugins/a11yhelp/manual/commandstable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@bender-tags: manual, 456, tc, 4.8.0, feature
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea,a11yhelp

1. Focus editor
1. Press `Alt + 0`, there should be section **Commands table**
1. Table should contain at least one keystroke `Alt + 0`
1. Press `Re-create editor`, this will remake editor and add 3 new keystrokes
1. Press `Alt + 0`
1. Table should contains 3 new keystrokes:
- `Alt + Shift + A`
- `Alt + Shift + B`, with description
- `Alt + Shift + C`, with modify label

**Unexpected:** Keystrokes are not displayed in accessibility dialog.

0 comments on commit 5bb4ad9

Please sign in to comment.