From 2def9bb0985a650e545d1e440ea41dfe23dbc8cd Mon Sep 17 00:00:00 2001 From: Anudeep Date: Wed, 21 Aug 2024 17:33:37 +0530 Subject: [PATCH] fix: test results parser to specific version --- package-lock.json | 6 +++--- package.json | 4 ++-- src/extensions/error-clusters.extension.js | 4 +--- test/mocks/teams.mock.js | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9636089..e5f0652 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "testbeats", - "version": "2.0.9", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "testbeats", - "version": "2.0.9", + "version": "2.1.0", "license": "ISC", "dependencies": { "async-retry": "^1.3.3", @@ -18,7 +18,7 @@ "pretty-ms": "^7.0.1", "rosters": "0.0.1", "sade": "^1.8.1", - "test-results-parser": "latest" + "test-results-parser": "0.2.3" }, "bin": { "testbeats": "src/cli.js" diff --git a/package.json b/package.json index 237ea74..62e304f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "testbeats", - "version": "2.0.9", + "version": "2.1.0", "description": "Publish test results to Microsoft Teams, Google Chat, Slack and InfluxDB", "main": "src/index.js", "types": "./src/index.d.ts", @@ -55,7 +55,7 @@ "pretty-ms": "^7.0.1", "rosters": "0.0.1", "sade": "^1.8.1", - "test-results-parser": "latest" + "test-results-parser": "0.2.3" }, "devDependencies": { "c8": "^7.12.0", diff --git a/src/extensions/error-clusters.extension.js b/src/extensions/error-clusters.extension.js index 8acb4eb..5bec801 100644 --- a/src/extensions/error-clusters.extension.js +++ b/src/extensions/error-clusters.extension.js @@ -33,11 +33,9 @@ class ErrorClustersExtension extends BaseExtension { const clusters = data; - this.extension.inputs.title = `Top ${clusters.length} Errors`; - const texts = []; for (const cluster of clusters) { - texts.push(`${this.bold(`(${cluster.count})`)} - ${cluster.failure}`); + texts.push(`${cluster.failure} - ${this.bold(`(x${cluster.count})`)}`); } this.text = this.mergeTexts(texts); } diff --git a/test/mocks/teams.mock.js b/test/mocks/teams.mock.js index c29d3fd..a2c41e1 100644 --- a/test/mocks/teams.mock.js +++ b/test/mocks/teams.mock.js @@ -1709,7 +1709,7 @@ addInteractionHandler('post test-summary with beats to teams with error clusters }, { "type": "TextBlock", - "text": "Top 2 Errors", + "text": "Top Errors", "isSubtle": true, "weight": "bolder", "separator": true, @@ -1717,7 +1717,7 @@ addInteractionHandler('post test-summary with beats to teams with error clusters }, { "type": "TextBlock", - "text": "**(2)** - failure two\n\n**(1)** - failure one", + "text": "failure two - **(x2)**\n\nfailure one - **(x1)**", "wrap": true } ],