Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Apr 30, 2024
1 parent a8f27c7 commit 5d784b1
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions test/store/features/editor/editorState.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ test("should remove script event from selection when toggling and value already
const { store, invoke } = create({
editor: {
scriptEventSelectionIds: ["b", "c", "d"],
scriptEventSelectionParentId: "s1",
scriptEventSelectionParentId: "scene_s1_script",
},
project: {
present: {
Expand All @@ -460,8 +460,8 @@ test("should remove script event from selection when toggling and value already
})
);
expect(store.dispatch).toHaveBeenCalledWith({
payload: { parentId: "s1", scriptEventIds: ["b", "d"] },
type: "editor/setScriptEventSelectedId",
payload: { parentId: "scene_s1_script", scriptEventIds: ["b", "d"] },
type: "editor/setScriptEventSelectedIds",
});
expect(store.getState).toHaveBeenCalled();
});
Expand All @@ -470,7 +470,7 @@ test("should add script event to selection when toggling new value, keeping sibl
const { store, invoke } = create({
editor: {
scriptEventSelectionIds: ["a", "c", "e"],
scriptEventSelectionParentId: "s1",
scriptEventSelectionParentId: "scene_s1_script",
},
project: {
present: {
Expand All @@ -496,8 +496,11 @@ test("should add script event to selection when toggling new value, keeping sibl
})
);
expect(store.dispatch).toHaveBeenCalledWith({
payload: { parentId: "s1", scriptEventIds: ["a", "c", "d", "e"] },
type: "editor/setScriptEventSelectedId",
payload: {
parentId: "scene_s1_script",
scriptEventIds: ["a", "c", "d", "e"],
},
type: "editor/setScriptEventSelectedIds",
});
expect(store.getState).toHaveBeenCalled();
});
Expand All @@ -506,7 +509,7 @@ test("should reset selection if selecting from a new parentId", () => {
const { store, invoke } = create({
editor: {
scriptEventSelectionIds: ["a", "c", "e"],
scriptEventSelectionParentId: "s1",
scriptEventSelectionParentId: "scene_s1_script",
},
project: {
present: {
Expand Down Expand Up @@ -535,8 +538,8 @@ test("should reset selection if selecting from a new parentId", () => {
})
);
expect(store.dispatch).toHaveBeenCalledWith({
payload: { parentId: "s2", scriptEventIds: ["D"] },
type: "editor/setScriptEventSelectedId",
payload: { parentId: "scene_s2_script", scriptEventIds: ["D"] },
type: "editor/setScriptEventSelectedIds",
});
expect(store.getState).toHaveBeenCalled();
});
Expand All @@ -545,7 +548,7 @@ test("Should clearing selected script events when creating a script event group"
const state: EditorState = {
...initialState,
scriptEventSelectionIds: ["b", "c", "d"],
scriptEventSelectionParentId: "a",
scriptEventSelectionParentId: "scriptEvent_a_true",
};
const action = entitiesActions.groupScriptEvents({
scriptEventIds: ["b", "c", "d"],
Expand All @@ -562,7 +565,7 @@ test("Should clearing selected script events when creating a script event group"
const state: EditorState = {
...initialState,
scriptEventSelectionIds: ["b", "c", "d"],
scriptEventSelectionParentId: "a",
scriptEventSelectionParentId: "scriptEvent_a_true",
};
const action = entitiesActions.addScriptEvents({
entityId: "a",
Expand Down

0 comments on commit 5d784b1

Please sign in to comment.