OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
silver
/
test
/
ts
/
module
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:09 AM
rwxr-xr-x
📄
DomSteps.ts
934 bytes
02/20/2020 06:34:11 AM
rw-r--r--
📄
ReperesentingSteps.ts
1.36 KB
02/20/2020 06:34:11 AM
rw-r--r--
📄
TestBackstage.ts
1.1 KB
02/20/2020 06:34:12 AM
rw-r--r--
📄
TestExtras.ts
1.38 KB
02/20/2020 06:34:12 AM
rw-r--r--
📄
TestProviders.ts
185 bytes
02/20/2020 06:34:13 AM
rw-r--r--
📄
UiChainUtils.ts
504 bytes
02/20/2020 06:34:13 AM
rw-r--r--
Editing: ReperesentingSteps.ts
Close
import { Step, Assertions, Logger, Chain, GeneralSteps } from '@ephox/agar'; import { Composing, Representing } from '@ephox/alloy'; const sAssertComposedValue = (label, expected, component) => Logger.t( 'sAssertComposedValue: ' + label, Step.sync(() => { const c = Composing.getCurrent(component).getOrDie('Trying to get the composed component'); Assertions.assertEq('Representing value', expected, Representing.getValue(c)); }) ); const sAssertValue = (label, expected, component) => Logger.t( 'sAssertValue: ' + label, Chain.asStep(component, [ Chain.mapper(Representing.getValue), Assertions.cAssertEq(label, expected) ]) ); const sSetValue = (label, component, newValue) => Logger.t( 'sSetValue: ' + label, Step.sync(() => { Representing.setValue(component, newValue); }) ); const sSetComposedValue = (label, component, newValue) => Logger.t( 'sAssertComposedValue: ' + label, Step.sync(() => { const c = Composing.getCurrent(component).getOrDie('Trying to get the composed component'); Representing.setValue(c, newValue); }) ); const sAssertRoundtrip = (label, component, newValue) => GeneralSteps.sequence([ sSetValue(label, component, newValue), sAssertValue(label, newValue, component) ]); export const RepresentingSteps = { sAssertComposedValue, sAssertValue, sSetComposedValue, sAssertRoundtrip, sSetValue };