3613bfe1af
* testsuite/playwright: copys files to storj repo This PR copies all the playwright ui tests to the storj repository. * CI: Jenkinsfile.ui Jenkinsfile.ui builds all necessary items for running storj binaries, installs all items for playwright ui tests and executes the test. Note that we aren't running regular unit tests and we are not linting the code as this is occuring in the public instance. Furthermore, we still need to implement the starting of storj services as well as typescript linters for the playwright tests. * testsuite: playwright ui tests This PR copies all playwright ui tests files from the qa repo. * testsuite: playwright ui tests This PR copies all playwright ui tests files from the qa repo.
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
// Copyright (C) 2023 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import {Block, KnownBlock} from "@slack/web-api";
|
|
import {SummaryResults} from "playwright-slack-report/dist/src";
|
|
|
|
export default function generateCustomLayoutSimpleMeta(
|
|
summaryResults: SummaryResults,
|
|
): Array<Block | KnownBlock> {
|
|
const meta: { type: string; text: { type: string; text: string; }; }[] = [];
|
|
if (summaryResults.meta) {
|
|
for (let i = 0; i < summaryResults.meta.length; i += 1) {
|
|
const {key, value} = summaryResults.meta[i];
|
|
meta.push({
|
|
type: 'section',
|
|
text: {
|
|
type: 'mrkdwn',
|
|
text: `\n*${key}* :\t${value}`,
|
|
},
|
|
});
|
|
}
|
|
}
|
|
return [
|
|
{
|
|
type: 'section',
|
|
text: {
|
|
type: 'mrkdwn',
|
|
text:
|
|
summaryResults.failed === 0
|
|
? ':tada: All tests passed!'
|
|
: `😭${summaryResults.failed} failure(s) out of ${summaryResults.tests.length} tests`,
|
|
},
|
|
},
|
|
...meta,
|
|
];
|
|
}
|