Remove HTML/Slack data on remove.url (#3174)

This commit is contained in:
Peter Hedenskog 2020-11-01 17:19:00 +01:00 committed by GitHub
parent ab57bcdab1
commit 9c3afa5fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class DataCollector {
this.summaryPages = {};
this.browsertimeScreenshots = false;
this.errors = {};
this.removedUrls = {};
}
_addUrl(url) {
@ -25,6 +26,12 @@ class DataCollector {
}
}
_removeUrl(url) {
this.removedUrls[url] = 1;
delete this.urlRunPages[url];
delete this.urlPages[url];
}
getSummary(name) {
return this.summaryPages[name];
}

View File

@ -105,6 +105,11 @@ module.exports = {
break;
}
case 'remove.url': {
dataCollector.removeUrl(message.url);
break;
}
case 'aggregateassets.summary': {
if (message.group === 'total') {
const assetList = reduce(

View File

@ -23,6 +23,12 @@ class DataCollector {
}
}
_removeUrl(url) {
this.removedUrls[url] = 1;
delete this.urlRunPages[url];
delete this.urlPages[url];
}
getSummary() {
return this.summaryPage;
}

View File

@ -172,6 +172,11 @@ module.exports = {
break;
}
case 'remove.url': {
dataCollector.removeUrl(message.url);
break;
}
case 'html.finished': {
const provider = staticPagesProvider(this.options);
if (!provider) {