/// import Blueprint from "../../../js/Blueprint" import Configuration from "../../../js/Configuration" import getFirstWordOrder from "../../fixtures/getFirstWordOrder" import NodeElement from "../../../js/element/NodeElement" import SVGIcon from "../../../js/SVGIcon" import Utility from "../../../js/Utility" /** @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) } }) }) context("Mouse X", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputAxisKeyEvent Name="K2Node_InputAxisKeyEvent_2" AxisKey=MouseX EventReference=(MemberParent=/Script/CoreUObject.Package'"/Script/Engine"') CustomFunctionName="InpAxisKeyEvt_MouseX_K2Node_InputAxisKeyEvent_2" NodePosX=16 NodePosY=384 NodeGuid=F7AA7D36A681494A9F28239D0FA8FB2D CustomProperties Pin (PinId=8525745F49DB46C9BBDA7549AB9CD8B5,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="InpAxisKeyEvt_MouseX_K2Node_InputAxisKeyEvent_2"),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=6273D30435714B84BD2139DB4FAFE72F,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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=E43D43763CD64E2CB1B030ECCEED6115,PinName="AxisValue",PinToolTip="Axis Value\nFloat (single-precision)",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="float",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,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has a delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.not.null) it("is called Mouse X", () => expect(node.getNodeDisplayName()).to.be.equal("Mouse X")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "AxisKey", "EventReference", "CustomFunctionName", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Mouse Y", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputAxisKeyEvent Name="K2Node_InputAxisKeyEvent_1" AxisKey=MouseY EventReference=(MemberParent=/Script/CoreUObject.Package'"/Script/Engine"') CustomFunctionName="InpAxisKeyEvt_MouseY_K2Node_InputAxisKeyEvent_1" NodePosX=-16 NodePosY=144 NodeGuid=FECB056F1DB940BAB4CA5D0BACCCC810 CustomProperties Pin (PinId=357A92FB93554066815AF1D9FFEE8849,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="InpAxisKeyEvt_MouseY_K2Node_InputAxisKeyEvent_1"),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=902EB1EFB0F44F8CBFD05C00589EB93B,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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=ECD6C7AC46BD47C88180B7198E2AF86B,PinName="AxisValue",PinToolTip="Axis Value\nFloat (single-precision)",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="float",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,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has a delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.not.null) it("is called Mouse Y", () => expect(node.getNodeDisplayName()).to.be.equal("Mouse Y")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "AxisKey", "EventReference", "CustomFunctionName", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Mouse XY 2D-Axis", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputVectorAxisEvent Name="K2Node_InputVectorAxisEvent_1" AxisKey=Mouse2D EventReference=(MemberParent=/Script/CoreUObject.Package'"/Script/Engine"') CustomFunctionName="InpAxisKeyEvt_Mouse2D_K2Node_InputVectorAxisEvent_1" NodePosX=-400 NodePosY=-48 NodeGuid=6284D3141C994B2C96E8B5340A2ED7DD CustomProperties Pin (PinId=8614C958A4AE42FA9B1869A33AC65514,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="InpAxisKeyEvt_Mouse2D_K2Node_InputVectorAxisEvent_1"),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=D60A6FEDB67B4058BA79A222336D15C2,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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=FE224D13A62244068DEC883DD8F918C1,PinName="AxisValue",PinToolTip="Axis Value\nVector",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/CoreUObject.Vector"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0, 0, 0",AutogeneratedDefaultValue="0, 0, 0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has a delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.not.null) it("is called Mouse XY 2D-Axis", () => expect(node.getNodeDisplayName()).to.be.equal("Mouse XY 2D-Axis")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "AxisKey", "EventReference", "CustomFunctionName", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Mouse Wheel Axis", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputAxisKeyEvent Name="K2Node_InputAxisKeyEvent_2" AxisKey=MouseWheelAxis EventReference=(MemberParent=/Script/CoreUObject.Package'"/Script/Engine"') CustomFunctionName="InpAxisKeyEvt_MouseWheelAxis_K2Node_InputAxisKeyEvent_2" NodePosX=240 NodeGuid=E3FF073E85B34FC4B188CD7BD68D6B9B CustomProperties Pin (PinId=5770618DFA054880BF33DD39844DE3F8,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="InpAxisKeyEvt_MouseWheelAxis_K2Node_InputAxisKeyEvent_2"),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=AEC4EBC2FF5744538B93F21321891828,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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=8490344E6BD94ED49267BC0C82317109,PinName="AxisValue",PinToolTip="Axis Value\nFloat (single-precision)",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="float",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,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has a delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.not.null) it("is called Mouse Wheel Axis", () => expect(node.getNodeDisplayName()).to.be.equal("Mouse Wheel Axis")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "AxisKey", "EventReference", "CustomFunctionName", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Left Mouse Button", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_16" InputKey=LeftMouseButton NodePosX=-224 NodePosY=128 NodeGuid=41CB459BE2E842F8981D1263CBCF48CB CustomProperties Pin (PinId=6F2EDC0B46FE4B53B031B674417B2F68,PinName="Pressed",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=DE99E9C67C1B4C70B9486BE43DE94813,PinName="Released",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=3078091B73C9484F920A32ABEC7F70E2,PinName="Key",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="None",AutogeneratedDefaultValue="None",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Left Mouse Button", () => expect(node.getNodeDisplayName()).to.be.equal("Left Mouse Button")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputKey", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Middle Mouse Button", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_17" InputKey=MiddleMouseButton NodePosX=144 NodePosY=64 NodeGuid=A9ED686DBFC54789A021351B379B76F2 CustomProperties Pin (PinId=7C3A115375134DE0BD811E52F246F7BF,PinName="Pressed",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=D28DC408DD34403292368A421E3F9011,PinName="Released",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=7B5F9C141CC34087B646A3360513B7CA,PinName="Key",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="None",AutogeneratedDefaultValue="None",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Middle Mouse Button", () => expect(node.getNodeDisplayName()).to.be.equal("Middle Mouse Button")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputKey", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Thumb Mouse Button 2", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_18" InputKey=ThumbMouseButton2 NodePosX=144 NodePosY=288 NodeGuid=031BA5DB71BA4F6ABC7F85DCFD34771D CustomProperties Pin (PinId=DC46CB8B47E0429FB58797DD9FAA9F48,PinName="Pressed",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=66F69216F2964D4C9ADD1997A46F9A76,PinName="Released",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=C80119035CCB451BA90DB5CFD6F98029,PinName="Key",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="None",AutogeneratedDefaultValue="None",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Thumb Mouse Button 2", () => expect(node.getNodeDisplayName()).to.be.equal("Thumb Mouse Button 2")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 3 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(3)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputKey", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Debug Key Thumb Mouse Button", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_7" InputKey=ThumbMouseButton NodePosX=-384 NodePosY=288 NodeGuid=A399E6224ADE4FCA957A949B4660E1C1 CustomProperties Pin (PinId=A4BEA026C1B741DDB6C690AD79683F0F,PinName="Pressed",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=A0CEF5BCEAD14E868B4227481755F5C5,PinName="Released",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,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=E977C11019F74CD8A15C467CA0B1C005,PinName="Key",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="None",AutogeneratedDefaultValue="None",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=ED934B47B72E4A94834897DCD89BABB3,PinName="ActionValue",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/EnhancedInput.InputActionValue"',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 `) node = blueprint.querySelector("ueb-node") }) it("is red", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.red)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Debug Key Thumb Mouse Button", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key Thumb Mouse Button")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 4 pins", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(4)) it("is development only", () => expect(node.entity.isDevelopmentOnly()).to.be.true) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputKey", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Get Mouse Y", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_GetInputAxisKeyValue Name="K2Node_GetInputAxisKeyValue_2" InputAxisKey=MouseY bIsPureFunc=True bIsConstFunc=True FunctionReference=(MemberName="GetInputAxisKeyValue",bSelfContext=True) NodePosX=-336 NodePosY=176 NodeGuid=03F17E5E722044968C2604B5C7DB96DF CustomProperties Pin (PinId=BAC6585AD74E46FB99497B33417089E8,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nActor Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.Actor"',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=True,bNotConnectable=True,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=EBD21E94C73B4648A6E42EEDAAECC25C,PinName="InputAxisKey",PinToolTip="Input Axis Key\nKey Structure",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=True,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="MouseY",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=FBB13F62789849748C804E02B8E147AD,PinName="ReturnValue",PinToolTip="Return Value\nFloat (single-precision)\n\nGets the value of the input axis key if input is enabled for this actor.",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="float",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,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is green", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.green)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Get Mouse Y", () => expect(node.getNodeDisplayName()).to.be.equal("Get Mouse Y")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 1 pin", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(1)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputAxisKey", "bIsPureFunc", "bIsConstFunc", "FunctionReference", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) }) context("Get Mouse Wheel Axis", () => { /** @type {NodeElement} */ let node before(() => { blueprint.removeGraphElement(...blueprint.getNodes()) Utility.paste(blueprint, String.raw` Begin Object Class=/Script/BlueprintGraph.K2Node_GetInputAxisKeyValue Name="K2Node_GetInputAxisKeyValue_0" InputAxisKey=MouseWheelAxis bIsPureFunc=True bIsConstFunc=True FunctionReference=(MemberName="GetInputAxisKeyValue",bSelfContext=True) NodePosX=-384 NodePosY=16 NodeGuid=2B1117A5318D40A7AF0DFDA50FEF1591 CustomProperties Pin (PinId=BFD2DE55F3DB4856ACFC0FE876450E0B,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.Actor"',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=True,bNotConnectable=True,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=5842E327DE3B4521B9B695133F2D5A8D,PinName="InputAxisKey",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/InputCore.Key"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=True,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="MouseWheelAxis",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) CustomProperties Pin (PinId=D277AF2C806C4B92857827918CA55B91,PinName="ReturnValue",Direction="EGPD_Output",PinType.PinCategory="real",PinType.PinSubCategory="float",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,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) node = blueprint.querySelector("ueb-node") }) it("is green", () => expect(node.entity.nodeColor()).to.be.deep.equal(Configuration.nodeColors.green)) it("has no delegate", () => expect(node.querySelector('.ueb-node-top ueb-pin[data-type="delegate"]')).to.be.null) it("is called Get Mouse Wheel Axis", () => expect(node.getNodeDisplayName()).to.be.equal("Get Mouse Wheel Axis")) it("has a mouse icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.mouse)) it("has 1 pin", () => expect(node.querySelectorAll("ueb-pin")).to.be.lengthOf(1)) it("is not development only", () => expect(node.entity.isDevelopmentOnly()).to.be.false) it("maintains the order of attributes", () => { blueprint.selectAll() const value = blueprint.template.getCopyInputObject().getSerializedText() expect(value).to.match(getFirstWordOrder([ "InputAxisKey", "bIsPureFunc", "bIsConstFunc", "FunctionReference", "NodePosX", "NodePosY", "NodeGuid", "CustomProperties", "CustomProperties", "CustomProperties", ])) }) })