mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
b1fbf4b683
Continuation of #6644 Now chromium browser is used in workspaces tests instead of firefox and screenshots after each test are properly saved in one folder when run from IDE and from terminal using `yarn test:e2e` command
34 lines
788 B
TypeScript
34 lines
788 B
TypeScript
import {
|
|
Reporter,
|
|
FullConfig,
|
|
Suite,
|
|
TestCase,
|
|
TestResult,
|
|
FullResult,
|
|
} from '@playwright/test/reporter';
|
|
|
|
class CustomReporter implements Reporter {
|
|
constructor(options: { customOption?: string } = {}) {
|
|
console.log(
|
|
`my-awesome-reporter setup with customOption set to ${options.customOption}`,
|
|
);
|
|
}
|
|
|
|
onBegin(config: FullConfig, suite: Suite) {
|
|
console.log(`Starting the run with ${suite.allTests().length} tests`);
|
|
}
|
|
|
|
onTestBegin(test: TestCase) {
|
|
console.log(`Starting test ${test.title}`);
|
|
}
|
|
|
|
onTestEnd(test: TestCase, result: TestResult) {
|
|
console.log(`Finished test ${test.title}: ${result.status}`);
|
|
}
|
|
|
|
onEnd(result: FullResult) {
|
|
console.log(`Finished the run: ${result.status}`);
|
|
}
|
|
}
|
|
export default CustomReporter;
|