本文整理汇总了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);
}, {
示例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);
}, {
示例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);
}, {
示例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'
}
});
};
示例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);
}, {
示例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);
}, {
示例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)
]));
};
示例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);
},
示例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);
}, {