Update tests to reflect new dialogue structure
This commit is contained in:
@@ -603,9 +603,10 @@ describe("buildRuntimeSceneFromDocument", () => {
|
|||||||
y: 0,
|
y: 0,
|
||||||
z: -2
|
z: -2
|
||||||
},
|
},
|
||||||
yawDegrees: 45,
|
yawDegrees: 45,
|
||||||
modelAssetId: modelAsset.id,
|
modelAssetId: modelAsset.id,
|
||||||
dialogueId: null,
|
dialogues: [],
|
||||||
|
defaultDialogueId: null,
|
||||||
activeRoutineTitle: null,
|
activeRoutineTitle: null,
|
||||||
animationClipName: null,
|
animationClipName: null,
|
||||||
animationLoop: undefined,
|
animationLoop: undefined,
|
||||||
@@ -1514,7 +1515,20 @@ describe("buildRuntimeSceneFromDocument", () => {
|
|||||||
id: "entity-npc-patroller",
|
id: "entity-npc-patroller",
|
||||||
actorId: actorTarget.actorId,
|
actorId: actorTarget.actorId,
|
||||||
modelAssetId: asset.id,
|
modelAssetId: asset.id,
|
||||||
dialogueId: "dialogue-patrol",
|
dialogues: [
|
||||||
|
{
|
||||||
|
id: "dialogue-patrol",
|
||||||
|
title: "Patrol",
|
||||||
|
lines: [
|
||||||
|
{
|
||||||
|
id: "dialogue-line-patrol-1",
|
||||||
|
speakerName: "Guard",
|
||||||
|
text: "All clear."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultDialogueId: "dialogue-patrol",
|
||||||
yawDegrees: 15
|
yawDegrees: 15
|
||||||
});
|
});
|
||||||
const path = createScenePath({
|
const path = createScenePath({
|
||||||
@@ -1541,17 +1555,6 @@ describe("buildRuntimeSceneFromDocument", () => {
|
|||||||
const document = createEmptySceneDocument();
|
const document = createEmptySceneDocument();
|
||||||
document.assets[asset.id] = asset;
|
document.assets[asset.id] = asset;
|
||||||
document.entities[npc.id] = npc;
|
document.entities[npc.id] = npc;
|
||||||
document.dialogues.dialogues["dialogue-patrol"] = {
|
|
||||||
id: "dialogue-patrol",
|
|
||||||
title: "Patrol",
|
|
||||||
lines: [
|
|
||||||
{
|
|
||||||
id: "dialogue-line-patrol-1",
|
|
||||||
speakerName: "Guard",
|
|
||||||
text: "All clear."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
document.paths[path.id] = path;
|
document.paths[path.id] = path;
|
||||||
document.scheduler.routines["routine-patrol"] = createProjectScheduleRoutine({
|
document.scheduler.routines["routine-patrol"] = createProjectScheduleRoutine({
|
||||||
id: "routine-patrol",
|
id: "routine-patrol",
|
||||||
@@ -1614,7 +1617,12 @@ describe("buildRuntimeSceneFromDocument", () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
entityId: npc.id,
|
entityId: npc.id,
|
||||||
animationClipName: "Walk",
|
animationClipName: "Walk",
|
||||||
dialogueId: "dialogue-patrol",
|
defaultDialogueId: "dialogue-patrol",
|
||||||
|
dialogues: expect.arrayContaining([
|
||||||
|
expect.objectContaining({
|
||||||
|
id: "dialogue-patrol"
|
||||||
|
})
|
||||||
|
]),
|
||||||
position: {
|
position: {
|
||||||
x: 4,
|
x: 4,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user