Automated cherry pick of #3344 (#3345)

* Fix channel navbar title displayName variable

* Fix snapshots
This commit is contained in:
Mattermost Build 2019-09-28 18:44:52 +02:00 committed by Elias Nahum
parent 53657536fc
commit 486917d692
3 changed files with 17 additions and 2 deletions

View file

@ -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",
}
}
/>

View file

@ -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

View file

@ -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(