-
Notifications
You must be signed in to change notification settings - Fork 357
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
chore(Slider) update integration tests #10520
chore(Slider) update integration tests #10520
Conversation
Preview: https://patternfly-react-pr-10520.surge.sh A11y report: https://patternfly-react-pr-10520-a11y.surge.sh |
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.
Couple comments below merge conflict.
Could we add tests for moving the slider via keyboard as well? E.g. when the thumb has focus, Left Arrow should decrease the value by however much and Right Arrow should increase it.
cy.get('#discrete-slider') | ||
.invoke('attr', 'style') | ||
.should('be.oneOf', [ |
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.
Not a blocker, but wondering if we'd ever run into a situation where the amount of whitespace is more than the array of strings here. If we ever did we may want to consider using the match
assertion in Cypress with a regex instead of having to potentially keep adding to this array
@@ -3,43 3,114 @@ describe('Slider Demo Test', () => { | |||
cy.visit('http://localhost:3000/slider-demo-nav-link'); | |||
}); | |||
|
|||
it.skip('renders the discrete slider', () => { | |||
it('renders the discrete slider', () => { |
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.
Sort of feel like these "Renders the X slider" tests should be unit tests instead and omitted here.
If the point of these tests is to have a baseline value for the styles, I think we could just move the lines that do that to the "changes value when dragged" tests instead. E.g. first check that the slider style values are X, trigger the drag events, then check that the slider styles values are Y.
67da79e
to
4157e0d
Compare
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.
Just needs a rebase but otherwise 🔥
4157e0d
to
df6b745
Compare
df6b745
to
e3216dd
Compare
What: Closes #5362