-
Notifications
You must be signed in to change notification settings - Fork 358
Fix accessibility issues, update to React 19 #131
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
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
618a504
Improve ActionsGrid component
rtivital 8ee924c
Update ArticleCard component
rtivital ba54104
Improve ArticleCard component
rtivital 5d3e2d1
Improve ArticleCardFooter component
rtivital 131fb24
Improve ArticleCardFooter component
rtivital 2a87031
Improve ArticleCardImage component
rtivital 6e7f460
Improve ArticleCardVertical
rtivital fceeb3a
Improve ArticlesCardsGrid and AIthenticationForm components
rtivital e831867
Initialize tests
rtivital 485c76c
Add axe tests for all components
rtivital 934df4d
Fix missing labels in components
rtivital 6ee59e0
Merge branch master
rtivital ca21e22
Fix minor issues in tests
rtivital 5021f48
Fix prettier formatting, update dependendecies
rtivital File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,19 @@ | ||
| const nextJest = require('next/jest'); | ||
|
|
||
| const createJestConfig = nextJest({ | ||
| // Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
| dir: './', | ||
| }); | ||
|
|
||
| // Add any custom config to be passed to Jest | ||
| const customJestConfig = { | ||
| setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
| testEnvironment: 'jest-environment-jsdom', | ||
| moduleNameMapper: { | ||
| // Handle module aliases (this will be automatically configured for you soon) | ||
| '^@/(.*)$': '<rootDir>/$1', | ||
| }, | ||
| }; | ||
|
|
||
| // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
| module.exports = createJestConfig(customJestConfig); |
This file contains hidden or 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,31 @@ | ||
| import '@testing-library/jest-dom'; | ||
|
|
||
| Object.defineProperty(window, 'matchMedia', { | ||
| writable: true, | ||
| value: jest.fn().mockImplementation((query) => ({ | ||
| matches: false, | ||
| media: query, | ||
| onchange: null, | ||
| addListener: jest.fn(), // deprecated | ||
| removeListener: jest.fn(), // deprecated | ||
| addEventListener: jest.fn(), | ||
| removeEventListener: jest.fn(), | ||
| dispatchEvent: jest.fn(), | ||
| })), | ||
| }); | ||
|
|
||
| class ResizeObserver { | ||
| observe() {} | ||
| unobserve() {} | ||
| disconnect() {} | ||
| } | ||
|
|
||
| window.ResizeObserver = ResizeObserver; | ||
|
|
||
| class IntersectionObserver { | ||
| observe() {} | ||
| unobserve() {} | ||
| disconnect() {} | ||
| } | ||
|
|
||
| window.IntersectionObserver = IntersectionObserver; |
This file contains hidden or 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,11 @@ | ||
| import { axe, render } from '@/test-utils'; | ||
| import { ActionToggle } from './ActionToggle'; | ||
| import attributes from './attributes.json'; | ||
|
|
||
| describe('ActionToggle', () => { | ||
| axe([<ActionToggle key="1" {...(attributes as any)} />]); | ||
|
|
||
| it('renders correctly', () => { | ||
| render(<ActionToggle {...(attributes as any)} />); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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,10 @@ | ||
| import { axe, render } from '@/test-utils'; | ||
| import { ActionsGrid } from './ActionsGrid'; | ||
|
|
||
| describe('ActionsGrid', () => { | ||
| axe([<ActionsGrid />]); | ||
|
|
||
| it('renders correctly', () => { | ||
| render(<ActionsGrid />); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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 hidden or 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,11 @@ | ||
| import { axe, render } from '@/test-utils'; | ||
| import { ArticleCard } from './ArticleCard'; | ||
| import attributes from './attributes.json'; | ||
|
|
||
| describe('ArticleCard', () => { | ||
| axe([<ArticleCard key="1" {...(attributes as any)} />]); | ||
|
|
||
| it('renders correctly', () => { | ||
| render(<ArticleCard {...(attributes as any)} />); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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 hidden or 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,11 @@ | ||
| import { axe, render } from '@/test-utils'; | ||
| import { ArticleCardFooter } from './ArticleCardFooter'; | ||
| import attributes from './attributes.json'; | ||
|
|
||
| describe('ArticleCardFooter', () => { | ||
| axe([<ArticleCardFooter key="1" {...(attributes as any)} />]); | ||
|
|
||
| it('renders correctly', () => { | ||
| render(<ArticleCardFooter {...(attributes as any)} />); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.