Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some simple initial tests for MediaView #2813

Open
wants to merge 7 commits into
base: livekit
Choose a base branch
from

Conversation

hughns
Copy link
Member

@hughns hughns commented Nov 20, 2024

The purpose of moving videoMuted from CSS class to inline style is to make it more testable. I'm open to a more elegant way!

src/tile/MediaView.test.tsx Outdated Show resolved Hide resolved
@hughns
Copy link
Member Author

hughns commented Nov 21, 2024

I have tried to make the intent of each test case clearer in the latest commit by factoring out the common base props for each test case.

Comment on lines +55 to +56
expect(screen.queryByTestId("video")).toBeNull();
expect(screen.getByTestId("avatar")).not.toBeVisible();
Copy link
Member

Choose a reason for hiding this comment

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

Can we use role-based queries for these rather than test IDs?

</TooltipProvider>,
);
expect(await axe(container)).toHaveNoViolations();
expect(screen.getByTestId("unencrypted_warning_icon")).toBeTruthy();
Copy link
Member

Choose a reason for hiding this comment

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

Could also use a role or label query here

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.

3 participants