playwright-slack-report 1.1.1 → 1.1.3
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.d.ts +4 -4
- package/dist/src/LayoutGenerator.js +68 -68
- package/dist/src/ResultsParser.d.ts +50 -46
- package/dist/src/ResultsParser.js +125 -118
- package/dist/src/SlackClient.d.ts +26 -26
- package/dist/src/SlackClient.js +62 -62
- package/dist/src/SlackReporter.d.ts +23 -23
- package/dist/src/SlackReporter.js +115 -114
- package/dist/src/custom_block/my_block.d.ts +4 -4
- package/dist/src/custom_block/my_block.js +86 -86
- package/dist/src/custom_block/simple.d.ts +3 -3
- package/dist/src/custom_block/simple.js +16 -16
- package/dist/src/custom_block/simple_with_meta.d.ts +3 -3
- package/dist/src/custom_block/simple_with_meta.js +30 -30
- package/dist/src/index.d.ts +32 -32
- package/dist/src/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function generateCustomLayoutSimpleMeta(summaryResults) {
|
|
4
|
-
const meta = [];
|
|
5
|
-
if (summaryResults.meta) {
|
|
6
|
-
for (let i = 0; i < summaryResults.meta.length; i += 1) {
|
|
7
|
-
const { key, value } = summaryResults.meta[i];
|
|
8
|
-
meta.push({
|
|
9
|
-
type: 'section',
|
|
10
|
-
text: {
|
|
11
|
-
type: 'mrkdwn',
|
|
12
|
-
text: `\n*${key}* :\t${value}`,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
type: 'section',
|
|
20
|
-
text: {
|
|
21
|
-
type: 'mrkdwn',
|
|
22
|
-
text: summaryResults.failed === 0
|
|
23
|
-
? ':tada: All tests passed!'
|
|
24
|
-
: `😭${summaryResults.failed} failure(s) out of ${summaryResults.tests.length} tests`,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
...meta,
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
exports.default = generateCustomLayoutSimpleMeta;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function generateCustomLayoutSimpleMeta(summaryResults) {
|
|
4
|
+
const meta = [];
|
|
5
|
+
if (summaryResults.meta) {
|
|
6
|
+
for (let i = 0; i < summaryResults.meta.length; i += 1) {
|
|
7
|
+
const { key, value } = summaryResults.meta[i];
|
|
8
|
+
meta.push({
|
|
9
|
+
type: 'section',
|
|
10
|
+
text: {
|
|
11
|
+
type: 'mrkdwn',
|
|
12
|
+
text: `\n*${key}* :\t${value}`,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
type: 'section',
|
|
20
|
+
text: {
|
|
21
|
+
type: 'mrkdwn',
|
|
22
|
+
text: summaryResults.failed === 0
|
|
23
|
+
? ':tada: All tests passed!'
|
|
24
|
+
: `😭${summaryResults.failed} failure(s) out of ${summaryResults.tests.length} tests`,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
...meta,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
exports.default = generateCustomLayoutSimpleMeta;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export declare type SummaryResults = {
|
|
3
|
-
passed: number;
|
|
4
|
-
failed: number;
|
|
5
|
-
skipped: number;
|
|
6
|
-
failures: Array<failure>;
|
|
7
|
-
meta?: Array<{
|
|
8
|
-
key: string;
|
|
9
|
-
value: string;
|
|
10
|
-
}>;
|
|
11
|
-
tests: Array<{
|
|
12
|
-
suiteName: string;
|
|
13
|
-
name: string;
|
|
14
|
-
browser?: string;
|
|
15
|
-
projectName?: string;
|
|
16
|
-
endedAt: string;
|
|
17
|
-
reason: string;
|
|
18
|
-
retry: number;
|
|
19
|
-
startedAt: string;
|
|
20
|
-
status: 'passed' | 'failed' | 'timedOut' | 'skipped';
|
|
21
|
-
attachments?: {
|
|
22
|
-
body: string | undefined | Buffer;
|
|
23
|
-
contentType: string;
|
|
24
|
-
name: string;
|
|
25
|
-
path: string;
|
|
26
|
-
}[];
|
|
27
|
-
}>;
|
|
28
|
-
};
|
|
29
|
-
export declare type failure = {
|
|
30
|
-
test: string;
|
|
31
|
-
failureReason: string;
|
|
32
|
-
};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare type SummaryResults = {
|
|
3
|
+
passed: number;
|
|
4
|
+
failed: number;
|
|
5
|
+
skipped: number;
|
|
6
|
+
failures: Array<failure>;
|
|
7
|
+
meta?: Array<{
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}>;
|
|
11
|
+
tests: Array<{
|
|
12
|
+
suiteName: string;
|
|
13
|
+
name: string;
|
|
14
|
+
browser?: string;
|
|
15
|
+
projectName?: string;
|
|
16
|
+
endedAt: string;
|
|
17
|
+
reason: string;
|
|
18
|
+
retry: number;
|
|
19
|
+
startedAt: string;
|
|
20
|
+
status: 'passed' | 'failed' | 'timedOut' | 'skipped';
|
|
21
|
+
attachments?: {
|
|
22
|
+
body: string | undefined | Buffer;
|
|
23
|
+
contentType: string;
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
}[];
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
export declare type failure = {
|
|
30
|
+
test: string;
|
|
31
|
+
failureReason: string;
|
|
32
|
+
};
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED