Skip to content

Yush/233-testing-videohighlightCard - #248

Merged
yrska merged 1 commit into
mainfrom
yush-videohighlight-test
Jul 23, 2026
Merged

Yush/233-testing-videohighlightCard#248
yrska merged 1 commit into
mainfrom
yush-videohighlight-test

Conversation

@DeletedUser9

Copy link
Copy Markdown
Contributor

closes #233

🌟 Context

I made a videhighlights test file that checks whether the VideoHighlightCard component is rendering content correctly

image

📝 Description

  • Renders the grey placeholder
    when no url prop is provided
  • Renders an <iframe> when a valid YouTube URL is passed
  • Renders an <iframe> when a valid Vimeo URL is passed
  • <iframe> has the allowFullScreen attribute
  • <iframe> has a non-empty title attribute
  • Does not render an <iframe> when the URL is an empty string

📋 Notes

Right now the testing folder is within the components folder let me know if you want it relocated

@yrska yrska left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing explicit test for unsupported but valid URL You test "not a url" and "", but not something like:

https://example.com/video/123 This catches “valid URL, unsupported provider” behavior and is often a real-world edge case.

@yrska

yrska commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

const placeholder = container.querySelector('div') is also brittle, better to add a data-testid if possible!

@yrska yrska closed this Jul 23, 2026
@yrska yrska reopened this Jul 23, 2026
@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is live: Preview Link

@yrska
yrska enabled auto-merge (squash) July 23, 2026 11:09
@yrska
yrska merged commit d06c5d2 into main Jul 23, 2026
15 of 17 checks passed
@yrska
yrska deleted the yush-videohighlight-test branch July 23, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FRONTEND] Tests — VideoHighlightCard component

2 participants