* Fix channel navbar title displayName variable * Fix snapshots
This commit is contained in:
parent
53657536fc
commit
486917d692
3 changed files with 17 additions and 2 deletions
|
|
@ -33,6 +33,19 @@ exports[`ChannelTitle should match snapshot 1`] = `
|
|||
"textAlign": "center",
|
||||
}
|
||||
}
|
||||
>
|
||||
My Channel
|
||||
</Text>
|
||||
<Icon
|
||||
allowFontScaling={false}
|
||||
name="chevron-down"
|
||||
size={12}
|
||||
style={
|
||||
Object {
|
||||
"color": undefined,
|
||||
"marginHorizontal": 5,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
|
@ -77,7 +90,7 @@ exports[`ChannelTitle should match snapshot when isSelfDMChannel is true 1`] = `
|
|||
id="channel_header.directchannel.you"
|
||||
values={
|
||||
Object {
|
||||
"displayname": undefined,
|
||||
"displayName": "My User",
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default class ChannelTitle extends PureComponent {
|
|||
if (isSelfDMChannel) {
|
||||
const messageId = t('channel_header.directchannel.you');
|
||||
const defaultMessage = '{displayName} (you)';
|
||||
const values = {displayname: channelDisplayName};
|
||||
const values = {displayName: channelDisplayName};
|
||||
|
||||
return (
|
||||
<FormattedText
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ jest.mock('react-intl');
|
|||
|
||||
describe('ChannelTitle', () => {
|
||||
const baseProps = {
|
||||
displayName: 'My Channel',
|
||||
isGuest: false,
|
||||
hasGuests: false,
|
||||
canHaveSubtitle: false,
|
||||
|
|
@ -27,6 +28,7 @@ describe('ChannelTitle', () => {
|
|||
test('should match snapshot when isSelfDMChannel is true', () => {
|
||||
const props = {
|
||||
...baseProps,
|
||||
displayName: 'My User',
|
||||
isSelfDMChannel: true,
|
||||
};
|
||||
const wrapper = shallow(
|
||||
|
|
|
|||
Loading…
Reference in a new issue