本文整理匯總了TypeScript中@ephox/agar.Assertions.cAssertHtml方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Assertions.cAssertHtml方法的具體用法?TypeScript Assertions.cAssertHtml怎麽用?TypeScript Assertions.cAssertHtml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ephox/agar.Assertions
的用法示例。
在下文中一共展示了Assertions.cAssertHtml方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
const sAssertErrorMessage = function (html) {
return Chain.asStep(TinyDom.fromDom(document.body), [
UiFinder.cWaitFor('Could not find notification', '.mce-notification-inner'),
Chain.mapper(Html.get),
Assertions.cAssertHtml('Message html does not match', html)
]);
};
示例2: function
const sAssertPluginList = function (html) {
return Chain.asStep(TinyDom.fromDom(document.body), [
UiFinder.cWaitFor('Could not find notification', 'div.mce-floatpanel ul'),
Chain.mapper(Html.get),
Assertions.cAssertHtml('Plugin list html does not match', html)
]);
};
示例3: function
const sAssertErrorMessage = function (html) {
return Step.label('Check notification message', Chain.asStep(TinyDom.fromDom(document.body), [
UiFinder.cWaitFor('Find notification', '.tox-notification__body > p'),
Chain.label('Get notification HTML', Chain.mapper(Html.get)),
Chain.label('Assert HTML matches expected', Assertions.cAssertHtml('Message html does not match', html))
]));
};
示例4: function
const sWaitForAndAssertNotification = function (expected) {
return Chain.asStep(TinyDom.fromDom(document.body), [
UiFinder.cWaitFor('Could not find notification', 'div.mce-notification-inner'),
Chain.mapper(Html.get),
Assertions.cAssertHtml('Plugin list html does not match', expected)
]);
};
示例5: function
const sAssertEditorContent = function (apis, editor, expected) {
return Waiter.sTryUntil('Wait for editor value',
Chain.asStep({}, [
apis.cGetContent,
Assertions.cAssertHtml('Assert body content', expected)
]), 10, 3000
);
};
示例6: cleanHtml
const cAssertCleanHtml = (label: string, expected: string) => Chain.control(
NamedChain.asChain([
NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
NamedChain.direct('editor', Chain.mapper((editor: Editor) => cleanHtml(editor.getContent())), 'content'),
NamedChain.direct('content', Assertions.cAssertHtml(label, expected), 'result'),
NamedChain.outputInput
]),
Guard.addLogging('Assert clean html')
);