OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
/
delete
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:14:55 AM
rwxr-xr-x
📄
BlockBoundaryDeleteTest.ts
10.57 KB
02/20/2020 06:13:13 AM
rw-r--r--
📄
BlockMergeBoundaryTest.ts
5.49 KB
02/20/2020 06:13:13 AM
rw-r--r--
📄
BlockRangeDeleteTest.ts
7.06 KB
02/20/2020 06:13:14 AM
rw-r--r--
📄
CefBoundaryDeleteTest.ts
4.17 KB
02/20/2020 06:13:14 AM
rw-r--r--
📄
CefDeleteActionTest.ts
14.63 KB
02/20/2020 06:13:15 AM
rw-r--r--
📄
CefDeleteTest.ts
5.55 KB
02/20/2020 06:13:15 AM
rw-r--r--
📄
DeleteCommandsTest.ts
1.75 KB
02/20/2020 06:13:16 AM
rw-r--r--
📄
DeleteElementTest.ts
10.08 KB
02/20/2020 06:13:16 AM
rw-r--r--
📄
DeleteUtilsTest.ts
5.22 KB
02/20/2020 06:13:17 AM
rw-r--r--
📄
ImageBlockDeleteTest.ts
3.23 KB
02/20/2020 06:13:17 AM
rw-r--r--
📄
InlineBoundaryDeleteTest.ts
6.21 KB
02/20/2020 06:13:19 AM
rw-r--r--
📄
InlineFormatDeleteTest.ts
11.09 KB
02/20/2020 06:13:19 AM
rw-r--r--
📄
MergeBlocksTest.ts
9.54 KB
02/20/2020 06:13:20 AM
rw-r--r--
📄
TableDeleteActionTest.ts
5.29 KB
02/20/2020 06:13:20 AM
rw-r--r--
📄
TableDeleteTest.ts
15.75 KB
02/20/2020 06:13:21 AM
rw-r--r--
Editing: ImageBlockDeleteTest.ts
Close
import { GeneralSteps, Logger, Pipeline, Keys, Log } from '@ephox/agar'; import { UnitTest } from '@ephox/bedrock'; import { TinyActions, TinyApis, TinyLoader } from '@ephox/mcagar'; import Theme from 'tinymce/themes/silver/Theme'; import VK from 'tinymce/core/api/util/VK'; UnitTest.asynctest('browser.tinymce.core.delete.ImageBlockDeleteTest', (success, failure) => { Theme(); TinyLoader.setup(function (editor, onSuccess, onFailure) { const tinyApis = TinyApis(editor); const tinyActions = TinyActions(editor); Pipeline.async({}, [ tinyApis.sFocus, Log.stepsAsStep('TBA', 'Delete keys for image block element', [ Logger.t('Should place the selection on the image block element on delete before', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a<img src="about:blank" class="block">b</p>'), tinyApis.sSetSelection([0, 0], 1, [0, 0], 1), tinyActions.sContentKeystroke(VK.DELETE, {}), tinyApis.sAssertSelection([0], 1, [0], 2) ])), Logger.t('Should place the selection on the image block element on delete before', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a</p><p><img src="about:blank" class="block"></p><p>b</p>'), tinyApis.sSetSelection([0, 0], 1, [0, 0], 1), tinyActions.sContentKeystroke(VK.DELETE, {}), tinyApis.sAssertSelection([1], 0, [1], 1) ])) ]), Log.stepsAsStep('TBA', 'Backspace keys for image block element', [ Logger.t('Should place the selection on the image block element on backspace after', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a<img src="about:blank" class="block">b</p>'), tinyApis.sSetSelection([0, 2], 0, [0, 2], 0), tinyActions.sContentKeystroke(Keys.backspace(), {}), tinyApis.sAssertSelection([0], 1, [0], 2) ])), Logger.t('Should place the selection on the image block element on backspace after', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a</p><p><img src="about:blank" class="block"></p><p>b</p>'), tinyApis.sSetSelection([2, 0], 0, [2, 0], 0), tinyActions.sContentKeystroke(Keys.backspace(), {}), tinyApis.sAssertSelection([1], 0, [1], 1) ])) ]), Log.stepsAsStep('TBA', 'Backspace/delete before on non block images should not select the image', [ Logger.t('Should place the selection on the image block element on backspace after', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a<img src="about:blank">b</p>'), tinyApis.sSetSelection([0, 0], 1, [0, 0], 1), tinyActions.sContentKeystroke(VK.DELETE, {}), tinyApis.sAssertSelection([0, 0], 1, [0, 0], 1) ])), Logger.t('Should place the selection on the image block element on backspace after', GeneralSteps.sequence([ tinyApis.sSetContent('<p>a<img src="about:blank">b</p>'), tinyApis.sSetSelection([0, 2], 0, [0, 2], 0), tinyActions.sContentKeystroke(Keys.backspace(), {}), tinyApis.sAssertSelection([0, 2], 0, [0, 2], 0) ])) ]) ], onSuccess, onFailure); }, { content_style: 'img.block { display: block }', base_url: '/project/tinymce/js/tinymce' }, success, failure); });