Added real time updates to tags list page

This commit is contained in:
Alejandro Celaya
2020-05-13 18:32:27 +02:00
parent e47dfaf36f
commit 1d26cd93fb
5 changed files with 51 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ describe('<TagsList />', () => {
const TagsList = createTagsList(TagCard);
wrapper = shallow(
<TagsList forceListTags={identity} filterTags={filterTags} match={{ params }} tagsList={tagsList} />
<TagsList forceListTags={identity} filterTags={filterTags} match={{ params }} tagsList={tagsList} settings={{}} />
);
return wrapper;

View File

@@ -11,17 +11,17 @@ import { TAG_EDITED } from '../../../src/tags/reducers/tagEdit';
describe('tagsListReducer', () => {
describe('reducer', () => {
it('returns loading on LIST_TAGS_START', () => {
expect(reducer({}, { type: LIST_TAGS_START })).toEqual({
expect(reducer({}, { type: LIST_TAGS_START })).toEqual(expect.objectContaining({
loading: true,
error: false,
});
}));
});
it('returns error on LIST_TAGS_ERROR', () => {
expect(reducer({}, { type: LIST_TAGS_ERROR })).toEqual({
expect(reducer({}, { type: LIST_TAGS_ERROR })).toEqual(expect.objectContaining({
loading: false,
error: true,
});
}));
});
it('returns provided tags as filtered and regular tags on LIST_TAGS', () => {