* Slide up panel for reaction list * Feedback review * UI Feedback review * Feedback review * Improve slide speed and fix end position * Scroll to top when changing reaction view * dismiss modal without animation so backdrop does not scroll down * Smooth animation to show/hide * Change animation speed
55 lines
1.6 KiB
JavaScript
55 lines
1.6 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
/* eslint-disable max-nested-callbacks */
|
|
|
|
import assert from 'assert';
|
|
|
|
import {ViewTypes} from 'app/constants';
|
|
import {messageRetention} from 'app/store/middleware';
|
|
|
|
describe('store/middleware', () => {
|
|
describe('messageRetention', () => {
|
|
describe('should chain the same incoming action type', () => {
|
|
const actions = [
|
|
{
|
|
type: 'persist/REHYDRATE',
|
|
payload: {
|
|
views: {
|
|
team: {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
type: ViewTypes.DATA_CLEANUP,
|
|
payload: {
|
|
entities: {
|
|
channels: {
|
|
},
|
|
posts: {
|
|
},
|
|
},
|
|
views: {
|
|
team: {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
type: 'other',
|
|
},
|
|
];
|
|
|
|
actions.forEach((action) => {
|
|
it(`for action type ${action.type}`, () => {
|
|
const store = {};
|
|
const next = (a) => a;
|
|
|
|
const nextAction = messageRetention(store)(next)(action);
|
|
assert.equal(action.type, nextAction.type);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|