mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-18 20:34:54 +08:00
WIP
This commit is contained in:
2
tests/fixtures/BlueprintFixture.js
vendored
2
tests/fixtures/BlueprintFixture.js
vendored
@@ -153,7 +153,7 @@ export default class BlueprintFixture {
|
||||
getSerializedNodes() {
|
||||
return this.blueprintLocator.evaluate(blueprint => {
|
||||
blueprint.selectAll()
|
||||
return blueprint.template.getCopyInputObject().getSerializedText()
|
||||
return blueprint.getSerializedText()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
149
tests/niagaraScriptVariables.spec.js
Normal file
149
tests/niagaraScriptVariables.spec.js
Normal file
File diff suppressed because one or more lines are too long
@@ -57,7 +57,7 @@ testNode({
|
||||
await expect(node.locator(".ueb-node-name")).toHaveText("Mask ( B A )")
|
||||
const resultSerialization = await blueprintPage.blueprintLocator.evaluate(blueprint => {
|
||||
blueprint.selectAll()
|
||||
return blueprint.template.getCopyInputObject().getSerializedText()
|
||||
return blueprint.getSerializedText()
|
||||
})
|
||||
const expectedSerialization = String.raw`
|
||||
Begin Object Class=/Script/UnrealEd.MaterialGraphNode Name="MaterialGraphNode_37" ExportPath="/Script/UnrealEd.MaterialGraphNode'/Engine/Transient.NewMaterial:MaterialGraph_0.MaterialGraphNode_37'"
|
||||
|
||||
@@ -38,7 +38,7 @@ testNode({
|
||||
await expect(inputs[3]).toContainText("-4.0")
|
||||
const resultSerialization = await blueprintPage.blueprintLocator.evaluate(blueprint => {
|
||||
blueprint.selectAll()
|
||||
return blueprint.template.getCopyInputObject().getSerializedText()
|
||||
return blueprint.getSerializedText()
|
||||
})
|
||||
const expectedSerialization = String.raw`
|
||||
Begin Object Class=/Script/NiagaraEditor.NiagaraNodeOp Name="NiagaraNodeOp_92" ExportPath="/Script/NiagaraEditor.NiagaraNodeOp'/Engine/Transient.NewNiagaraScript:NiagaraScriptSource_0.NiagaraGraph_0.NiagaraNodeOp_92'"
|
||||
|
||||
@@ -112,6 +112,39 @@ test("mergeArrays method test", () => {
|
||||
)).toStrictEqual(
|
||||
[2, 4, 5, 6, 8, 1]
|
||||
)
|
||||
expect(Utility.mergeArrays(
|
||||
[[0, ' '], [1, 'A'], [2, 'A'], [3, 'C']],
|
||||
[[2, 'B'], [3, 'C'], [4, 'D'], [5, 'E']],
|
||||
(l, r) => l[0] == r[0]
|
||||
)).toEqual(
|
||||
[[0, ' '], [1, 'A'], [2, 'A'], [3, 'C'], [4, 'D'], [5, 'E']]
|
||||
)
|
||||
expect(Utility.mergeArrays(
|
||||
[
|
||||
{ id: 3, b: 1, a: 3 },
|
||||
{ id: 7, b: 2, a: 9 },
|
||||
{ id: 4, b: -6, a: 12 },
|
||||
{ id: 9, b: 6, a: 20 },
|
||||
{ id: 6, b: 1, a: 26 },
|
||||
],
|
||||
[
|
||||
{ id: 4, b: -6, a: 12 },
|
||||
{ id: 6, b: 41, a: 76 },
|
||||
{ id: 3, b: 5, a: 31 },
|
||||
{ id: 13, b: 1, a: 22 },
|
||||
{ id: 9, b: 55, a: 39 },
|
||||
],
|
||||
(l, r) => l.id == r.id
|
||||
)).toEqual(
|
||||
[
|
||||
{ id: 3, b: 1, a: 3 },
|
||||
{ id: 7, b: 2, a: 9 },
|
||||
{ id: 4, b: -6, a: 12 },
|
||||
{ id: 9, b: 6, a: 20 },
|
||||
{ id: 6, b: 1, a: 26 },
|
||||
{ id: 13, b: 1, a: 22 },
|
||||
]
|
||||
)
|
||||
})
|
||||
|
||||
test("capitalFirstLetter method test", () => {
|
||||
|
||||
Reference in New Issue
Block a user