OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
mobile
/
test
/
ts
/
module
/
test
/
ui
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:19 AM
rwxr-xr-x
📄
TestEditor.ts
1.31 KB
02/20/2020 06:40:21 AM
rw-r--r--
📄
TestFrameEditor.ts
2.38 KB
02/20/2020 06:40:22 AM
rw-r--r--
📄
TestSelectors.ts
174 bytes
02/20/2020 06:40:24 AM
rw-r--r--
📄
TestStyles.ts
1.28 KB
02/20/2020 06:40:23 AM
rw-r--r--
📄
TestUi.ts
2.1 KB
02/20/2020 06:40:24 AM
rw-r--r--
Editing: TestStyles.ts
Close
import { Assertions, Chain, UiFinder, Waiter } from '@ephox/agar'; import { Id } from '@ephox/katamari'; import { Attr, Class, Css, Element, Insert, Remove, SelectorFind } from '@ephox/sugar'; import { document, navigator } from '@ephox/dom-globals'; const styleClass = Id.generate('ui-test-styles'); const addStyles = function () { const link = Element.fromTag('link'); Attr.setAll(link, { rel: 'Stylesheet', href: '/project/tinymce/js/tinymce/skins/ui/oxide/skin.mobile.min.css', type: 'text/css' }); Class.add(link, styleClass); const head = Element.fromDom(document.head); Insert.append(head, link); }; const removeStyles = function () { const head = Element.fromDom(document.head); SelectorFind.descendant(head, '.' + styleClass).each(Remove.remove); }; const sWaitForToolstrip = function (realm) { return Waiter.sTryUntil( 'Waiting until CSS has loaded', Chain.asStep(realm.element(), [ UiFinder.cFindIn('.tinymce-mobile-toolstrip'), Chain.op(function (toolstrip) { if (navigator.userAgent.indexOf('PhantomJS') === -1) { Assertions.assertEq('Checking toolstrip is flex', 'flex', Css.get(toolstrip, 'display')); } }) ]), 100, 8000 ); }; export default { addStyles, removeStyles, sWaitForToolstrip };