mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(mod queue): preserve moderated queue history
This commit is contained in:
@@ -75,18 +75,29 @@ describe('persisted extra stores', () => {
|
||||
expect(useModQueueStore.getState()).toMatchObject({
|
||||
alertThresholdValue: 3,
|
||||
alertThresholdUnit: 'hours',
|
||||
dismissedCommentCids: [],
|
||||
queuedCommentHistory: [],
|
||||
selectedBoardFilter: 'music.eth',
|
||||
viewMode: 'feed',
|
||||
});
|
||||
expect(useModQueueStore.getState().getAlertThresholdSeconds()).toBe(10_800);
|
||||
|
||||
useModQueueStore.getState().setAlertThreshold(15, 'minutes');
|
||||
useModQueueStore.getState().dismissCommentFromQueue('approved-cid');
|
||||
useModQueueStore.getState().dismissCommentFromQueue('approved-cid');
|
||||
useModQueueStore.getState().rememberCommentsInQueue([{ cid: 'approved-cid', approved: true, content: 'approved body' }]);
|
||||
useModQueueStore.getState().rememberCommentsInQueue([{ cid: 'rejected-cid', approved: false, content: 'rejected body' }]);
|
||||
useModQueueStore.getState().setSelectedBoardFilter('tech.eth');
|
||||
useModQueueStore.getState().setViewMode('compact');
|
||||
|
||||
expect(useModQueueStore.getState()).toMatchObject({
|
||||
alertThresholdValue: 15,
|
||||
alertThresholdUnit: 'minutes',
|
||||
dismissedCommentCids: ['approved-cid'],
|
||||
queuedCommentHistory: [
|
||||
{ cid: 'rejected-cid', approved: false, content: 'rejected body' },
|
||||
{ cid: 'approved-cid', approved: true, content: 'approved body' },
|
||||
],
|
||||
selectedBoardFilter: 'tech.eth',
|
||||
viewMode: 'compact',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user