Skip to content

Commit

Permalink
Added tests regarding highlightLayer in StoryNPCView
Browse files Browse the repository at this point in the history
  • Loading branch information
Lizardguard committed Feb 17, 2024
1 parent 4f4c65a commit dd74b2f
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import IScenePresenter from "../../../../Core/Presentation/Babylon/SceneManageme
import CoreDIContainer from "../../../../Core/DependencyInjection/CoreDIContainer";
import SCENE_TYPES from "../../../../Core/DependencyInjection/Scenes/SCENE_TYPES";
import {
AbstractMesh,
ActionManager,
AnimationGroup,
Color3,
ISceneLoaderAsyncResult,
Mesh,
NullEngine,
Expand Down Expand Up @@ -307,6 +309,20 @@ describe("StoryNPCView", () => {

expect(controllerMock.picked).toHaveBeenCalledTimes(1);
});
test("async setup adds mesh to the scene presenters HighlightLayer", async () => {
viewModel.modelMeshes = [
new Mesh("mockMesh", new Scene(new NullEngine())),
];

viewModel.iconMeshes = [];

systemUnderTest["addMeshesToHighlightLayer"]();

expect(scenePresenterMock.HighlightLayer.addMesh).toBeCalledWith(
viewModel.modelMeshes[0],
expect.any(Color3)
);
});
});

describe("movement", () => {
Expand Down

0 comments on commit dd74b2f

Please sign in to comment.