mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: use path as key in div (#35317)
This commit is contained in:
parent
b3d19e2f80
commit
62821516bf
@ -126,8 +126,8 @@ export const TestResultView: React.FC<{
|
||||
</AutoChip></Anchor>}
|
||||
|
||||
{!!videos.length && <Anchor id='attachment-video'><AutoChip header='Videos' revealOnAnchorId='attachment-video'>
|
||||
{videos.map((a, i) => <div key={`video-${i}`}>
|
||||
<video key={a.path} controls> {/* key is required to ensure video is updated when the path changes */}
|
||||
{videos.map(a => <div key={a.path}>
|
||||
<video controls>
|
||||
<source src={a.path} type={a.contentType}/>
|
||||
</video>
|
||||
<AttachmentLink attachment={a} result={result}></AttachmentLink>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user