@lokalise/playwright-reporters 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,4 +33,8 @@ export type ReporterOptions = {
|
|
|
33
33
|
currentBuildId: string;
|
|
34
34
|
prenvId: string;
|
|
35
35
|
product: 'autopilot' | 'expert';
|
|
36
|
+
/**
|
|
37
|
+
* @description Ignores these test projects in the collected browser usage data.
|
|
38
|
+
*/
|
|
39
|
+
ignoreProjects?: string[];
|
|
36
40
|
} & ElasticConfig;
|
|
@@ -28,9 +28,10 @@ class AnalyticsReporter {
|
|
|
28
28
|
this.elastic = new elastic_1.Elastic(options);
|
|
29
29
|
}
|
|
30
30
|
shouldSaveBrowserData(test) {
|
|
31
|
-
const
|
|
31
|
+
const testProjectName = test?.parent?.project()?.name;
|
|
32
|
+
const isIgnoredProject = this.options.ignoreProjects?.some((project) => testProjectName?.includes(project));
|
|
32
33
|
const isIndexProvided = this.options.browserUsageIndex !== undefined;
|
|
33
|
-
return !
|
|
34
|
+
return !isIgnoredProject && isIndexProvided;
|
|
34
35
|
}
|
|
35
36
|
async onBegin(config, suite) {
|
|
36
37
|
try {
|
|
@@ -184,7 +185,8 @@ class AnalyticsReporter {
|
|
|
184
185
|
if (!this.options.dryRun) {
|
|
185
186
|
await this.elastic.saveBuildData(buildData);
|
|
186
187
|
if (browserUsageData.browserUsageAfterCreation > 0 &&
|
|
187
|
-
browserUsageData.browserUsageFromRequest > 0
|
|
188
|
+
browserUsageData.browserUsageFromRequest > 0 &&
|
|
189
|
+
browserUsageData.createdBrowserCount > 0) {
|
|
188
190
|
await this.elastic.saveBrowserUsageData(browserUsageData);
|
|
189
191
|
}
|
|
190
192
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/playwright-reporters",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"lint:eslint": "eslint --cache . --ext .js,.cjs,.ts",
|
|
6
6
|
"lint:ts": "tsc --noEmit",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@commitlint/cli": "19.0
|
|
39
|
-
"@commitlint/config-conventional": "19.0
|
|
40
|
-
"@commitlint/prompt-cli": "19.0
|
|
38
|
+
"@commitlint/cli": "19.1.0",
|
|
39
|
+
"@commitlint/config-conventional": "19.1.0",
|
|
40
|
+
"@commitlint/prompt-cli": "19.1.0",
|
|
41
41
|
"@lokalise/eslint-config-frontend": "^4.3.2",
|
|
42
42
|
"@lokalise/prettier-config": "^1.0.0",
|
|
43
43
|
"@semantic-release/changelog": "6.0.3",
|
|
44
44
|
"@semantic-release/commit-analyzer": "11.1.0",
|
|
45
45
|
"@semantic-release/git": "10.0.1",
|
|
46
|
-
"@semantic-release/github": "
|
|
46
|
+
"@semantic-release/github": "10.0.2",
|
|
47
47
|
"@semantic-release/npm": "11.0.3",
|
|
48
48
|
"@semantic-release/release-notes-generator": "12.1.0",
|
|
49
|
-
"@types/lodash": "^4.
|
|
50
|
-
"@types/node": "^20.11.
|
|
49
|
+
"@types/lodash": "^4.17.0",
|
|
50
|
+
"@types/node": "^20.11.27",
|
|
51
51
|
"eslint-config-prettier": "^9.1.0",
|
|
52
52
|
"eslint-plugin-prettier": "^5.1.3",
|
|
53
53
|
"husky": "9.0.11",
|