mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
chore: render large trace link (#9608)
This commit is contained in:
parent
bccd4c8906
commit
56d8481b87
@ -170,18 +170,16 @@ const TestResultView: React.FC<{
|
|||||||
{result.steps.map((step, i) => <StepTreeItem key={`step-${i}`} step={step} depth={0}></StepTreeItem>)}
|
{result.steps.map((step, i) => <StepTreeItem key={`step-${i}`} step={step} depth={0}></StepTreeItem>)}
|
||||||
</Chip>}
|
</Chip>}
|
||||||
|
|
||||||
{expected && actual && <div className='vbox'>
|
{expected && actual && <Chip header='Image mismatch'>
|
||||||
<Chip header='Image mismatch'>
|
<ImageDiff actual={actual} expected={expected} diff={diff}></ImageDiff>
|
||||||
<ImageDiff actual={actual} expected={expected} diff={diff}></ImageDiff>
|
<AttachmentLink key={`expected`} attachment={expected}></AttachmentLink>
|
||||||
<AttachmentLink key={`expected`} attachment={expected}></AttachmentLink>
|
<AttachmentLink key={`actual`} attachment={actual}></AttachmentLink>
|
||||||
<AttachmentLink key={`actual`} attachment={actual}></AttachmentLink>
|
{diff && <AttachmentLink key={`diff`} attachment={diff}></AttachmentLink>}
|
||||||
{diff && <AttachmentLink key={`diff`} attachment={diff}></AttachmentLink>}
|
</Chip>}
|
||||||
</Chip>
|
|
||||||
</div>}
|
|
||||||
|
|
||||||
{!!screenshots.length && <Chip header='Screenshots'>
|
{!!screenshots.length && <Chip header='Screenshots'>
|
||||||
{screenshots.map((a, i) => {
|
{screenshots.map((a, i) => {
|
||||||
return <div key={`screenshot-${i}`} className='vbox'>
|
return <div key={`screenshot-${i}`}>
|
||||||
<img src={a.path} />
|
<img src={a.path} />
|
||||||
<AttachmentLink attachment={a}></AttachmentLink>
|
<AttachmentLink attachment={a}></AttachmentLink>
|
||||||
</div>;
|
</div>;
|
||||||
@ -189,13 +187,15 @@ const TestResultView: React.FC<{
|
|||||||
</Chip>}
|
</Chip>}
|
||||||
|
|
||||||
{!!traces.length && <Chip header='Traces'>
|
{!!traces.length && <Chip header='Traces'>
|
||||||
{traces.map((a, i) => <div key={`trace-${i}`} className='vbox'>
|
{traces.map((a, i) => <div key={`trace-${i}`}>
|
||||||
<AttachmentLink attachment={a} href={`trace/index.html?trace=${window.location.origin}/` + a.path}></AttachmentLink>
|
<a href={`trace/index.html?trace=${window.location.origin}/` + a.path}>
|
||||||
|
<img src='trace.png' style={{ width: 192, height: 117, marginLeft: 20 }} />
|
||||||
|
</a>
|
||||||
</div>)}
|
</div>)}
|
||||||
</Chip>}
|
</Chip>}
|
||||||
|
|
||||||
{!!videos.length && <Chip header='Videos'>
|
{!!videos.length && <Chip header='Videos'>
|
||||||
{videos.map((a, i) => <div key={`video-${i}`} className='vbox'>
|
{videos.map((a, i) => <div key={`video-${i}`}>
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src={a.path} type={a.contentType}/>
|
<source src={a.path} type={a.contentType}/>
|
||||||
</video>
|
</video>
|
||||||
|
BIN
packages/playwright-core/src/web/htmlReport/static/trace.png
Normal file
BIN
packages/playwright-core/src/web/htmlReport/static/trace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
@ -1,5 +1,6 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
||||||
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
const mode = process.env.NODE_ENV === 'production' ? 'production' : 'development';
|
const mode = process.env.NODE_ENV === 'production' ? 'production' : 'development';
|
||||||
|
|
||||||
@ -37,6 +38,13 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new CopyPlugin({
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, 'static'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
new HtmlWebPackPlugin({
|
new HtmlWebPackPlugin({
|
||||||
title: 'Playwright Test Report',
|
title: 'Playwright Test Report',
|
||||||
template: path.join(__dirname, 'index.html'),
|
template: path.join(__dirname, 'index.html'),
|
||||||
|
Loading…
Reference in New Issue
Block a user