OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
/
keyboard
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:14:55 AM
rwxr-xr-x
📄
ArrowKeysAnchorTest.ts
9.31 KB
02/20/2020 06:14:22 AM
rw-r--r--
📄
ArrowKeysContentEndpointBrModeTest.ts
2.83 KB
02/20/2020 06:14:21 AM
rw-r--r--
📄
ArrowKeysContentEndpointTest.ts
4.06 KB
02/20/2020 06:14:23 AM
rw-r--r--
📄
ArrowKeysInlineBoundariesTest.ts
14.39 KB
02/20/2020 06:14:23 AM
rw-r--r--
📄
ArrowKeysTableTest.ts
11.51 KB
02/20/2020 06:14:24 AM
rw-r--r--
📄
BoundaryCaretTest.ts
2.94 KB
02/20/2020 06:14:24 AM
rw-r--r--
📄
BoundaryLocationTest.ts
12.35 KB
02/20/2020 06:14:25 AM
rw-r--r--
📄
EnterKeyAnchorTest.ts
6.66 KB
02/20/2020 06:14:25 AM
rw-r--r--
📄
EnterKeyCeFalseTest.ts
2.61 KB
02/20/2020 06:14:26 AM
rw-r--r--
📄
EnterKeyHrTest.ts
2.9 KB
02/20/2020 06:14:26 AM
rw-r--r--
📄
EnterKeyInlineTest.ts
1021 bytes
02/20/2020 06:14:27 AM
rw-r--r--
📄
EnterKeyListsTest.ts
16.34 KB
02/20/2020 06:14:27 AM
rw-r--r--
📄
EnterKeyTest.ts
30.93 KB
02/20/2020 06:14:28 AM
rw-r--r--
📄
HomeEndKeysTest.ts
4.5 KB
02/20/2020 06:14:28 AM
rw-r--r--
📄
InlineUtilsTest.ts
7.64 KB
02/20/2020 06:14:30 AM
rw-r--r--
📄
InsertKeysBrModeTest.ts
5.65 KB
02/20/2020 06:14:30 AM
rw-r--r--
📄
InsertKeysTest.ts
10.22 KB
02/20/2020 06:14:31 AM
rw-r--r--
📄
SpaceKeyTest.ts
3.52 KB
02/20/2020 06:14:31 AM
rw-r--r--
📄
TableNavigationTest.ts
4.84 KB
02/20/2020 06:14:31 AM
rw-r--r--
📄
TypeTextAtCefTest.ts
2.37 KB
02/20/2020 06:14:32 AM
rw-r--r--
Editing: InsertKeysBrModeTest.ts
Close
import { GeneralSteps, Logger, Pipeline, Step } from '@ephox/agar'; import { TinyApis, TinyLoader } from '@ephox/mcagar'; import Theme from 'tinymce/themes/silver/Theme'; import { UnitTest } from '@ephox/bedrock'; import Editor from 'tinymce/core/api/Editor'; UnitTest.asynctest('browser.tinymce.core.keyboard.InsertKeysBrModeTest', (success, failure) => { Theme(); const sFireInsert = (editor: Editor) => { return Step.sync(() => { editor.fire('input', { isComposing: false }); }); }; TinyLoader.setup(function (editor, onSuccess, onFailure) { const tinyApis = TinyApis(editor); Pipeline.async({}, [ Logger.t('Insert key in text with in nbsp text node', GeneralSteps.sequence([ Logger.t('Nbsp at first character position', GeneralSteps.sequence([ Logger.t('Insert in text node with nbsp at start of body', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent(' a'), tinyApis.sSetCursor([0], 2), sFireInsert(editor), tinyApis.sAssertSelection([0], 2, [0], 2), tinyApis.sAssertContent(' a') ])), Logger.t('Insert in text in node with leading nbsp after inline with trailing space', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a<em>b </em> c'), tinyApis.sSetCursor([2], 2), sFireInsert(editor), tinyApis.sAssertSelection([2], 2, [2], 2), tinyApis.sAssertContent('a<em>b </em> c') ])), Logger.t('Insert in text in node with leading nbsp after inline', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a<em>b</em> c'), tinyApis.sSetCursor([2], 2), sFireInsert(editor), tinyApis.sAssertSelection([2], 2, [2], 2), tinyApis.sAssertContent('a<em>b</em> c') ])), Logger.t('Insert in text in node with leading nbsp after inline with trailing nbsp', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a<em>b </em> c'), tinyApis.sSetCursor([2], 2), sFireInsert(editor), tinyApis.sAssertSelection([2], 2, [2], 2), tinyApis.sAssertContent('a<em>b </em> c') ])), Logger.t('Insert at beginning of text node with leading nbsp after a br', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a<br /> b'), tinyApis.sSetCursor([2], 0), sFireInsert(editor), tinyApis.sAssertSelection([2], 0, [2], 0), tinyApis.sAssertContent('a<br /> b') ])), Logger.t('Insert at beginning of text node with leading nbsp within inline element followed by br', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a<br /><em> b</em>'), tinyApis.sSetCursor([2, 0], 0), sFireInsert(editor), tinyApis.sAssertSelection([2, 0], 0, [2, 0], 0), tinyApis.sAssertContent('a<br /><em> b</em>') ])) ])), Logger.t('Nbsp at last character position', GeneralSteps.sequence([ Logger.t('Insert in text node with nbsp at end of body', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a '), tinyApis.sSetCursor([0], 0), sFireInsert(editor), tinyApis.sAssertSelection([0], 0, [0], 0), tinyApis.sAssertContent('a ') ])), Logger.t('Insert in text in node with leading nbsp after inline with trailing space', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a <em> b</em>c'), tinyApis.sSetCursor([0], 0), sFireInsert(editor), tinyApis.sAssertSelection([0], 0, [0], 0), tinyApis.sAssertContent('a <em> b</em>c') ])), Logger.t('Insert in text in node with trailing nbsp before inline', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a <em>b</em>c'), tinyApis.sSetCursor([0], 0), sFireInsert(editor), tinyApis.sAssertSelection([0], 0, [0], 0), tinyApis.sAssertContent('a <em>b</em>c') ])), Logger.t('Insert in text in node with trailing nbsp before inline with leading nbsp', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a <em> b</em>c'), tinyApis.sSetCursor([0], 0), sFireInsert(editor), tinyApis.sAssertSelection([0], 0, [0], 0), tinyApis.sAssertContent('a <em> b</em>c') ])), Logger.t('Insert in text in node with single middle nbsp', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a b'), tinyApis.sSetCursor([0], 3), sFireInsert(editor), tinyApis.sAssertSelection([0], 3, [0], 3), tinyApis.sAssertContent('a b') ])), Logger.t('Insert in text in node with multiple middle nbsp', GeneralSteps.sequence([ tinyApis.sFocus, tinyApis.sSetRawContent('a b c d'), tinyApis.sSetCursor([0], 7), sFireInsert(editor), tinyApis.sAssertSelection([0], 7, [0], 7), tinyApis.sAssertContent('a b c d') ])) ])), ])) ], onSuccess, onFailure); }, { indent: false, forced_root_block: false, base_url: '/project/tinymce/js/tinymce' }, success, failure); });