Skip to content

Commit

Permalink
Merge branch 'ISSUE_4897' into ISSUE_5038
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmont3drepo committed Sep 23, 2024
2 parents d92f29f + 7046ae4 commit 2e150c7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions frontend/test/drawings/drawings.store.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DrawingsActions } from '@/v5/store/drawings/drawings.redux';
import { selectCanUploadToProject, selectDrawingById, selectDrawings, selectFavouriteDrawings, selectHasCollaboratorAccess, selectHasCommenterAccess } from '@/v5/store/drawings/drawings.selectors';
import { orderBy, times } from 'lodash';
import { drawingMockFactory, prepareMockCalibration, prepareMockStats } from './drawings.fixtures';
import { NewDrawing } from '@/v5/store/drawings/drawings.types';
import { IDrawing, NewDrawing } from '@/v5/store/drawings/drawings.types';
import { ProjectsActions } from '@/v5/store/projects/projects.redux';
import { createTestStore, listContainsElementWithId } from '../test.helpers';
import { Role } from '@/v5/store/currentUser/currentUser.types';
Expand All @@ -44,7 +44,15 @@ describe('Drawings: store', () => {
const mockDrawings = orderBy(unsortedMockDrawings, 'lastUpdated', 'desc')
dispatch(DrawingsActions.fetchDrawingsSuccess(projectId, mockDrawings));
const drawings = selectDrawings(getState());
expect(drawings).toEqual(mockDrawings);
expect(new Set(drawings)).toEqual(new Set(mockDrawings));
});

it('the selector for drawings should return it sorted by date ', () => {
const projectUpdatedDesc = (drawings: IDrawing[]) => drawings.map((d) => ({lastUpdated: d.lastUpdated, desc:d.desc }));
const mockDrawings = times(5, () => drawingMockFactory());
dispatch(DrawingsActions.fetchDrawingsSuccess(projectId, mockDrawings));
const drawings = selectDrawings(getState());
expect(projectUpdatedDesc(drawings)).toEqual(projectUpdatedDesc(orderBy(mockDrawings, 'lastUpdated', 'desc')));
});

describe('Updating drawing attributes:', () => {
Expand Down
Binary file modified frontend/unity/default/unity/Build/unity.data.unityweb
Binary file not shown.
Binary file modified frontend/unity/default/unity/Build/unity.framework.js.unityweb
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/unity/default/unity/Build/unity.loader.js

Large diffs are not rendered by default.

Binary file modified frontend/unity/default/unity/Build/unity.wasm.unityweb
Binary file not shown.

0 comments on commit 2e150c7

Please sign in to comment.