当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Logger.ts方法代码示例

本文整理汇总了TypeScript中@ephox/agar.Logger.ts方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Logger.ts方法的具体用法?TypeScript Logger.ts怎么用?TypeScript Logger.ts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@ephox/agar.Logger的用法示例。


在下文中一共展示了Logger.ts方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: sAssertCodeSampleDialog

const sOpenDialogAndAssertInitial = (editor, docBody, language, content) => {
  return GeneralSteps.sequence(Logger.ts('Open dialog and assert initial language and content', [
    Mouse.sClickOn(Element.fromDom(editor.getContainer()), toolbarButtonSelector),
    UiFinder.sWaitForVisible('Waited for dialog to be visible', docBody, dialogSelector),
    sAssertCodeSampleDialog(language, content)
  ]));
};
开发者ID:tinymce,项目名称:tinymce,代码行数:7,代码来源:CodeSampleTestUtils.ts

示例2:

 const sSubmitDialog = (docBody) => {
   return GeneralSteps.sequence(Logger.ts('Clicking on the Save button to close dialog', [
     FocusTools.sSetFocus('Focus dialog', docBody, dialogSelector),
     Mouse.sClickOn(docBody, 'button.tox-button:contains(Save)'),
     Waiter.sTryUntil('Dialog should close', UiFinder.sNotExists(docBody, dialogSelector), 100, 3000)
   ]));
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:7,代码来源:CodeSanityTest.ts

示例3: dialog

 const sOpenDialog = (editor, docBody) => {
   return GeneralSteps.sequence(Logger.ts('Open dialog and wait for it to be visible', [
     Step.sync(function () {
       const dialog = ColorSwatch.colorPickerDialog(editor);
       dialog(setColor, '#ffffff');
     }),
     UiFinder.sWaitForVisible('Waited for dialog to be visible', docBody, dialogSelector)
   ]));
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:9,代码来源:ColorPickerSanityTest.ts

示例4: rgb

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

      Pipeline.async({ }, Logger.ts(
        'Check structure of grid collection menu',
        [
          TestHelpers.GuiSetup.mAddStyles(doc, [
            ':focus { background-color: rgb(222, 224, 226); }'
          ]),
          Mouse.sClickOn(Body.body(), '.tox-split-button__chevron'),
          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) => {
                return s.element('div', {
                  classes: [ arr.has('tox-menu'), arr.has('tox-collection'), arr.has('tox-collection--grid') ],
                  children: [
                    s.element('div', {
                      classes: [ arr.has('tox-collection__group') ],
                      children: Arr.map([ '1', '2', '3', '4', '5', '6', '7', '8' ], (num) => {
                        return s.element('div', {
                          classes: [ arr.has('tox-collection__item') ],
                          attrs: {
                            title: str.is(num)
                          },
                          children: [
                            // NOTE: The oxide demo page has div, but I think that's just a mistake
                            s.element('div', {
                             classes: [ arr.has('tox-collection__item-icon') ],
                             children: [
                               s.element('svg', {})
                             ]
                            })
                          ]
                        });
                      })
                    })
                  ]
                });
              })
            )
          ]),

          // Without layout, the flatgrid cannot be calculated on phantom
          navigator.userAgent.indexOf('PhantomJS') > -1 ? Step.pass : GeneralSteps.sequence([
            FocusTools.sTryOnSelector('Focus should be on 1', doc, '.tox-collection__item[title="1"]'),
            Keyboard.sKeydown(doc, Keys.right(), { }),
            FocusTools.sTryOnSelector('Focus should be on 2', doc, '.tox-collection__item[title="2"]'),
            Keyboard.sKeydown(doc, Keys.right(), { }),
            FocusTools.sTryOnSelector('Focus should be on 3', doc, '.tox-collection__item[title="3"]')
          ]),
          TestHelpers.GuiSetup.mRemoveStyles
        ]
      ), onSuccess, onFailure);
    },
开发者ID:tinymce,项目名称:tinymce,代码行数:57,代码来源:OxideGridCollectionMenuTest.ts

示例5: TinyUi

    (editor, onSuccess, onFailure) => {
      const tinyUi = TinyUi(editor);

      Pipeline.async({ }, Logger.ts(
          'Dialog closes without error using close button',
          [
            tinyUi.sWaitForPopup('wait for window', 'div[role="dialog"].tox-dialog'),
            tinyUi.sClickOnUi('click on close button', 'div[role="dialog"] button[aria-label="Close"]'),
          ]
        ), onSuccess, onFailure);
    },
开发者ID:tinymce,项目名称:tinymce,代码行数:11,代码来源:SilverDialogCloseTest.ts

示例6: TinyUi

    (editor, onSuccess, onFailure) => {
      const tinyUi = TinyUi(editor);

      Pipeline.async({ }, Logger.ts(
          'Dialog closes without error using cancel button',
          [
            tinyUi.sWaitForPopup('wait for window', 'div[role="dialog"].tox-dialog'),
            tinyUi.sClickOnUi('click on Close button', 'div[role="dialog"] .tox-button--secondary')
          ]
        ), onSuccess, onFailure);
    },
