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 |
thatblindgeye
left a comment
There was a problem hiding this comment.
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.
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
| }); | ||
|
|
||
| it.skip('renders the discrete slider', () => { | ||
| it('renders the discrete slider', () => { |
There was a problem hiding this comment.
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
4157e0d to
df6b745
Compare
df6b745 to
e3216dd
Compare
What: Closes #5362