From 2f019edede747e33ad35a26f331a8211f2e1acbc Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 15 Jan 2025 09:35:48 +0800 Subject: [PATCH] [v3.8.6] [Tween] Add unit test for Pull Request #18117 (#18182) --- tests/tween/tween.test.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/tween/tween.test.ts b/tests/tween/tween.test.ts index 0672f34481..ebd59b6f4b 100644 --- a/tests/tween/tween.test.ts +++ b/tests/tween/tween.test.ts @@ -4981,3 +4981,26 @@ test('parallel with two call tween', function () { director.unregisterSystem(sys); }); + +test('parallel with set action', function () { + const sys = new TweenSystem(); + (TweenSystem.instance as any) = sys; + director.registerSystem(TweenSystem.ID, sys, System.Priority.MEDIUM); + + const node = new Node(); + const node2 = new Node(); + + tween(node) + .parallel( + tween(node).by(1, { position: v3(1, 1, 1) }), + tween(node2).set({ position: v3(2, 2, 2) }) + ) + .start(); + + runFrames(1); // start + runFrames(60); + + expect(node2.position.equals(v3(2, 2, 2))).toBeTruthy(); + + director.unregisterSystem(sys); +});