-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #997 from carbon-design-system/dev
chore: publish `v1.42`
- Loading branch information
Showing
41 changed files
with
902 additions
and
114 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @file Jest configuration. | ||
* @copyright IBM Security 2021 | ||
*/ | ||
|
||
module.exports = { | ||
collectCoverage: true, | ||
rootDir: 'src', | ||
setupFilesAfterEnv: ['<rootDir>/../config/jest'], | ||
snapshotSerializers: ['enzyme-to-json/serializer'], | ||
testTimeout: 10000, | ||
}; |
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
40 changes: 40 additions & 0 deletions
40
src/components/LayoutModules/ButtonClusterModule/__tests__/ButtonClusterModule.spec.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,40 @@ | ||
/** | ||
* @file Button cluster module tests. | ||
* @copyright IBM Security 2020 | ||
*/ | ||
|
||
import { render } from '@testing-library/react'; | ||
import React from 'react'; | ||
|
||
import { ButtonClusterModule } from '../../../..'; | ||
|
||
const { name } = ButtonClusterModule; | ||
|
||
describe(name, () => { | ||
test('has no accessibility violations', async () => { | ||
const { container } = render( | ||
<ButtonClusterModule>{name}</ButtonClusterModule> | ||
); | ||
|
||
await expect(container).toHaveNoAxeViolations(); | ||
await expect(container).toHaveNoDAPViolations(name); | ||
}); | ||
|
||
test(`adds content for the '${name}'`, () => { | ||
expect( | ||
render(<ButtonClusterModule>{name}</ButtonClusterModule>).getByText(name) | ||
).toBeInTheDocument(); | ||
}); | ||
|
||
test('adds additional props to the containing node', () => { | ||
const dataTestId = 'dataTestId'; | ||
|
||
expect( | ||
render( | ||
<ButtonClusterModule data-testid={dataTestId}> | ||
{name} | ||
</ButtonClusterModule> | ||
).getByTestId(dataTestId) | ||
).toBeInTheDocument(); | ||
}); | ||
}); |
Oops, something went wrong.