-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Dl): remove span as direct sibling for horizontal direction (#1625)
- Loading branch information
1 parent
3a732ec
commit 6845219
Showing
8 changed files
with
101 additions
and
26 deletions.
There are no files selected for viewing
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
49 changes: 49 additions & 0 deletions
49
packages/dnb-eufemia/src/elements/__tests__/Lists.test.tsx
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,49 @@ | ||
/** | ||
* Dl Test | ||
* | ||
*/ | ||
|
||
import React from 'react' | ||
import { axeComponent } from '../../core/jest/jestSetup' | ||
import { render } from '@testing-library/react' | ||
import Dl from '../Dl' | ||
import Dt from '../Dt' | ||
import Dd from '../Dd' | ||
|
||
describe('Dl', () => { | ||
describe('in horizontal direction', () => { | ||
it('should validate with ARIA rules', async () => { | ||
const Component = render( | ||
<Dl direction="horizontal"> | ||
<Dl.Item> | ||
<Dt>Term</Dt> | ||
<Dd>Description</Dd> | ||
</Dl.Item> | ||
<Dl.Item> | ||
<Dt>Term</Dt> | ||
<Dd>Description</Dd> | ||
</Dl.Item> | ||
</Dl> | ||
) | ||
expect(await axeComponent(Component)).toHaveNoViolations() | ||
}) | ||
}) | ||
|
||
describe('with nested Dls', () => { | ||
it('should validate with ARIA rules', async () => { | ||
const Component = render( | ||
<Dl> | ||
<Dt>Term</Dt> | ||
<Dd>Description</Dd> | ||
<Dd> | ||
<Dl> | ||
<Dt>Term</Dt> | ||
<Dd>Description</Dd> | ||
</Dl> | ||
</Dd> | ||
</Dl> | ||
) | ||
expect(await axeComponent(Component)).toHaveNoViolations() | ||
}) | ||
}) | ||
}) |
Binary file modified
BIN
+708 Bytes
(100%)
...lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-2-6ae87.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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