Skip to content

GAUD-10289 - Add initial divider axe, unit and vdiff tests#7217

Merged
svanherk merged 5 commits into
mainfrom
GAUD-10289-Add-divider-tests
Jul 14, 2026
Merged

GAUD-10289 - Add initial divider axe, unit and vdiff tests#7217
svanherk merged 5 commits into
mainfrom
GAUD-10289-Add-divider-tests

Conversation

@svanherk

@svanherk svanherk commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Many more to come as the divider is fleshed out.

vdiff report.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7217/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

});
});

describe('focus', () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The variety of focus and focus-scrolled vdiffs is kinda pointless right now, but will eventually be important to show where the collapse button and floating arrows live in the different scenarios.

[
{ name: 'side-nav', divider: 'side-nav', fixture: pageDividerFixtures.sideNavBothHeadersFooter },
{ name: 'side-nav-immersive', divider: 'side-nav', fixture: pageDividerFixtures.sideNavImmersiveFooter },
{ name: 'side-nav-long-no-scroll', divider: 'side-nav', fixture: pageDividerFixtures.sideNavLongMainBothHeaders },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

page-divider-internal focus side-nav-long-no-scroll, page-divider-internal focus supporting, and page-divider-internal focus supporting-immersive-long-no-scroll are currently scrolled when they shouldn't be. This is because of https://desire2learn.atlassian.net/browse/GAUD-10291, and will be fixed in the next PR.

@svanherk
svanherk marked this pull request as ready for review July 14, 2026 18:44
@svanherk
svanherk requested a review from a team as a code owner July 14, 2026 18:44
Comment thread components/page/test/page-divider-internal.test.js Outdated
const currentSize = 450;
const minSize = 320;
const maxSize = 600;
const step = 20;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wonder if it's worth exporting these constants from the component so they can be shared?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I meant to ask about that - it'll come up in future tests too. I wasn't sure if we changed the step size if we'd want these tests to fail to force us to take a look, rather than self updating? But I'm not really sure what that buys us, the tests are already written in a way to adjust accordingly. I went back and forth on it, I'll update.

Comment thread components/page/page-divider-internal.js Outdated
it(test.name, async() => {
const elem = await fixture(test.fixture, { pagePadding: false, viewport: { width: 1000, height: 550 } });
await hoverElem(getDivider(elem, test.divider));
await expect(elem).to.be.golden({ margin: 0 });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess it's necessary for all of these to screenshot the whole page vs. just the divider? Just wondering if we could save some time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I thought about it, but most of the visual part of the divider worth testing is how it interacts with the page. hover could probably move out, but that's assuming we don't end up adding any additional elements to help with dragging/selecting on hover.

I tried to make sure there's not duplication - page vdiffs has no focus/hover tests for divider, and divider vdiffs don't test the default state (which is covered by page vdiffs).

I could probably make them shorter though! And a tad less wide, but not much.

@dlockhart dlockhart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@svanherk
svanherk merged commit 10c01f4 into main Jul 14, 2026
11 checks passed
@svanherk
svanherk deleted the GAUD-10289-Add-divider-tests branch July 14, 2026 21:20
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 3.271.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants