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

DEVPROD-8016: E2E tests for Sectioning #416

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

SupaJoon
Copy link
Contributor

DEVPROD-8016

These code changes add Cypress for Sectioning.

@SupaJoon SupaJoon requested a review from a team as a code owner September 30, 2024 15:48
cy.clickToggle("sections-toggle", false, "log-viewing");
cy.dataCy("section-header").should("not.exist");
});
it("Clicking 'Open all subsections' opens all subsections", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This checks that the button updates, can we check the sections themselves are open?

"Click to open section",
);
});
it("Clicking 'Close all subsections' opens all subsections", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above but opposite 😁

Comment on lines 5 to 6
});
it("Toggling the sections options displays and hides sections", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nit but I do appreciate when there are newlines between test blocks for scannability

@@ -12,7 +12,7 @@ interface Props {
}
const CaretToggle: React.FC<Props> = ({ onClick, open }) => (
<IconButton
aria-label="Click to open or close section"
aria-label={`Click to ${open ? "close" : "open"} section`}
Copy link
Contributor

@sophstad sophstad Oct 1, 2024

Choose a reason for hiding this comment

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

I believe aria-label attributes should omit the interaction instructions

Suggested change
aria-label={`Click to ${open ? "close" : "open"} section`}
aria-label={`${open ? "Close" : "Open"} section`}

@SupaJoon SupaJoon requested a review from sophstad October 2, 2024 19:32
@SupaJoon SupaJoon merged commit 5cf2821 into evergreen-ci:main Oct 3, 2024
4 checks passed
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