Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Conversation

@Pokesi
Copy link
Contributor

@Pokesi Pokesi commented Jan 29, 2023

Add tests for interactive components using the react testing library

@Pokesi
Copy link
Contributor Author

Pokesi commented Jan 29, 2023

why cant i just use container methods 😭

@Pokesi Pokesi requested a review from auscompgeek January 29, 2023 05:31
@Pokesi Pokesi requested a review from auscompgeek January 29, 2023 05:45
return (
<div
className="coneOrCube"
role="none"
Copy link
Member

Choose a reason for hiding this comment

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

Isn't none the default role for a <div>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESLint complained about it - but maybe i had something there before

Copy link
Contributor Author

@Pokesi Pokesi Jan 29, 2023

Choose a reason for hiding this comment

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

the tests dont passif the role isnt defined as none

Copy link
Member

Choose a reason for hiding this comment

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

Well, we shouldn't be setting the ARIA role to none anyway. It sounds like your tests are abusing the ARIA role to select this element. Maybe find a different selector? You have a class name on this after all...

@Pokesi Pokesi requested a review from auscompgeek January 29, 2023 06:06
Copy link
Member

@auscompgeek auscompgeek left a comment

Choose a reason for hiding this comment

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

Also, what is this tests.txt?

return (
<div
className="coneOrCube"
role="none"
Copy link
Member

Choose a reason for hiding this comment

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

Well, we shouldn't be setting the ARIA role to none anyway. It sounds like your tests are abusing the ARIA role to select this element. Maybe find a different selector? You have a class name on this after all...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants