-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rm unnecessary funct and update tests
- Loading branch information
1 parent
28c8881
commit c53c3c0
Showing
6 changed files
with
57 additions
and
46 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
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
15 changes: 5 additions & 10 deletions
15
packages/react-core/src/next/components/DualListSelector/__tests__/DualListSelector.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 |
---|---|---|
@@ -1,31 +1,26 @@ | ||
import { render } from '@testing-library/react'; | ||
import { DualListSelectorPane } from '../../DualListSelector'; | ||
import { SearchInput } from '../../../../components/SearchInput'; | ||
import React from 'react'; | ||
|
||
describe('DualListSelector', () => { | ||
test('basic', () => { | ||
const { asFragment } = render(<DualListSelectorPane options={['Option 1', 'Option 2']} id="firstTest" />); | ||
const { asFragment } = render(<DualListSelectorPane id="basicTest" />); | ||
expect(asFragment()).toMatchSnapshot(); | ||
}); | ||
|
||
test('with search inputs', () => { | ||
const { asFragment } = render( | ||
<DualListSelectorPane options={['Option 1', 'Option 2']} id="secondTest" isSearchable /> | ||
); | ||
const { asFragment } = render(<DualListSelectorPane id="searchTest" searchInput={<SearchInput />} />); | ||
expect(asFragment()).toMatchSnapshot(); | ||
}); | ||
|
||
test('with custom status', () => { | ||
const { asFragment } = render( | ||
<DualListSelectorPane options={['Option 1', 'Option 2']} status="Test status1" id="thirdTest" /> | ||
); | ||
const { asFragment } = render(<DualListSelectorPane id="statusTest" status="Test status1" />); | ||
expect(asFragment()).toMatchSnapshot(); | ||
}); | ||
|
||
test('basic with disabled controls', () => { | ||
const { asFragment } = render( | ||
<DualListSelectorPane options={['Option 1', 'Option 2']} id="disabledTest" isDisabled /> | ||
); | ||
const { asFragment } = render(<DualListSelectorPane id="disabledTest" isDisabled />); | ||
expect(asFragment()).toMatchSnapshot(); | ||
}); | ||
}); |
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