Files
ueblueprint/tests/nodeInterpolateOverTimeQuaternion.spec.js
BarsDev 6ba2705386 Large refactoring and new nodes
* Fix node reference when changing elements

* Fix ScriptVariables parsing

* Fix invariant text and niagara types

* Niagara convert nodes

* Move node tests to own files

* More Niagara tests

* Niagara float and smaller fixes

* More Decoding

* More decoding

* WIP

* Float is real

* WIP

* More types and colors

* Test case and small polish

* WIP

* WIP

* Fix niagara script variables merging

* Fix Niagara variables

* Fixing mirrored ExportPath

* Fix Export paths name adjustments

* Simplify arc calculation

* Simplify a bit arc calculation

* source / destionation => origin / target

* Minor refactoring

* Fix switched link position

* Rename some properties for uniformity

* Fix input escape

* Simplify test

* About window

* Dialog backdrop style

* About dialog touches

* Remove dependency and minot improvement

* Light mode

* Fix link location and css small improvement

* Link direction and minor fixes

* Some minor fixes and refactoring

* Refactoring WIP

* Shorting repetitive bits

* More tests

* Simplify linking tests
2025-02-07 00:36:03 +02:00

54 lines
7.7 KiB
JavaScript
Executable File

import { css } from "lit"
import Configuration from "../js/Configuration.js"
import { expect, testNode } from "./fixtures/test.js"
testNode({
name: "Interpolate Over Time Quaternion",
value: String.raw`
Begin Object Class=/Script/NiagaraEditor.NiagaraNodeFunctionCall Name="NiagaraNodeFunctionCall_160" ExportPath="/Script/NiagaraEditor.NiagaraNodeFunctionCall'/Engine/Transient.NewNiagaraScript:NiagaraScriptSource_0.NiagaraGraph_0.NiagaraNodeFunctionCall_160'"
FunctionScript="/Script/Niagara.NiagaraScript'/Niagara/Functions/Math/InterpolateOverTime_Quaternion.InterpolateOverTime_Quaternion'"
SelectedScriptVersion=5A6359E649629A32B6B4CA9D6A4CF08B
CachedChangeId=BD6C65FF48EE55BD0354208C6E7CFC5E
FunctionDisplayName="InterpolateOverTime_Quaternion"
ChangeId=AFBFC05C8AFD4E3D9256AB1181E12D82
NodePosX=544
NodePosY=-384
NodeGuid=12612978C2CC4F0BB84C22D4B4EEC3E1
CustomProperties Pin (PinId=A123640517EC4387958B42AE6AAAF9FA,PinName="Map",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraParameterMap'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=167B2B0C6E354603A988999007C19BA1,PinName="Rate Of Change",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraFloat'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=E6184BA334B24985A45FC5F9E73F81D2,PinName="FirstFrame",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraBool'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=1BDC577CF32A4990A7EEEB9AC3BBDAA2,PinName="Delta Time",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraFloat'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=7C1356D8BDD74EBBA569EB9E1905EA0D,PinName="Target Value",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/CoreUObject.Quat4f'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0.000,0.000,0.000,1.000",AutogeneratedDefaultValue="0.000,0.000,0.000,1.000",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=A57085A8B43144C1BCD7D67A81E09054,PinName="Initial Value",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/CoreUObject.Quat4f'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0.000,0.000,0.000,1.000",AutogeneratedDefaultValue="0.000,0.000,0.000,1.000",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=0A10BAB1865F442EA0BFE5F320469DE3,PinName="Map",Direction="EGPD_Output",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/Niagara.NiagaraParameterMap'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
CustomProperties Pin (PinId=3CF7483A34D64238BE6A3E9C20CE5111,PinName="Moving Average",Direction="EGPD_Output",PinType.PinCategory="Type",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.ScriptStruct'/Script/CoreUObject.Quat4f'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=True,bAdvancedView=False,bOrphanedPin=False,)
End Object
`,
size: [17, 13],
icon: null,
color: Configuration.nodeColors.darkerBlue,
pins: 8,
pinNames: [
"Map",
"Rate Of Change",
"First Frame",
"Delta Time",
"Target Value",
"Initial Value",
"Map",
"Moving Average",
],
delegate: false,
development: false,
additionalTest: async (node, pins) => {
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-glass"))).toBeFalsy()
expect(await node.evaluate(node => node.classList.contains("ueb-node-style-default"))).toBeTruthy()
expect(await pins[1].evaluate(p => p.entity.pinColor().cssText)).toBe(css`160, 250, 68`.cssText)
expect(await pins[2].evaluate(p => p.entity.pinColor().cssText)).toBe(css`146, 0, 0`.cssText)
expect(await pins[3].evaluate(p => p.entity.pinColor().cssText)).toBe(css`160, 250, 68`.cssText)
expect(await pins[4].evaluate(p => p.entity.pinColor().cssText)).toBe(css`0, 88, 200`.cssText)
expect(await pins[5].evaluate(p => p.entity.pinColor().cssText)).toBe(css`0, 88, 200`.cssText)
expect(await pins[7].evaluate(p => p.entity.pinColor().cssText)).toBe(css`0, 88, 200`.cssText)
},
})