diff --git a/packages/playwright-core/src/web/htmlReport/htmlReport.tsx b/packages/playwright-core/src/web/htmlReport/htmlReport.tsx index 6bc97920b9..6b8917e063 100644 --- a/packages/playwright-core/src/web/htmlReport/htmlReport.tsx +++ b/packages/playwright-core/src/web/htmlReport/htmlReport.tsx @@ -170,18 +170,16 @@ const TestResultView: React.FC<{ {result.steps.map((step, i) => )} } - {expected && actual &&
- - - - - {diff && } - -
} + {expected && actual && + + + + {diff && } + } {!!screenshots.length && {screenshots.map((a, i) => { - return
+ return
; @@ -189,13 +187,15 @@ const TestResultView: React.FC<{ } {!!traces.length && - {traces.map((a, i) =>
- + {traces.map((a, i) =>
+ + +
)} } {!!videos.length && - {videos.map((a, i) =>
+ {videos.map((a, i) =>
diff --git a/packages/playwright-core/src/web/htmlReport/static/trace.png b/packages/playwright-core/src/web/htmlReport/static/trace.png new file mode 100644 index 0000000000..596337f87a Binary files /dev/null and b/packages/playwright-core/src/web/htmlReport/static/trace.png differ diff --git a/packages/playwright-core/src/web/htmlReport/webpack.config.js b/packages/playwright-core/src/web/htmlReport/webpack.config.js index 4aa171a150..6335c366ed 100644 --- a/packages/playwright-core/src/web/htmlReport/webpack.config.js +++ b/packages/playwright-core/src/web/htmlReport/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const HtmlWebPackPlugin = require('html-webpack-plugin'); +const CopyPlugin = require('copy-webpack-plugin'); const mode = process.env.NODE_ENV === 'production' ? 'production' : 'development'; @@ -37,6 +38,13 @@ module.exports = { ] }, plugins: [ + new CopyPlugin({ + patterns: [ + { + from: path.resolve(__dirname, 'static'), + }, + ], + }), new HtmlWebPackPlugin({ title: 'Playwright Test Report', template: path.join(__dirname, 'index.html'),