Write more data to the extra json file. (#3307)
This commit is contained in:
parent
87bd01de15
commit
28d409393a
|
|
@ -60,14 +60,14 @@ module.exports = {
|
|||
'/' +
|
||||
name +
|
||||
'.' +
|
||||
this.options.browser +
|
||||
options.browser +
|
||||
'.' +
|
||||
connectivity +
|
||||
'.' +
|
||||
this.screenshotType
|
||||
);
|
||||
}
|
||||
if (this.options.browsertime && this.options.browsertime.video) {
|
||||
if (options.browsertime && options.browsertime.video) {
|
||||
const videoFullPath = path.join(baseDir, message.data.video);
|
||||
|
||||
await this.storageManager.copyFileToDir(
|
||||
|
|
@ -76,28 +76,38 @@ module.exports = {
|
|||
'/' +
|
||||
name +
|
||||
'.' +
|
||||
this.options.browser +
|
||||
options.browser +
|
||||
'.' +
|
||||
connectivity +
|
||||
'.mp4'
|
||||
);
|
||||
}
|
||||
|
||||
// Also store a JSON with data that we can use later
|
||||
const json = {
|
||||
url: message.url,
|
||||
alias: this.alias[message.url],
|
||||
timestamp: message.data.timestamp
|
||||
timestamp: message.data.timestamp,
|
||||
iterations: options.browsertime.iterations
|
||||
};
|
||||
|
||||
if (message.data.title) {
|
||||
json.title = message.data.title;
|
||||
}
|
||||
|
||||
if (message.data.description) {
|
||||
json.description = message.data.description;
|
||||
}
|
||||
|
||||
if (message.data.android) {
|
||||
json.android = {};
|
||||
json.android.model = message.data.android.model;
|
||||
json.android.androidVersion = message.data.android.androidVersion;
|
||||
}
|
||||
|
||||
const data = JSON.stringify(json, null, 0);
|
||||
return this.storageManager.writeDataToDir(
|
||||
data,
|
||||
name + '.' + this.options.browser + '.' + connectivity + '.json',
|
||||
name + '.' + options.browser + '.' + connectivity + '.json',
|
||||
newPath
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue