playwright-slack-report-burak 1.3.6 → 1.3.7
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.
- package/dist/src/LayoutGenerator.js +21 -22
- package/dist/src/SlackReporter.js +33 -31
- package/package.json +1 -1
|
@@ -144,30 +144,29 @@ const generateAllRunSuites = async (summaryResults) => {
|
|
|
144
144
|
allSuitesTitle[0] = '*Suites Run:*\n';
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
// Push data into array to create the "List of
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`${allSuitesTitle}${[...new Set(allSuites)].map((value, index) => `*${index + 1}.* ${value}`).join('\n')}`
|
|
155
|
-
},
|
|
147
|
+
// Push data into array to create the "List of All Run Test Suites"
|
|
148
|
+
suitesResults.push({
|
|
149
|
+
type: 'section',
|
|
150
|
+
text: {
|
|
151
|
+
type: 'mrkdwn',
|
|
152
|
+
text:
|
|
153
|
+
`${allSuitesTitle}${[...new Set(allSuites)].map((value, index) => `*${index + 1}.* ${value}`).join('\n')}`
|
|
156
154
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
type: 'divider',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'section',
|
|
158
|
+
text: {
|
|
159
|
+
type: 'mrkdwn',
|
|
160
|
+
text: ` `,
|
|
166
161
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'divider',
|
|
165
|
+
},
|
|
166
|
+
)
|
|
167
|
+
return [
|
|
168
|
+
...suitesResults,
|
|
169
|
+
];
|
|
171
170
|
};
|
|
172
171
|
|
|
173
172
|
const generateProblemSuiteList = async (summaryResults) => {
|
|
@@ -111,8 +111,8 @@ class SlackReporter {
|
|
|
111
111
|
});
|
|
112
112
|
// eslint-disable-next-line no-console
|
|
113
113
|
console.log(JSON.stringify(result, null, 2));
|
|
114
|
-
if (this.showInThread
|
|
115
|
-
|
|
114
|
+
if (this.showInThread) {
|
|
115
|
+
/*for (let i = 0; i < result.length; i += 1) {
|
|
116
116
|
// eslint-disable-next-line no-await-in-loop
|
|
117
117
|
await slackClient.attachDetailsToThread({
|
|
118
118
|
channelIds: [result[i].channel],
|
|
@@ -120,7 +120,7 @@ class SlackReporter {
|
|
|
120
120
|
summaryResults: resultSummary,
|
|
121
121
|
maxNumberOfFailures: this.maxNumberOfFailuresToShow,
|
|
122
122
|
});
|
|
123
|
-
}*/
|
|
123
|
+
}*/
|
|
124
124
|
for (let i = 0; i < result.length; i += 1) {
|
|
125
125
|
// eslint-disable-next-line no-await-in-loop
|
|
126
126
|
await slackClient.attachDetailsToThreadRuns({
|
|
@@ -131,35 +131,37 @@ class SlackReporter {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
if ((resultSummary.failures.length > 0 || resultSummary.skipped > 0 || resultSummary.flaky > 0)) {
|
|
135
|
+
for (let i = 0; i < result.length; i += 1) {
|
|
136
|
+
// eslint-disable-next-line no-await-in-loop
|
|
137
|
+
await slackClient.attachDetailsToThreadSuites({
|
|
138
|
+
channelIds: [result[i].channel],
|
|
139
|
+
ts: result[i].ts,
|
|
140
|
+
summaryResults: resultSummary,
|
|
141
|
+
maxNumberOfFailures: this.maxNumberOfFailuresToShow,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
145
|
+
for (let i = 0; i < result.length; i += 1) {
|
|
146
|
+
// eslint-disable-next-line no-await-in-loop
|
|
147
|
+
await slackClient.attachDetailsToThreadCases({
|
|
148
|
+
channelIds: [result[i].channel],
|
|
149
|
+
ts: result[i].ts,
|
|
150
|
+
summaryResults: resultSummary,
|
|
151
|
+
maxNumberOfFailures: this.maxNumberOfFailuresToShow,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
for (let i = 0; i < result.length; i += 1) {
|
|
156
|
+
// eslint-disable-next-line no-await-in-loop
|
|
157
|
+
await slackClient.attachDetailsToThreadReasons({
|
|
158
|
+
channelIds: [result[i].channel],
|
|
159
|
+
ts: result[i].ts,
|
|
160
|
+
summaryResults: resultSummary,
|
|
161
|
+
maxNumberOfFailures: this.maxNumberOfFailuresToShow,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
}
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint-fix": "npx eslint . --ext .ts --fix"
|
|
31
31
|
},
|
|
32
32
|
"name": "playwright-slack-report-burak",
|
|
33
|
-
"version": "1.3.
|
|
33
|
+
"version": "1.3.7",
|
|
34
34
|
"main": "index.js",
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",
|