Skip to content

Commit ad35733

Browse files
committed
fix merge-related problems in specs
1 parent dc644e6 commit ad35733

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

frontend/javascripts/test/fixtures/dataset_server_object.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const sampleSegmentationLayer: APISegmentationLayer = {
5555

5656
export const sampleTracingLayer: APISegmentationLayer = {
5757
...sampleSegmentationLayer,
58-
name: "tracingId",
59-
tracingId: "tracingId",
58+
name: "volumeTracingId",
59+
tracingId: "volumeTracingId",
6060
};
6161

6262
function createDataset(dataLayers: Array<APIColorLayer | APISegmentationLayer>): APIDataset {

frontend/javascripts/test/sagas/skeletontracing_saga.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import SkeletonTracingReducer from "viewer/model/reducers/skeletontracing_reduce
2525
import { TIMESTAMP } from "test/global_mocks";
2626
import { type Tree, TreeMap } from "viewer/model/types/tree_types";
2727
import { Model } from "viewer/singletons";
28+
import { hasRootSagaCrashed } from "viewer/model/sagas/root_saga";
2829

2930
const actionTracingId = "tracingId";
3031

@@ -137,6 +138,10 @@ describe("SkeletonTracingSaga", () => {
137138
context.tearDownPullQueues();
138139
// Saving after each test and checking that the root saga didn't crash,
139140
// ensures that each test is cleanly exited. Without it weird output can
141+
expect(hasRootSagaCrashed()).toBe(false);
142+
});
143+
144+
it("shouldn't do anything if unchanged (saga test)", async (context: WebknossosTestContext) => {
140145
await Model.ensureSavedState();
141146
expect(context.receivedDataPerSaveRequest.length).toBe(0);
142147
});

frontend/javascripts/test/sagas/volumetracing/volumetracing_saga.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
import VolumeLayer from "viewer/model/volumetracing/volumelayer";
2222
import { serverVolumeToClientVolumeTracing } from "viewer/model/reducers/volumetracing_reducer";
2323
import { Model, Store } from "viewer/singletons";
24+
import { hasRootSagaCrashed } from "viewer/model/sagas/root_saga";
2425

2526
const serverVolumeTracing: ServerVolumeTracing = {
2627
typ: "Volume",
@@ -84,8 +85,11 @@ describe("VolumeTracingSaga", () => {
8485

8586
afterEach<WebknossosTestContext>(async (context) => {
8687
context.tearDownPullQueues();
87-
8888
// Saving after each test and checking that the root saga didn't crash,
89+
expect(hasRootSagaCrashed()).toBe(false);
90+
});
91+
92+
it("shouldn't do anything if unchanged (saga test)", async (context: WebknossosTestContext) => {
8993
await Model.ensureSavedState();
9094
expect(context.receivedDataPerSaveRequest.length).toBe(0);
9195
});

frontend/javascripts/viewer/model/sagas/save_saga.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
getNewestVersionForAnnotation,
3-
sendSaveRequestWithToken,
43
getUpdateActionLog,
4+
sendSaveRequestWithToken,
55
} from "admin/rest_api";
66
import Date from "libs/date";
77
import ErrorHandling from "libs/error_handling";

frontend/javascripts/viewer/view/version_entry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ import type {
4040
DeleteTreeUpdateAction,
4141
DeleteUserBoundingBoxInSkeletonTracingAction,
4242
DeleteUserBoundingBoxInVolumeTracingAction,
43+
LEGACY_MergeTreeUpdateAction,
4344
LEGACY_UpdateUserBoundingBoxesInSkeletonTracingUpdateAction,
4445
LEGACY_UpdateUserBoundingBoxesInVolumeTracingUpdateAction,
4546
MergeAgglomerateUpdateAction,
46-
LEGACY_MergeTreeUpdateAction,
4747
MoveTreeComponentUpdateAction,
4848
RevertToVersionUpdateAction,
4949
ServerUpdateAction,

0 commit comments

Comments
 (0)