mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:41:34 +08:00
866 lines
77 KiB
JavaScript
866 lines
77 KiB
JavaScript
/// <reference types="cypress" />
|
|
|
|
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("0", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_1"
|
|
InputKey=Zero
|
|
NodePosX=-304
|
|
NodePosY=176
|
|
NodeGuid=41FC4194F1E4436BB46EC8C1D83D0701
|
|
CustomProperties Pin (PinId=D4A5428B422F4D5085CF41DEAF73523E,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=B1A390663D2B404AAFF90D10273C78E1,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=0C9FF69AFEEE488F868AB3292050FCB0,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.getNodes()[0]
|
|
})
|
|
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 0", () => expect(node.getNodeDisplayName()).to.be.equal("0"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("1", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_0"
|
|
InputKey=One
|
|
NodePosX=-368
|
|
NodePosY=48
|
|
NodeGuid=92EF207924B8456FA773E70D4CB508B1
|
|
CustomProperties Pin (PinId=B97DD5E035664CC89443E493174A8643,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=B120EF5252EB4F029D420AD0B029AA57,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=51B6448364CD491B95C79EEDB5947F62,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.getNodes()[0]
|
|
})
|
|
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 1", () => expect(node.getNodeDisplayName()).to.be.equal("1"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("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_1"
|
|
InputKey=Two
|
|
NodePosX=-432
|
|
NodePosY=240
|
|
NodeGuid=E0E67B91FE9748C7BA46FD5A5875E1ED
|
|
CustomProperties Pin (PinId=C7064464390D411ABFE9427758A4DC81,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=7CC65DFE0C134968A856304AAE6B800D,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=D79D1BBE0C944B618E16600BAD151493,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.getNodes()[0]
|
|
})
|
|
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 2", () => expect(node.getNodeDisplayName()).to.be.equal("2"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("3", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_2"
|
|
InputKey=Three
|
|
NodePosX=-288
|
|
NodeGuid=86A598DB8EA1471C854A3233595FDD72
|
|
CustomProperties Pin (PinId=14495EF676334DE08F813AE8B458849A,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=0B11504E947F4FF184AC6371CB59D825,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=7493F1215705457980E294950C651ED7,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.getNodes()[0]
|
|
})
|
|
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 3", () => expect(node.getNodeDisplayName()).to.be.equal("3"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("4", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_4"
|
|
InputKey=Four
|
|
NodePosX=416
|
|
NodeGuid=C0E7B79B3B85408C9FFAFE71B71FD21F
|
|
CustomProperties Pin (PinId=28E3A745210949D0864CC441BB0F529C,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=F8A89129B85C44CABFC5082369EEDA65,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=00DE1A9A2AE249E681808177A2107D5A,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 4", () => expect(node.getNodeDisplayName()).to.be.equal("4"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("5", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_3"
|
|
InputKey=Five
|
|
NodePosX=-416
|
|
NodePosY=48
|
|
NodeGuid=1DC9EFC5D6B34E06839050946BAD178D
|
|
CustomProperties Pin (PinId=9D70C05D5C5941CAAC239B23BC11E648,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=790882DB7B64424CBB215644AED9EBBE,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=9A76A94DEB7E40E08EBD880DFADB212F,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 5", () => expect(node.getNodeDisplayName()).to.be.equal("5"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("6", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_5"
|
|
InputKey=Six
|
|
NodePosX=-192
|
|
NodePosY=112
|
|
NodeGuid=82C5BBFF6AAB4078931656A56DFC214F
|
|
CustomProperties Pin (PinId=A4F9728C256C4D0FB053E545EBB0FDE3,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=DF03428EF028466C948E0F2539C1AA2C,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=509DA3B4BFD84B2FB796CEFE709E3401,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 6", () => expect(node.getNodeDisplayName()).to.be.equal("6"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("7", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_6"
|
|
InputKey=Seven
|
|
NodePosX=-352
|
|
NodePosY=352
|
|
NodeGuid=C32CC49616194AAC923D2C59FB938447
|
|
CustomProperties Pin (PinId=6F69CCDA3E8042AD94D2CED0A400D23C,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=A34A7F4DA2F645F288C0F57A5E24DB8E,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=3E195C0ABA83425F813A4AB20817BBDE,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 7", () => expect(node.getNodeDisplayName()).to.be.equal("7"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("8", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_7"
|
|
InputKey=Eight
|
|
NodePosX=-384
|
|
NodePosY=256
|
|
NodeGuid=6AF0BCA97BBD467C84CD606C09F1BBAA
|
|
CustomProperties Pin (PinId=4020BE13AED349549BA94622B8EEF80E,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=8C4F484474D1432CBD77333B04D315F8,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=3C0D2A3E5E844466B752EDD6E2160271,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 8", () => expect(node.getNodeDisplayName()).to.be.equal("8"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("9", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_8"
|
|
InputKey=Nine
|
|
NodePosX=-160
|
|
NodePosY=288
|
|
NodeGuid=02A84586D4F842AB87578A8F6DECDFE1
|
|
CustomProperties Pin (PinId=F3EC3CC1CF984B15B391F75CD1B4ECC8,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=2A1785736115425489B80816B0D1AC82,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=6C6769AC5FFF4CDF98004FEE47E9A3FC,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 9", () => expect(node.getNodeDisplayName()).to.be.equal("9"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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 0", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_1"
|
|
InputKey=Zero
|
|
NodePosX=-304
|
|
NodePosY=192
|
|
NodeGuid=C07BBFC668144C4FB437B3F6B355E184
|
|
CustomProperties Pin (PinId=9F869036E3A744A8A43AA43A7620F55F,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=6E45643AF86B4A62A751A9B63A57862A,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=EC8FCA3A4A034EA59784E3A145C8DDCF,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=1F6919C3378A48EBBDEE77BD7F1F4E6A,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 0", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key 0"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Debug Key 4", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_2"
|
|
InputKey=Four
|
|
NodePosY=160
|
|
NodeGuid=10A6E414241D451ABCCDD93A5DC731EC
|
|
CustomProperties Pin (PinId=2F11C0CFA4334DC69E85B9E319A4535D,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=19A17B1886904EE7872288EA7750E0A0,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=C3166A5D6C914ACE9A897A8F95F832A3,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=411B9A362C694A60A29B2FA623CF1CD4,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 4", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key 4"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num 1", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_9"
|
|
InputKey=NumPadOne
|
|
NodePosX=-240
|
|
NodeGuid=1B61D1A914354095A8A8420B68656463
|
|
CustomProperties Pin (PinId=2F18160D6E56431D8A81ACD578E0131C,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=0957F9CBAC034E2EBD87B15904B75FF1,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=45805673C5CF4C80BB198F99EF1FEB24,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 Num 1", () => expect(node.getNodeDisplayName()).to.be.equal("Num 1"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num 6", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_10"
|
|
InputKey=NumPadSix
|
|
NodePosX=256
|
|
NodePosY=-32
|
|
NodeGuid=26F046FCA2394E5A975801CA389D6E18
|
|
CustomProperties Pin (PinId=450CA89B6E3348D8819EBA1315618F01,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=4F3B98C52357433E9436C29F86844F94,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=A5BFA728BEA7452B99D3A67DFB2E800E,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 Num 6", () => expect(node.getNodeDisplayName()).to.be.equal("Num 6"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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 Num 5", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_3"
|
|
InputKey=NumPadFive
|
|
NodePosX=16
|
|
NodePosY=-48
|
|
NodeGuid=FB21225080DF48DFB7A662369E470AA1
|
|
CustomProperties Pin (PinId=8540A18FD95D477C93035CDB3D2AE2B0,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=B8E224DBCEB1454B81EC9462A6DB5F06,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=D7B687EA384A4E81B45C9CFB0996989F,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=EC6AE35C9D9343E6965884DE97A9555A,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 Num 5", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key Num 5"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num +", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_11"
|
|
InputKey=Add
|
|
NodePosX=-176
|
|
NodePosY=-128
|
|
NodeGuid=5D4F157F72EC42B69CDB89CB6EEC507C
|
|
CustomProperties Pin (PinId=9EFDA67BE6D341B8BC6248F6AEFC75DB,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=35304E478D344F05B081FCA9C3271C52,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=22180FA7E6054064922D73E6BF50E23A,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 Num +", () => expect(node.getNodeDisplayName()).to.be.equal("Num +"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num -", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_12"
|
|
InputKey=Subtract
|
|
NodePosX=-480
|
|
NodePosY=128
|
|
NodeGuid=5DC438BC02904EC7B7252EC3A9E63E7E
|
|
CustomProperties Pin (PinId=EEF5174C8F8B4BBF999E26222C9F0003,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=C005CB1322CF4A39832A878229F790A4,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=58DC51053EC343BFA7033F833D7AEC4A,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 Num -", () => expect(node.getNodeDisplayName()).to.be.equal("Num -"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num *", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_13"
|
|
InputKey=Multiply
|
|
NodePosX=-304
|
|
NodePosY=368
|
|
NodeGuid=7B9AEEA6FD3D43BE9703A49FC653B3EE
|
|
CustomProperties Pin (PinId=13493EE95CF9461D82EBC6312E5FB99B,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=10E9155D52D340E59522D3004C684C58,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=BFC37A52F314418AAB75DFC22ACFC823,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 Num *", () => expect(node.getNodeDisplayName()).to.be.equal("Num *"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num /", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_14"
|
|
InputKey=Divide
|
|
NodePosX=-16
|
|
NodePosY=320
|
|
NodeGuid=3614847DFA5F4E029DDAEA817DF34A92
|
|
CustomProperties Pin (PinId=7A1E3D92081743D58198DFBC7F2B8A6E,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=6B03709D315C42229EF60E1CB72EC05F,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=49C225DB9A9A4054A3710C2C1A36B908,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 Num /", () => expect(node.getNodeDisplayName()).to.be.equal("Num /"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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("Num .", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_15"
|
|
InputKey=Decimal
|
|
NodePosX=352
|
|
NodePosY=-96
|
|
NodeGuid=572FFD40DB4541D497414E86EC4CC310
|
|
CustomProperties Pin (PinId=8A053F5C10A942F88E96C966ABD2CDFF,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=2E39E39C2F3D4F8F8DDBD0B04A30A23E,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=BE6CA5BA91FF4AB29D695D881E42EC8C,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 Num .", () => expect(node.getNodeDisplayName()).to.be.equal("Num ."))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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 Num *", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_6"
|
|
InputKey=Multiply
|
|
NodePosX=-128
|
|
NodePosY=144
|
|
NodeGuid=997A0FD2D9774330AF08F15369C56285
|
|
CustomProperties Pin (PinId=26A30BF9FBC446E6BEED77ACFC4ECF11,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=833512F46F464761ACC78C2555D654E5,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=ACACF4785ED34276B22969BA174904F2,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=AC8DDD237434456DA1802FD4C07EE2F5,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 Num *", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key Num *"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
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",
|
|
]))
|
|
})
|
|
})
|