mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-17 11:44:44 +08:00
431 lines
37 KiB
JavaScript
431 lines
37 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("A", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_21"
|
|
InputKey=A
|
|
NodePosX=-304
|
|
NodePosY=96
|
|
NodeGuid=6259F5F555434903AC5C3C666F979944
|
|
CustomProperties Pin (PinId=CB98C983F3F1464DB10FB786E52E0722,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=D306257F70BF42C19140148BE5998EA3,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=2977AECB23E44F76A1F92E4DCE1EEE8C,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 A", () => expect(node.getNodeDisplayName()).to.be.equal("A"))
|
|
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("à", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_22"
|
|
InputKey=A_AccentGrave
|
|
NodePosX=-16
|
|
NodePosY=208
|
|
NodeGuid=D3DB357D428F46BBB529721239DD16DF
|
|
CustomProperties Pin (PinId=DB7FA89F149E4CE3B2A1F5F103A2C074,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=75FF129EE9094AD3867206DEB7E9D907,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=E6898EC029904C069C75CFBA94BED0D5,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 à", () => expect(node.getNodeDisplayName()).to.be.equal("à"))
|
|
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("è", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_23"
|
|
InputKey=E_AccentGrave
|
|
NodePosX=208
|
|
NodePosY=160
|
|
NodeGuid=63A85924985A4AA49975B74C27EB01D6
|
|
CustomProperties Pin (PinId=BE32B517D2734017AF0A84D6C359CD96,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=B448C54D91014BF29C40B66B20EFE35A,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=507B66F736234E55A68C49235B936DF6,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 è", () => expect(node.getNodeDisplayName()).to.be.equal("è"))
|
|
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("`", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_24"
|
|
InputKey=Tilde
|
|
NodePosX=-16
|
|
NodePosY=-176
|
|
NodeGuid=CC2D4F6041DC494C96C08DFBD618AC3A
|
|
CustomProperties Pin (PinId=70F444059B5847989EC789B5239F6BE0,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=5EC9A95245F344EF838C08813AD7B1EB,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=0019D9A7CD8C4338BB75677A00C56CDA,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 `", () => expect(node.getNodeDisplayName()).to.be.equal("`"))
|
|
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("F1", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/BlueprintGraph.K2Node_InputKey Name="K2Node_InputKey_25"
|
|
InputKey=F1
|
|
NodePosX=-432
|
|
NodePosY=-128
|
|
NodeGuid=2A1E4A0B00644BFABB41E79B9EEBA51F
|
|
CustomProperties Pin (PinId=34EA0464C8C0463782205148426AFB9D,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=196E5BC3CF0145EBB6501C56C58D0694,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=70E9187FED444AC392AE4AA4FD4A8F06,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 F1", () => expect(node.getNodeDisplayName()).to.be.equal("F1"))
|
|
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 §", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_9"
|
|
InputKey=Section
|
|
NodePosX=-448
|
|
NodePosY=192
|
|
NodeGuid=F77393EEC6EE474EB275F21B79D7AFFA
|
|
CustomProperties Pin (PinId=07B3CB6FEBC84F289CFE595A533AC588,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=9B870DCF5BB942EC8B2879ADD3C1C8D7,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=E303DAA129D744CB895FAAD13AD2E481,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=D7A0B7E8F10C42F0812EBD47E57C90A5,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.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 Debug Key §", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key §"))
|
|
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("Get Touchpad Button X 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_7"
|
|
InputAxisKey=Gamepad_Special_Left_X
|
|
bIsPureFunc=True
|
|
bIsConstFunc=True
|
|
FunctionReference=(MemberName="GetInputAxisKeyValue",bSelfContext=True)
|
|
NodePosX=-224
|
|
NodePosY=48
|
|
NodeGuid=3385984750554D07BCADFFD48CA3EC9F
|
|
CustomProperties Pin (PinId=C04D7513E97B4FB19ECEC736842C4B9C,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=4787139D40A543D7AA60CB927DFFA93C,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="Gamepad_Special_Left_X",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
|
CustomProperties Pin (PinId=ADD1CDAF5AB542C186B3054E28A3FB85,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.getNodes()[0]
|
|
})
|
|
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 Touchpad Button X Axis", () => expect(node.getNodeDisplayName()).to.be.equal("Get Touchpad Button X Axis"))
|
|
it("has a keyboard icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.keyboard))
|
|
it("has 1 pins", () => 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("Touch 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_28"
|
|
InputKey=Touch1
|
|
NodePosX=-144
|
|
NodePosY=-128
|
|
NodeGuid=2AE125437F1B48B3A849925138CD51D1
|
|
CustomProperties Pin (PinId=A6B5FC017A024EC3B258A048773DD301,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=576F12E928DF4FF48D4D1E1F05C9C661,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=7102CB8371BA4E8594ACECDAD1422A1C,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 Touch 1", () => expect(node.getNodeDisplayName()).to.be.equal("Touch 1"))
|
|
it("has a touchpad icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.touchpad))
|
|
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 Touch 10", () => {
|
|
/** @type {NodeElement} */
|
|
let node
|
|
|
|
before(() => {
|
|
blueprint.removeGraphElement(...blueprint.getNodes())
|
|
Utility.paste(blueprint, String.raw`
|
|
Begin Object Class=/Script/InputBlueprintNodes.K2Node_InputDebugKey Name="K2Node_InputDebugKey_10"
|
|
InputKey=Touch10
|
|
NodePosX=192
|
|
NodeGuid=85DC056DAA9A4DB78F7883B8F67DCF59
|
|
CustomProperties Pin (PinId=267ABB8DF21844FB8F6E0CFA990C4E5E,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=3FF391B8B11F4F26828B55863EFB48FD,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=41C4C9D9831148E087E7D7D86B6CCB2D,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=F0EC9017F23F4F73AF3E98AE46008C75,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.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 Debug Key Touch 10", () => expect(node.getNodeDisplayName()).to.be.equal("Debug Key Touch 10"))
|
|
it("has a touchpad icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.touchpad))
|
|
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("Steam Touch 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_29"
|
|
InputKey=Steam_Touch_1
|
|
NodePosX=80
|
|
NodePosY=-160
|
|
NodeGuid=E85D97EACB4F4B8B9F8A160A949BB9AD
|
|
CustomProperties Pin (PinId=D7E09AE1588B4E949F7C34798AED6758,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=CA4B72FE4D6F4F5DA503674A88F1872E,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=948BDBCF71EE4E36891EB8259D1C4E44,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 Debug Steam Touch 1", () => expect(node.getNodeDisplayName()).to.be.equal("Steam Touch 1"))
|
|
it("has a gamepad icon", () => expect(node.entity.nodeIcon()).to.be.deep.equal(SVGIcon.gamepad))
|
|
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",
|
|
]))
|
|
})
|
|
})
|