Skip to content

Commit

Permalink
test: (PointsTile) Update accessbilityRole to role
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgraeme committed Jan 26, 2025
1 parent f4194a0 commit 45334a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'd.ts'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
'^.+\\.svg$': 'jest-transform-stub',
Expand All @@ -12,6 +12,7 @@ module.exports = {
'\\.(jpg|jpeg|png|gif|webp|svg)$': 'jest-transform-stub',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
testPathIgnorePatterns: ['/node_modules/', '/dist/', '\\.d\\.ts$'],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|react-native-web|@react-native|@react-native-community|@react-navigation)/)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ exports[`PointsTile renders and matches snapshot 1`] = `
<div
class="css-view-175oi2r r-alignItems-1habvwh r-flexDirection-eqz5dr r-justifyContent-1h0z5md r-width-13qz1uu"
>
<h1
<header
aria-label="Available Points"
class="css-view-175oi2r"
data-testid="points-tile-title"
role="heading"
role="banner"
>
<div
class="css-text-146c3p1"
Expand All @@ -52,7 +52,7 @@ exports[`PointsTile renders and matches snapshot 1`] = `
>
Available Points
</div>
</h1>
</header>
<div
aria-label="Points value: 1000 pts"
class="css-view-175oi2r"
Expand Down
8 changes: 4 additions & 4 deletions lib/components/organisms/PointsTile/points-tile-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export const PointsTileTitle = (): JSX.Element | null => {
if (!title) return null;

return (
<View
testID="points-tile-title"
accessible
<View
testID="points-tile-title"
accessible
accessibilityLabel={title}
accessibilityRole="header"
role="banner"
>
<Text
variant="eyebrow"
Expand Down

0 comments on commit 45334a7

Please sign in to comment.