Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Fix limit banner show modal for cloud in-app purchases #7305

Merged
merged 34 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
78f19c0
change super to system (#7076) (#7088)
mattermost-build Nov 17, 2020
a6f56ff
MM-20465 Fix for collapse/expand of image preview (#7085)
sudheerDev Nov 18, 2020
c6ee96f
MM-20465 Revert usage of getCurrentChannel to getCurrentChannelId whe…
mattermost-build Nov 18, 2020
c6ea89c
Automated cherry pick of #7096 (#7097)
mattermost-build Nov 18, 2020
7d7be06
Automated cherry pick of #7101 (#7104)
mattermost-build Nov 19, 2020
3d69740
MM-30477 Fix for autocomplete not closing (#7093)
sudheerDev Nov 20, 2020
7bbe7eb
Add GitLab jobs
metanerd Nov 24, 2020
d93f0aa
Translations update from Weblate (#7122)
weblate Nov 27, 2020
d199d11
Translations update from Weblate (#7139)
weblate Dec 1, 2020
928f93a
Merge latest master into cloud branch for next release (#7144)
jwilander Dec 2, 2020
d6b4d69
MM-30972 Add proper padding to code preview line numbers (#7155) (#7167)
mattermost-build Dec 4, 2020
a36a905
Automated cherry pick of #7133 (#7178)
mattermost-build Dec 7, 2020
f635879
Update NOTICE.txt (#7102) (#7179)
mattermost-build Dec 7, 2020
faadbf7
Automated cherry pick of #7183 (#7184)
mattermost-build Dec 8, 2020
8f10cbd
Translations update from Weblate (#7182)
weblate Dec 7, 2020
a1023cb
Translations update from Weblate (#7220)
weblate Dec 14, 2020
a610efa
MM-31275 New sidebar performance improvements (#7207) (#7240)
mattermost-build Dec 17, 2020
01ed232
MM-31466 Performance investigation part two (cloud) (#7245)
hmhealey Dec 18, 2020
8c7b80a
Translations update from Weblate (#7273)
weblate Jan 5, 2021
9ffd6be
Merge branch 'master' into cloud-ff-2021-01-05
jwilander Jan 5, 2021
7fcac88
Merge branch 'cloud-ff-2021-01-05' into cloud
jwilander Jan 5, 2021
f107384
MM-31697- Remove OpenId from System Console (#7278) (#7294)
mattermost-build Jan 8, 2021
5771f9f
[MM-31580] Fix call to getChannel to use new parameter format (#7284)…
mattermost-build Jan 8, 2021
9f8ff45
MM-31189 Revert New Messages toast PRs (#7292) (#7301)
mattermost-build Jan 8, 2021
d4abc17
[MM-31708][MM-31726][MM-31739][MM-31727] - Fix regressions in RHS and…
mattermost-build Jan 8, 2021
7278c69
Add onClick event to button so banner button works for cloud
nickmisasi Jan 11, 2021
cb60c01
Change to onButtonClick
nickmisasi Jan 11, 2021
c3da199
Reset changes for package-lock
nickmisasi Jan 11, 2021
ee35eb6
Put showModal back in case its used elsewhere
nickmisasi Jan 11, 2021
ebbd8b1
Fix invocation
nickmisasi Jan 11, 2021
bb22e69
Fix payment_announcement_bar
nickmisasi Jan 11, 2021
074ded6
Merge branch 'master' into fix-limit-banner-show-modal
nickmisasi Jan 11, 2021
f146d54
Reset 2 files to master
nickmisasi Jan 11, 2021
6024473
Merge branch 'master' into fix-limit-banner-show-modal
mattermod Jan 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MM-30477 Fix for autocomplete not closing (#7093)
Automatic Merge
  • Loading branch information
sudheerDev committed Nov 20, 2020
commit 3d69740584f81384bb3266d69b2e1cd001abc2cf
5 changes: 2 additions & 3 deletions actions/views/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,13 @@ export function autocompleteUsersInChannel(prefix, channelId) {

const respose = await dispatch(autocompleteUsers(prefix, currentTeamId, channelId));
const data = respose.data;

if (data) {
return {
...respose,
data: {
...data,
users: addLastViewAtToProfiles(state, data.users),
out_of_channel: addLastViewAtToProfiles(state, data.out_of_channel),
users: addLastViewAtToProfiles(state, data.users || []),
out_of_channel: addLastViewAtToProfiles(state, data.out_of_channel || []),
},
};
}
Expand Down
15 changes: 15 additions & 0 deletions actions/views/channel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import thunk from 'redux-thunk';

import {General, Posts, RequestStatus} from 'mattermost-redux/constants';
import {leaveChannel, markChannelAsRead} from 'mattermost-redux/actions/channels';
import * as UserActions from 'mattermost-redux/actions/users';
import * as PostActions from 'mattermost-redux/actions/posts';

import {browserHistory} from 'utils/browser_history';
Expand Down Expand Up @@ -34,6 +35,8 @@ jest.mock('actions/channel_actions.jsx', () => ({
openDirectChannelToUserId: jest.fn(() => ({type: ''})),
}));

jest.mock('mattermost-redux/actions/users');

jest.mock('mattermost-redux/actions/channels', () => ({
...jest.requireActual('mattermost-redux/actions/channels'),
markChannelAsRead: jest.fn(() => ({type: ''})),
Expand All @@ -46,6 +49,10 @@ jest.mock('selectors/local_storage', () => ({
getLastViewedChannelName: () => 'channel1',
}));

jest.mock('mattermost-redux/selectors/entities/utils', () => ({
makeAddLastViewAtToProfiles: () => jest.fn().mockReturnValue([]),
}));

describe('channel view actions', () => {
const channel1 = {id: 'channelid1', name: 'channel1', display_name: 'Channel 1', type: 'O', team_id: 'teamid1'};
const townsquare = {id: 'channelid2', name: General.DEFAULT_CHANNEL, display_name: 'Town Square', type: 'O', team_id: 'teamid1'};
Expand Down Expand Up @@ -760,4 +767,12 @@ describe('channel view actions', () => {
expect(PostActions.getPostsUnread).toHaveBeenCalledWith('channelid1');
});
});

describe('autocompleteUsersInChannel', () => {
test('should return empty arrays if the key is missing in reponse', async () => {
UserActions.autocompleteUsers.mockReturnValue(() => ({data: {}}));
const response = await store.dispatch(Actions.autocompleteUsersInChannel('test', 'channelid1'));
expect(response).toStrictEqual({data: {out_of_channel: [], users: []}});
});
});
});