请求记录器
在主测试控制器之外进行此测试,使用页面模型和此配方。
/**
Used to get the periodic analytic id.
Whenever we are viewing an asset, the server must respond with an id.
This id is later used by the client, to send periodic analytics.
@param {object} t Testcafe's test controller
@param {object} logger A testcafe's RequestLogger.
@returns {string} Returns the periodic analytic id.
*/
async getPeriodicAnalyticId(t, logger) {
const logPrefix = 'Get periodic analytic id > ';
let responseBody;
await t
.expect(logger.requests.length).gt(0, logPrefix + 'No …
Run Code Online (Sandbox Code Playgroud)