mirror of
https://github.com/status-im/desktop-ui-tests.git
synced 2025-01-11 13:24:22 +00:00
fix null parents issue
This commit is contained in:
parent
df3663eeab
commit
6b95b4ad46
@ -28,6 +28,13 @@ QtObject {
|
||||
}
|
||||
|
||||
function getObjectByObjectName(parent, objectName) {
|
||||
if (!parent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (parent.objectName === objectName) {
|
||||
return parent
|
||||
}
|
||||
for (var idx in parent.children) {
|
||||
var child = parent.children[idx]
|
||||
|
||||
|
@ -59,6 +59,7 @@ QtObject {
|
||||
headerNew.title = __helpers.getObjectByObjectName(hdr, "titleText")
|
||||
|
||||
var clbtn = __helpers.getObjectByObjectName(__helpers.getObjectByObjectName(target.contentItem, "closeButtonRectangle"))
|
||||
|
||||
var icon = __helpers.getObjectByObjectName(clbtn, "closeImage")
|
||||
var sensor = __helpers.getObjectByObjectName(clbtn, "closeSensor")
|
||||
headerNew.closeButton = cbComponent.createObject(null, {
|
||||
@ -69,6 +70,7 @@ QtObject {
|
||||
root.header = headerNew
|
||||
|
||||
root.contentItem = __helpers.getObjectByObjectName(target.contentItem, "contentParent")
|
||||
|
||||
root.footer = __helpers.getObjectByObjectName(target.contetItem, "footerParent")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user