本文整理汇总了TypeScript中@ephox/agar.Step.raw方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Step.raw方法的具体用法?TypeScript Step.raw怎么用?TypeScript Step.raw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/agar.Step
的用法示例。
在下文中一共展示了Step.raw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Plugin
UnitTest.asynctest('browser.tinymce.plugins.table.InlineEditorInsideTableTest', (success, failure) => {
Plugin();
SilverTheme();
const containerHtml = '<table>' +
'<tbody>' +
'<tr>' +
'<td>' +
'<div class="tinymce" style="border: 1px gray solid">a</div>' +
'</td>' +
'</tr>' +
'</tbody>' +
'</table>';
const cOnSelector = function (selector) {
return Chain.control(
Chain.async(function (_, next) {
EditorManager.init({
selector,
inline: true,
theme: 'silver',
statusbar: false,
menubar: false,
plugins: 'table',
skin_url: '/project/tinymce/js/tinymce/skins/ui/oxide',
content_css: '/project/tinymce/js/tinymce/skins/content/default',
setup (editor) {
editor.on('SkinLoaded', function () {
Delay.setTimeout(function () {
next(editor);
}, 0);
});
}
});
}),
Guard.addLogging('Add editor settings')
);
};
const cNotExists = (container, selector) => {
return Chain.control(
Chain.op(() => {
UiFinder.findIn(container, selector).fold(
() => RawAssertions.assertEq('should not find anything', true, true),
() => RawAssertions.assertEq('Expected ' + selector + ' not to exist.', true, false)
);
}),
Guard.addLogging('Assert ' + selector + ' does not exist')
);
};
const step = Step.raw((_, next, die, initLogs) => {
NamedChain.pipeline([
NamedChain.write('container', Chain.async((input, n, die) => {
const container = Element.fromTag('div');
Attr.set(container, 'id', 'test-container-div');
Html.set(container, containerHtml);
Insert.append(Body.body(), container);
n(container);
})),
NamedChain.write('editor', cOnSelector('div.tinymce')),
NamedChain.direct('container', Chain.fromChains([
UiFinder.cFindIn('div.tinymce'),
Mouse.cMouseOver,
cNotExists(Body.body(), 'div[data-row="0"]')
]), '_'),
NamedChain.read('editor', Editor.cRemove),
NamedChain.read('container', Chain.op((div) => Remove.remove(div)))
], next, die, initLogs);
});
Pipeline.async({}, [
Log.step('TBA', 'Table: Table outside of inline editor should not become resizable', step)
], () => success(), failure, TestLogs.init());
});