* break auth panel render into submethods * move var definition * break renderUnathorized into submethods * hide login providers behind dropdown if they are exceed length of 3 * amend dropdown to behave nicely being placed in another dropdown * add style to providers enclosed in dropdown * add provider reducer and actions * add provider save/restore to app flow * place last login provider first in providers list * infer StoreState from combineReducers return type * move collapsed threads retoration to action * fix: provider lost in other * add dynamic threshold depending on window width * fix & add tests
20 lines
409 B
TypeScript
20 lines
409 B
TypeScript
import reducer from './reducers';
|
|
import { PROVIDER_UPDATE } from './types';
|
|
|
|
describe('provider reducer', () => {
|
|
it('should set name of provider', () => {
|
|
const result = reducer.provider(
|
|
{ name: null },
|
|
{
|
|
type: PROVIDER_UPDATE,
|
|
payload: {
|
|
name: 'something',
|
|
},
|
|
}
|
|
);
|
|
expect(result).toStrictEqual({
|
|
name: 'something',
|
|
});
|
|
});
|
|
});
|