本文整理汇总了TypeScript中@ephox/agar.Chain.runStepsOnValue方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Chain.runStepsOnValue方法的具体用法?TypeScript Chain.runStepsOnValue怎么用?TypeScript Chain.runStepsOnValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/agar.Chain
的用法示例。
在下文中一共展示了Chain.runStepsOnValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: TinyUi
TinyLoader.setup(function (editor, onSuccess, onFailure) {
const tinyUi = TinyUi(editor);
const tinyApis = TinyApis(editor);
Pipeline.async({}, [
tinyApis.sFocus,
Log.stepsAsStep('TBA', 'Media: test cached response', [
tinyUi.sClickOnToolbar('click media button', 'button[aria-label="Insert/edit media"]'),
Chain.asStep({}, [
Chain.fromParent(
tinyUi.cWaitForPopup('wait for media dialog', 'div[role="dialog"]'), [
Chain.fromChains([
Utils.cSetSourceInput(tinyUi, 'test'),
Utils.cFakeEvent('paste'),
Chain.wait(0) // wait is needed because paste is triggered async
]),
Chain.runStepsOnValue(() => [ Utils.sAssertEmbedData(tinyUi, '<div>x</div>') ]),
Chain.fromChains([
Utils.cSetSourceInput(tinyUi, 'XXX')
]),
Chain.fromChains([
UiFinder.cFindIn(Utils.selectors.saveButton),
Mouse.cClick
])
]
)
]),
sWaitForAndAssertNotification('<p>Media embed handler threw unknown error.</p>'),
tinyApis.sAssertContent('')
])
], onSuccess, onFailure);
}, {