當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Assertions.cAssertHtml方法代碼示例

本文整理匯總了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)
   ]);
 };
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:7,代碼來源:ImageToolsErrorTest.ts

示例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)
   ]);
 };
開發者ID:aha-app,項目名稱:tinymce-word-paste-filter,代碼行數:7,代碼來源:IgnoreForcedPluginsTest.ts

示例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))
   ]));
 };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:ImageToolsErrorTest.ts

示例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)
   ]);
 };
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:7,代碼來源:IsCachedResponseTest.ts

示例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
  );
};
開發者ID:tinymce,項目名稱:tinymce,代碼行數:8,代碼來源:Utils.ts

示例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')
);
開發者ID:tinymce,項目名稱:tinymce,代碼行數:9,代碼來源:Helpers.ts


注:本文中的@ephox/agar.Assertions.cAssertHtml方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。