[MM-40573] Stop asterisk detection on versions newer than 5.28, force space for the others (#1931)
* [MM-40573] Stop asking detection on versions newer than 5.29, force space for the others * PR feedback and test fixes
This commit is contained in:
@@ -310,7 +310,7 @@ describe('main/views/MattermostView', () => {
|
||||
});
|
||||
|
||||
describe('updateMentionsFromTitle', () => {
|
||||
const mattermostView = new MattermostView(tabView, {}, {}, {});
|
||||
const mattermostView = new MattermostView(tabView, {remoteInfo: {serverVersion: '5.28.0'}}, {}, {});
|
||||
|
||||
it('should parse mentions from title', () => {
|
||||
mattermostView.updateMentionsFromTitle('(7) Mattermost');
|
||||
@@ -321,5 +321,10 @@ describe('main/views/MattermostView', () => {
|
||||
mattermostView.updateMentionsFromTitle('* Mattermost');
|
||||
expect(appState.updateMentions).toHaveBeenCalledWith(mattermostView.tab.name, 0, true);
|
||||
});
|
||||
|
||||
it('should not parse unreads when title is on a channel with an asterisk before it', () => {
|
||||
mattermostView.updateMentionsFromTitle('*testChannel - Mattermost');
|
||||
expect(appState.updateMentions).toHaveBeenCalledWith(mattermostView.tab.name, 0, false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user