hashicorp / boundary-ui

Monorepo for Boundary UIs and addons.
http://boundary-ui.vercel.app
Other
87 stars 28 forks source link

test: 💍 add TODO for a11y violations #2471

Closed cameronperera closed 3 weeks ago

cameronperera commented 3 weeks ago

Description

This will help address the false negative a11y violations we are seeing when tests are run in dark mode.

// TODO: Failing due to a11y violation while in dark mode.
// Investigating issue with styles not properly
// being applied during test.
const session = this.owner.lookup('service:session');
session.set('data.theme', 'light');

You will see that I have repeated the above TODO and session lookup, sometimes in the same test file more than once. This is to ensure I am only changing it for that exact test and we can easily remove it from each test as we address these issues. I was going to use QUnit's test.todo but that would be for a WIP test that we expect to fail. With the change of the theme for the specific tests, they will pass every time now so test.todo doesn't exactly work here.

How to Test

To verify that this is working, pull down these changes, change system theme to dark, and run yarn test. All test should be passing as expected.

Checklist

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 8:32pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 8:32pm
cameronperera commented 3 weeks ago

I was going to use QUnit's test.todo but that would be for a WIP test that we expect to fail. With the change of the theme for the specific tests, they will pass every time now so test.todo doesn't exactly work here.

You would just let it fail by not manually setting the theme in this case. But this also works fine

That was my original plan but technically the test are working as expected. Just the false negative from the a11yAudit so the test.todo felt incorrect here.