mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 23:37:30 +08:00
New node type
This commit is contained in:
45
cypress/e2e/eventNodes.cy.js
Normal file
45
cypress/e2e/eventNodes.cy.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { generateNodeTest } from "../fixtures/testUtilities"
|
||||
import Blueprint from "../../js/Blueprint"
|
||||
import Configuration from "../../js/Configuration"
|
||||
import SVGIcon from "../../js/SVGIcon"
|
||||
|
||||
const tests = [
|
||||
{
|
||||
name: "MoveCharacterRandomLocation",
|
||||
subtitle: "Custom Event",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CustomEvent Name="K2Node_CustomEvent_4"
|
||||
CustomFunctionName="MoveCharacterRandomLocation"
|
||||
NodePosX=-368
|
||||
NodePosY=64
|
||||
NodeGuid=9C3BF2E5A27C4B45825C025A224639EA
|
||||
CustomProperties Pin (PinId=B563D2CC4FC67B5F348BE18F59F694A4,PinName="OutputDelegate",Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent=/Script/Engine.BlueprintGeneratedClass'"/Temp/Untitled_1.Untitled_C"',MemberName="MoveCharacterRandomLocation",MemberGuid=9C3BF2E5A27C4B45825C025A224639EA),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=0DE0B9A2469DB01A69BD5C8BB17D15BB,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Knot_8 C5BBC59C45ACF577B59616A9D79986B3,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
color: Configuration.nodeColors.red,
|
||||
icon: SVGIcon.event,
|
||||
pins: 2,
|
||||
delegate: true,
|
||||
development: false,
|
||||
},
|
||||
]
|
||||
|
||||
/** @type {Blueprint} */
|
||||
let blueprint
|
||||
|
||||
before(() => {
|
||||
cy.visit(`http://127.0.0.1:${Cypress.env("UEBLUEPRINT_TEST_SERVER_PORT")}/empty.html`, {
|
||||
onLoad: () => {
|
||||
cy.get("ueb-blueprint")
|
||||
.then(b => blueprint = b[0])
|
||||
.click(100, 300)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
tests.forEach(
|
||||
testObject => generateNodeTest(testObject, () => blueprint)
|
||||
)
|
||||
@@ -7,6 +7,7 @@ import SVGIcon from "../../js/SVGIcon"
|
||||
const tests = [
|
||||
{
|
||||
name: "Has Matching Gameplay Tag",
|
||||
subtitle: "Target is Gameplay Tag Asset Interface",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_Message Name="K2Node_Message_0"
|
||||
bIsPureFunc=True
|
||||
@@ -31,6 +32,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
name: "Can Jump",
|
||||
subtitle: "Target is Character",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_8"
|
||||
bIsPureFunc=True
|
||||
@@ -51,6 +53,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
name: "Set Finish On Message",
|
||||
subtitle: "Target is BTTask Blueprint Base",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_9"
|
||||
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/AIModule.BTTask_BlueprintBase"',MemberName="SetFinishOnMessage")
|
||||
@@ -137,6 +140,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
name: "Line Trace Component",
|
||||
subtitle: "Target is Primitive Component",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_23"
|
||||
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.PrimitiveComponent"',MemberName="K2_LineTraceComponent")
|
||||
@@ -204,6 +208,23 @@ const tests = [
|
||||
delegate: false,
|
||||
development: false,
|
||||
},
|
||||
{
|
||||
name: "Create Event",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CreateDelegate Name="K2Node_CreateDelegate_1"
|
||||
NodePosX=368
|
||||
NodePosY=-224
|
||||
NodeGuid=0FA4EE58928C4CF285441256561E250A
|
||||
CustomProperties Pin (PinId=4735A6AC4F9F7A3AFD64B2801F623052,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "CreateDelegate_ObjectInputName", "Object"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/CoreUObject.Object"',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=0A66F49740A5DDD42C1AECA040844EBF,PinName="OutputDelegate",PinFriendlyName=NSLOCTEXT("K2Node", "CreateDelegate_DelegateOutName", "Event"),Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,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,)
|
||||
End Object
|
||||
`,
|
||||
color: Configuration.nodeColors.green,
|
||||
icon: SVGIcon.node,
|
||||
pins: 2,
|
||||
delete: false,
|
||||
development: false,
|
||||
},
|
||||
]
|
||||
|
||||
/** @type {Blueprint} */
|
||||
|
||||
Reference in New Issue
Block a user