Skip to content

Commit

Permalink
chore: modify test command
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushaw committed Jul 28, 2024
1 parent 56ab761 commit 47e9d6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/web-integration/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ export default defineConfig({
use: { ...devices['Desktop Chrome'] },
},
],
reporter: './dist/es/playwright-report.js',
reporter: './src/playwright/reporter/index.ts',
});
7 changes: 5 additions & 2 deletions packages/web-integration/src/playwright/reporter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { generateTestData } from './util';
const testDataList: Array<TestData> = [];

function logger(...message: any[]) {
console.log('Midscene e2e report:', ...message);
if (process.env.DEBUG === 'true') {
console.log('Midscene e2e report:', ...message);
}
}

class MidSceneReporter implements Reporter {
Expand Down Expand Up @@ -51,7 +53,8 @@ class MidSceneReporter implements Reporter {
onEnd(result: FullResult) {
logger(`Finished the run: ${result.status}`);
generateTestData(testDataList);
logger(
console.log(
'\x1b[32m%s\x1b[0m',
`The report is generated successfully. Run the "node ./midscene-report/index.js" command to start the report`,
);
}
Expand Down

0 comments on commit 47e9d6d

Please sign in to comment.