Innovenergy_trunk/frontend/node_modules/testcafe/lib/client/test-run/index.js.mustache

77 lines
3.4 KiB
Plaintext

(function () {
if (window !== window.top)
return;
var origin = location.origin;
// NOTE: location.origin doesn't exist in IE11 on Windows 10.10240 LTSB
if (!origin)
origin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
var proxyless = {{{proxyless}}};
if (proxyless)
origin = {{{domain}}};
var testRunId = {{{testRunId}}};
var browserId = {{{browserId}}};
var activeWindowId = {{{activeWindowId}}};
var selectorTimeout = {{{selectorTimeout}}};
var pageLoadTimeout = {{{pageLoadTimeout}}};
var childWindowReadyTimeout = {{{childWindowReadyTimeout}}};
var retryTestPages = {{{retryTestPages}}};
var speed = {{{speed}}};
var browserHeartbeatUrl = origin + {{{browserHeartbeatRelativeUrl}}};
var browserStatusUrl = origin + {{{browserStatusRelativeUrl}}};
var browserStatusDoneUrl = origin + {{{browserStatusDoneRelativeUrl}}};
var browserIdleUrl = origin + {{{browserIdleRelativeUrl}}};
var browserOpenFileProtocolUrl = origin + {{{browserOpenFileProtocolRelativeUrl}}};
var browserActiveWindowIdUrl = origin + {{{browserActiveWindowIdUrl}}};
var browserCloseWindowUrl = origin + {{{browserCloseWindowUrl}}};
var browserDispatchProxylessEventUrl = origin + {{{browserDispatchProxylessEventRelativeUrl}}};
var skipJsErrors = {{{skipJsErrors}}};
var dialogHandler = {{{dialogHandler}}};
var userAgent = {{{userAgent}}};
var fixtureName = {{{fixtureName}}};
var testName = {{{testName}}};
var canUseDefaultWindowActions = {{{canUseDefaultWindowActions}}};
var ClientDriver = window['%testCafeDriver%'];
var driver = new ClientDriver(testRunId,
{
heartbeat: browserHeartbeatUrl,
status: browserStatusUrl,
statusDone: browserStatusDoneUrl,
idle: browserIdleUrl,
activeWindowId: browserActiveWindowIdUrl,
closeWindow: browserCloseWindowUrl,
openFileProtocolUrl: browserOpenFileProtocolUrl,
dispatchProxylessEvent: browserDispatchProxylessEventUrl,
},
{
userAgent: userAgent,
fixtureName: fixtureName,
testName: testName,
activeWindowId: activeWindowId,
},
{
selectorTimeout: selectorTimeout,
pageLoadTimeout: pageLoadTimeout,
childWindowReadyTimeout: childWindowReadyTimeout,
skipJsErrors: skipJsErrors,
dialogHandler: dialogHandler,
retryTestPages: retryTestPages,
speed: speed,
canUseDefaultWindowActions: canUseDefaultWindowActions,
proxyless: proxyless,
}
);
Object.defineProperty(window, '%testCafeDriverInstance%', {
configurable: true,
value: driver
});
driver.start();
})();