UNPKG

tia

Version:

Time is All (logs driven test engine with ExtJs support)

42 lines 1.49 kB
"use strict"; // TODO: вытащить в components. Object.defineProperty(exports, "__esModule", { value: true }); function logTitle(enableLog) { return gIn.wrap({ msg: 'Log title of message box: ', enableLog, act: () => gT.s.browser.executeScriptWrapper('return tiaEJ.msgBox.getTitle()').then(title => { gIn.logger.log(`"${title}" ... `); }), }); } exports.logTitle = logTitle; function logMsg(enableLog) { return gIn.wrap({ msg: 'Log msg of message box: ', enableLog, act: () => gT.s.browser.executeScriptWrapper('return tiaEJ.msgBox.getMsg()').then(msg => { gIn.logger.log(`"${msg}" ... `, enableLog); }), }); } exports.logMsg = logMsg; function logContent(enableLog) { return gIn.wrap({ msg: 'Log content of message box ... ', enableLog, act: () => gT.s.browser.executeScriptWrapper('return tiaEJ.msgBox.getContent()').then(content => { gIn.logger.log(`\n${gT.commonConsts.content.wrap(`${content}\n`)}`, enableLog); }), }); } exports.logContent = logContent; function getButtonIdByItemId(itemId, enableLog) { return gIn.wrap({ msg: `Get message box button id for itemId: ${itemId} ... `, enableLog, act: () => gT.s.browser.executeScriptWrapper(`return tiaEJ.msgBox.getButtonIdByItemId('${itemId}')`), }); } exports.getButtonIdByItemId = getButtonIdByItemId; //# sourceMappingURL=extjs-msgbox.js.map