E2E tests (#6717)
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
This commit is contained in:
33
packages/twenty-e2e-testing/config/customreporter.ts
Normal file
33
packages/twenty-e2e-testing/config/customreporter.ts
Normal file
@ -0,0 +1,33 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user