开发者ID:tinymce,项目名称:tinymce,代码行数:11,代码来源:SilverDialogCancelTest.ts

示例7: sAssertEditorContentStructure

const sAssertEditorContents = (editorBody, language, content, selector) => {
  /*
   * Since the syntax highlighting wraps tokens in spans which would be annoying to assert, we assert
   * the overall structure of the editor's content, then exact match the textContent of the pre tag
   * to ensure it matches the content we set originally.
   */
  return GeneralSteps.sequence(Logger.ts('Assert overall structure of editor content', [
    sAssertEditorContentStructure(editorBody, language, content),
    sAssertPreText(Element.fromDom(editorBody), selector, content),
  ]));
};
开发者ID:tinymce,项目名称:tinymce,代码行数:11,代码来源:CodeSampleTestUtils.ts

示例8:

 const sContentAreaContainerTest = (contentAreaContainer) => Logger.ts('Check basic content area container structure', [
   Assertions.sAssertStructure(
     'Content area container structure',
     ApproxStructure.build((s, str, arr) => {
       return s.element('div', {
         classes: [ arr.has('mce-content-body') ],
         children: [
           s.element('p', {
             children: [ s.anything() ]
           })
         ]
       });
     }),
     contentAreaContainer
   )
 ]);
开发者ID:tinymce,项目名称:tinymce,代码行数:16,代码来源:SilverInlineEditorTest.ts

示例9: TinyUi

    (editor, onSuccess, onFailure) => {
      const tinyUi = TinyUi(editor);
      const container = Element.fromDom(editor.getContainer());

      Pipeline.async({ }, Logger.ts(
        'Check basic structure and actions',
        [
          Log.stepsAsStep('TINY-2226', 'Menu should contain a group heading with the correct classes and text', [
            Mouse.sClickOn(container, '.tox-toolbar button'),
            tinyUi.sWaitForUi('Wait for styleselect menu', '.tox-menu.tox-collection'),
            Chain.asStep(Body.body(), [
              UiFinder.cFindIn('.tox-menu.tox-collection'),
              Assertions.cAssertStructure(
                'Container structure',
                ApproxStructure.build((s, str, arr) => {
                  return s.element('div', {
                    classes: [ arr.has('tox-menu'), arr.has('tox-collection'), arr.has('tox-collection--list'), arr.has('tox-selected-menu') ],
                    children: [
                      s.element('div', {
                        classes: [ arr.has('tox-collection__group')],
                        children: [
                          s.element('div', {
                            classes: [ arr.has('tox-menu-nav__js'), arr.has('tox-collection__item') ]
                          })
                        ]
                      }),
                      s.element('div', {
                        classes: [ arr.has('tox-collection__group')],
                        children: [
                          s.element('div', {
                            classes: [ arr.has('tox-collection__item'), arr.has('tox-collection__group-heading') ],
                            children: [ s.text(str.is('Table styles')) ]
                          }),
                          s.element('div', {
                            classes: [ arr.has('tox-menu-nav__js'), arr.has('tox-collection__item') ]
                          })
                        ]
                      })
                    ]
                  });
                }),
              ),
            ])
          ])
        ]
      ), onSuccess, onFailure);
    },
开发者ID:tinymce,项目名称:tinymce,代码行数:47,代码来源:MenuGroupHeadingTest.ts

示例10: getButton

        (() => {
          const button4 = getButton('.button4-container .tox-mbtn');

          return Logger.ts('Fourth button (button4): menu button', [
            Assertions.sAssertStructure(
              'Checking initial structure',
              ApproxStructure.build((s, str, arr) => {
                return s.element('button', {
                  classes: [
                    arr.has('tox-mbtn'),
                    arr.has('tox-mbtn--select')
                  ],
                  attrs: {
                    'type': str.is('button'),
                    'title': str.is('tooltip'),
                    'aria-label': str.is('tooltip'),
                    'aria-expanded': str.is('false'),
                    'aria-haspopup': str.is('true')
                  },
                  children: [
                    s.element('span', {
                      classes: [ arr.has('tox-mbtn__select-label') ]
                    }),
                    s.element('div', {
                      classes: [ arr.has('tox-mbtn__select-chevron') ]
                    })
                  ]
                });
              }),
              button4.element()
            ),

            // Select menu item
            Mouse.sClickOn(component.element(), '.button4-container .tox-mbtn'),
            Waiter.sTryUntil('Wait for button menu to show',
              Mouse.sClickOn(body, '.tox-collection .tox-collection__item'),
              100, 1000
            ),
            store.sAssertEq('Store should have item action4', [ 'onAction.4' ]),
            store.sClear
          ]);
        })()
开发者ID:tinymce,项目名称:tinymce,代码行数:42,代码来源:ToolbarButtonsTest.ts


注:本文中的@ephox/agar.Logger.ts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。