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


TypeScript Log.steps方法代碼示例

本文整理匯總了TypeScript中@ephox/agar.Log.steps方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Log.steps方法的具體用法?TypeScript Log.steps怎麽用?TypeScript Log.steps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@ephox/agar.Log的用法示例。


在下文中一共展示了Log.steps方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: TinyUi

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const ui = TinyUi(editor);
    const apis = TinyApis(editor);

    Pipeline.async({},
      Log.steps('TBA', 'Media: Set and assert script placeholder and placeholder structure', [
        Utils.sSetSetting(editor.settings, 'media_live_embeds', false),
        sTestScriptPlaceholder(ui, editor, apis,
          '<p>\n' +
          '<script src="http://media1.tinymce.com/123456" type="text/javascript"></sc' + 'ript>\n' +
          '<script src="http://media2.tinymce.com/123456" type="text/javascript"></sc' + 'ript>\n' +
          '</p>', scriptStruct),
        sTestPlaceholder(ui, editor, apis,
          'https://www.youtube.com/watch?v=P_205ZY52pY',
          '<p><iframe src="//www.youtube.com/embed/P_205ZY52pY" width="560" ' +
          'height="314" allowfullscreen="allowfullscreen"></iframe></p>',
          placeholderStructure),
        Utils.sSetSetting(editor.settings, 'media_live_embeds', true),
        sTestPlaceholder(ui, editor, apis,
          'https://www.youtube.com/watch?v=P_205ZY52pY',
          '<p><iframe src="//www.youtube.com/embed/P_205ZY52pY" width="560" ' +
          'height="314" allowfullscreen="allowfullscreen"></iframe></p>',
          iframeStructure)
      ])
    , onSuccess, onFailure);
  }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:26,代碼來源:PlaceholderTest.ts

示例2: TinyUi

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyUi = TinyUi(editor);
    const tinyApis = TinyApis(editor);

    Pipeline.async({},
      Log.steps('TBA', 'Anchor: Add anchor, change anchor, undo anchor then the anchor should be there as first entered', [
        tinyApis.sFocus,
        tinyApis.sSetContent('abc'),
        tinyApis.sExecCommand('mceAnchor'),
        tinyUi.sWaitForPopup('wait for window', 'div[role="dialog"].tox-dialog'),
        sType('abc'),
        tinyUi.sClickOnUi('click on Save btn', '.tox-dialog__footer .tox-button:not(.tox-button--secondary)'),
        tinyApis.sAssertContentPresence({ 'a.mce-item-anchor#abc': 1 }),
        tinyApis.sSelect('a.mce-item-anchor', []),
        tinyApis.sExecCommand('mceAnchor'),
        tinyUi.sWaitForPopup('wait for window', 'div[role="dialog"].tox-dialog'),
        sType('def'),
        tinyUi.sClickOnUi('click on Save btn', '.tox-dialog__footer .tox-button:not(.tox-button--secondary)'),
        tinyApis.sAssertContentPresence({ 'a.mce-item-anchor#def': 1 }),
        tinyApis.sExecCommand('undo'),
        tinyApis.sSetCursor([], 0),
        tinyApis.sAssertContentPresence({ 'a.mce-item-anchor#abc': 1 })
      ])
    , onSuccess, onFailure);
  }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:25,代碼來源:AnchorEditTest.ts

