-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
cy.clickToggle("sections-toggle", false, "log-viewing"); | ||
cy.dataCy("section-header").should("not.exist"); | ||
}); | ||
it("Clicking 'Open all subsections' opens all subsections", () => { |
There was a problem hiding this comment.
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", () => { |
There was a problem hiding this comment.
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 😁
}); | ||
it("Toggling the sections options displays and hides sections", () => { |
There was a problem hiding this comment.
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`} |
There was a problem hiding this comment.
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
aria-label={`Click to ${open ? "close" : "open"} section`} | |
aria-label={`${open ? "Close" : "Open"} section`} |
DEVPROD-8016
These code changes add Cypress for Sectioning.