-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mingze Xiao
committed
May 14, 2020
1 parent
eb20b7f
commit df80773
Showing
9 changed files
with
35 additions
and
40 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
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ import { shallow, ShallowWrapper } from 'enzyme'; | |
import DatalistItem from 'box-ui-elements/es/components/datalist-item'; | ||
import ItemRow, { Props } from '../ItemRow'; | ||
|
||
describe('components/Popups/ReplyField/DefaultItemRow', () => { | ||
describe('components/Popups/ReplyField/ItemRow', () => { | ||
const defaults: Props = { | ||
id: 'testid', | ||
item: { email: '[email protected]', id: 'testid', name: 'testname', type: 'user' }, | ||
|
@@ -37,14 +37,14 @@ describe('components/Popups/ReplyField/DefaultItemRow', () => { | |
test('should render item name and email', () => { | ||
const wrapper = getWrapper(); | ||
|
||
expect(wrapper.find('[data-testid="ba-DefaultItemRow-name"]').text()).toBe('testname'); | ||
expect(wrapper.find('[data-testid="ba-DefaultItemRow-email"]').text()).toBe('[email protected]'); | ||
expect(wrapper.find('[data-testid="ba-ItemRow-name"]').text()).toBe('testname'); | ||
expect(wrapper.find('[data-testid="ba-ItemRow-email"]').text()).toBe('[email protected]'); | ||
}); | ||
|
||
test('should not render email if item has no email', () => { | ||
const wrapper = getWrapper({ item: { id: 'testid', name: 'testname', type: 'group' } }); | ||
|
||
expect(wrapper.exists('[data-testid="ba-DefaultItemRow-email"]')).toBeFalsy(); | ||
expect(wrapper.exists('[data-testid="ba-ItemRow-email"]')).toBeFalsy(); | ||
}); | ||
}); | ||
}); |
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
2 changes: 1 addition & 1 deletion
2
src/components/Popups/ReplyField/__tests__/withMentionDecorator-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