示例3: TinyUi

    TinyLoader.setup(function (editor, onSuccess, onFailure) {
      const tinyUi = TinyUi(editor);
      const tinyApis = TinyApis(editor);

      Pipeline.async({}, Log.steps('TBA', 'VisualBlocks: Assert visual blocks are not present, click on the visual blocks button and assert they are present, click on the button again and assert they are not present', [
        tinyApis.sAssertContentStructure(ApproxStructure.build(function (s, str, arr) {
          return s.element('body', {
            classes: [
              arr.not('mce-visualblocks')
            ]
          });
        })),
        tinyUi.sClickOnToolbar('click visualblocks button', 'button'),
        tinyApis.sAssertContentStructure(ApproxStructure.build(function (s, str, arr) {
          return s.element('body', {
            classes: [
              arr.has('mce-visualblocks')
            ]
          });
        })),
        tinyUi.sClickOnToolbar('click visualblocks button', 'button'),
        tinyApis.sAssertContentStructure(ApproxStructure.build(function (s, str, arr) {
          return s.element('body', {
            classes: [
              arr.not('mce-visualblocks')
            ]
          });
        }))
      ]), onSuccess, onFailure);
    }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:30,代碼來源:VisualBlocksSanityTest.ts

示例4: function

  const setup = function (success, failure) {
    const div = document.createElement('div');

    div.innerHTML = (
      '<div id="lists">' +
      '<ul><li>before</li></ul>' +
      '<ul id="inline"><li>x</li></ul>' +
      '<ul><li>after</li></ul>' +
      '</div>'
    );

    document.body.appendChild(div);

    EditorManager.init({
      selector: '#inline',
      inline: true,
      add_unload_trigger: false,
      skin: false,
      plugins: 'lists',
      disable_nodechange: true,
      init_instance_callback (editor) {
        Pipeline.async({}, Log.steps('TBA', 'Lists: Backspace delete inline tests', suite.toSteps(editor)), function () {
          teardown(editor, div);
          success();
        }, failure);
      },
      valid_styles: {
        '*': 'color,font-size,font-family,background-color,font-weight,font-style,text-decoration,float,' +
        'margin,margin-top,margin-right,margin-bottom,margin-left,display,position,top,left,list-style-type'
      }
    });
  };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:32,代碼來源:BackspaceDeleteInlineTest.ts

示例5: TinyApis

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const doc = TinyDom.fromDom(document);

    Pipeline.async({},
      Log.steps('TBA', 'Link: complex selections should preserve the text', [
        TestLinkUi.sClearHistory,
        tinyApis.sSetContent('<p><strong>word</strong></p><p><strong>other</strong></p>'),
        tinyApis.sSetSelection([0], 0, [1], 1),
        tinyApis.sExecCommand('mcelink'),
        UiFinder.sWaitForVisible('wait for link dialog', TinyDom.fromDom(document.body), '[role="dialog"]'),
        FocusTools.sSetActiveValue(doc, 'http://something'),
        Keyboard.sKeydown(doc, Keys.enter(), { }),
        Waiter.sTryUntil(
          'Wait until link is inserted',
          tinyApis.sAssertContentPresence({
            'a[href="http://something"]': 2,
            'p:contains(word)': 1,
            'p:contains(other)': 1,
            'p': 2
          }),
          100,
          1000
        ),
        TestLinkUi.sClearHistory
      ])
    , onSuccess, onFailure);
  }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:28,代碼來源:SelectedTextLinkTest.ts

示例6: TinyUi

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const ui = TinyUi(editor);

    Pipeline.async({}, Log.steps('TBA', 'Spellchecker: Multiple languages split button', [
      ui.sWaitForUi('my button', '.tox-split-button'),
    ]), onSuccess, onFailure);
  }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:SpellcheckerManyLanguagesTest.ts

示例7: function

 const sTestSetContent = function (tinyApis) {
   return GeneralSteps.sequence(Log.steps('TBA', 'WordCount: Set test content and assert word count', [
     sReset(tinyApis),
     tinyApis.sSetContent('<p>hello world</p>'),
     sWaitForWordcount(2)
   ]));
 };
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:PluginTest.ts

示例8: insertTablePickerApprox

    (editor, onSuccess, onFailure) => {
      const doc = Element.fromDom(document);

      Pipeline.async({ }, Log.steps(
        'TBA',
        'Check structure of table picker',
        [
          Mouse.sClickOn(Body.body(), '.tox-toolbar button'),
          UiFinder.sWaitForVisible('Waiting for menu', Body.body(), '[role="menu"]'),
          Chain.asStep(Body.body(), [
            UiFinder.cFindIn('[role="menu"]'),
            Assertions.cAssertStructure(
              'Checking structure',
              ApproxStructure.build((s, str, arr) => insertTablePickerApprox(s, str, arr, 1, 1))
            )
          ]),
          FocusTools.sTryOnSelector('Focus should be on first table cell', doc, '.tox-insert-table-picker__selected:last'),
          Keyboard.sKeydown(doc, Keys.down(), {}),
          Keyboard.sKeydown(doc, Keys.right(), {}),
          Chain.asStep(Body.body(), [
            UiFinder.cFindIn('[role="menu"]'),
            Assertions.cAssertStructure(
              'Checking structure',
              ApproxStructure.build((s, str, arr) => insertTablePickerApprox(s, str, arr, 2, 2))
            )
          ]),
          FocusTools.sTryOnSelector('Focus should be on 2 down, 2 across table cell', doc, '.tox-insert-table-picker__selected:last')
        ]
      ), onSuccess, onFailure);
    },
開發者ID:tinymce,項目名稱:tinymce,代碼行數:30,代碼來源:OxideTablePickerMenuTest.ts

示例9: TinyUi

 TinyLoader.setup(function (editor, onSuccess, onFailure) {
   const ui = TinyUi(editor);
   Pipeline.async({}, Log.steps('TBA', 'Spellchecker: default settings', [
     sTestDefaultLanguage(editor),
     ui.sWaitForUi('my button', '.tox-split-button'),
   ]), onSuccess, onFailure);
 }, {
開發者ID:tinymce,項目名稱:tinymce,代碼行數:7,代碼來源:SpellcheckerTest.ts


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