-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(accessibility-checker): update to
versioned
ruleArchive (#17351)
* test(accessibility-checker): update to versioned ruleset * chore(accessibility-checker): update to 3.1.75 * chore(accessibility-checker): update to 3.1.75 * fix(inputprops): remove autoComplete property * chore(deps): update to latest accessibility-checker * add dep cache * revert unintended file changes * revert unintended file changes * chore: yarn dedupe * chore: update accessibility-checker to 3.1.77 * chore: fix a11y violations * chore: wip * fix: updated test, snapshots, yarn format * chore: yarn format * test: updated tests to match ariaLabelText * chore(accessibility-checker): update to 3.1.78 * chore: adds cache * refactor: added rules to denylist * refactor: added rules to denylist * chore: yarn dedupe * chore: nx cache * chore: removes .nx/cache files * test: adds tests for SliderSkeleton * refactor: revert scss change --------- Co-authored-by: Nikhil Tomar <[email protected]> Co-authored-by: Nikhil Tomar <[email protected]>
- Loading branch information
1 parent
181f38f
commit 812d029
Showing
54 changed files
with
339 additions
and
249 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.7 MB
.yarn/cache/@esbuild-openbsd-arm64-npm-0.24.0-1b1265740e-11948aba46.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+2.62 KB
...bals-npm-28.1.3-fee1b2ab3f-3504bb23de.zip → ...bals-npm-28.1.0-6e373647d7-dce822edd1.zip
Binary file not shown.
Binary file renamed
BIN
+3.86 KB
...-map-npm-28.1.2-c3d608514f-b82a5c2e93.zip → ...-map-npm-28.0.2-f9db611cdd-427195be85.zip
Binary file not shown.
Binary file removed
BIN
-294 KB
.yarn/cache/accessibility-checker-npm-3.1.74-f3e8b4bb42-822bac1917.zip
Binary file not shown.
Binary file added
BIN
+333 KB
.yarn/cache/accessibility-checker-npm-3.1.78-ac0f96fd8d-04453a96b5.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/react/src/components/Slider/__test__/SliderSkeleton-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import SliderSkeleton from '../Slider.Skeleton'; | ||
|
||
describe('SliderSkeleton', () => { | ||
describe('behaves as expected - Component API', () => { | ||
it('should apply the expected classes', () => { | ||
const { container } = render(<SliderSkeleton />); | ||
expect(container.firstChild.firstChild).toHaveClass( | ||
'cds--label cds--skeleton' | ||
); | ||
}); | ||
|
||
it('should pass custom class via className', () => { | ||
const customSliderClass = 'slider-custom-class'; | ||
const { container } = render( | ||
<SliderSkeleton twoHandles={true} className={customSliderClass} /> | ||
); | ||
expect(container.firstChild).toHaveClass(customSliderClass); | ||
}); | ||
|
||
it('renders without label when hideLabel is true', () => { | ||
const { container } = render(<SliderSkeleton hideLabel={true} />); | ||
const label = container.querySelector('.cds--label.cds--skeleton'); | ||
expect(label).not.toBeInTheDocument(); | ||
}); | ||
|
||
describe('Accessibility labels', () => { | ||
it('applies default aria labels', () => { | ||
render(<SliderSkeleton twoHandles={true} />); | ||
const lowerHandle = screen.getByLabelText('slider handle'); | ||
const upperHandle = screen.getByLabelText('upper slider handle'); | ||
expect(lowerHandle).toBeInTheDocument(); | ||
expect(upperHandle).toBeInTheDocument(); | ||
}); | ||
|
||
it('allows custom aria labels', () => { | ||
render( | ||
<SliderSkeleton | ||
twoHandles={true} | ||
ariaLabel="Custom Lower Handle" | ||
unstable_ariaLabelHandleUpper="Custom Upper Handle" | ||
/> | ||
); | ||
const lowerHandle = screen.getByLabelText('Custom Lower Handle'); | ||
const upperHandle = screen.getByLabelText('Custom Upper Handle'); | ||
expect(lowerHandle).toBeInTheDocument(); | ||
expect(upperHandle).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.