fix: problem with Analytics on iOS
Closed this issue · 0 comments
igorgiumellizup commented
Description
The analytics tests are failing on iOS. There might be a relation with this PR in the Beagle backend project.
Refer to project beagle-tests to simulate the problem:
1 - Start the bff server in folder bff-server
2 - Start the iOS app in folder appium/app-ios and type the url http://localhost:8080/anaytlics2. The screen won't render as shown bellow:
log:
2021-09-21 14:58:38.085729-0300 AppiumApp[5356:99713] [Network]
BeagleSDK: ***HTTP REQUEST***:
Url= http://localhost:8080/analytics2
HttpMethod= GET
Headers= ["beagle-platform": "IOS", "Content-Type": "application/json"]
Body=
2021-09-21 14:58:38.929277-0300 AppiumApp[5356:101681] [Network]
BeagleSDK: ***HTTP RESPONSE***
StatusCode= 200
Body= {
"_beagleComponent_" : "beagle:screenComponent",
"child" : {
"_beagleComponent_" : "beagle:container",
"children" : [ {
"_beagleComponent_" : "beagle:text",
"text" : "Analytics 2.0"
}, {
"_beagleComponent_" : "beagle:button",
"text" : "Alert with no specific analytics configuration",
"onPress" : [ {
"_beagleAction_" : "beagle:alert",
"title" : "Alert Title",
"message" : "AlertMessage",
"onPressOk" : [ {
"_beagleAction_" : "beagle:openNativeRoute",
"route" : "screen-analytics-link",
"shouldResetApplication" : true,
"analytics" : false
} ]
} ]
}, {
"_beagleComponent_" : "beagle:button",
"text" : "Confirm with analytics local configuration",
"onPress" : [ {
"_beagleAction_" : "beagle:confirm",
"title" : "Confirm Title",
"message" : "Confirm Message",
"onPressOk" : [ {
"_beagleAction_" : "beagle:openNativeRoute",
"route" : "screen-analytics-link",
"shouldResetApplication" : true,
"analytics" : false
} ],
"labelOk" : "Accept",
"labelCancel" : "cancel",
"analytics" : true
} ],
"id" : "_beagle_5"
}, {
"_beagleComponent_" : "beagle:button",
"text" : "Alert with remote analytics configuration",
"onPress" : [ {
"_beagleAction_" : "beagle:alert",
"title" : "Alert Title",
"message" : "AlertMessage",
"onPressOk" : [ {
"_beagleAction_" : "beagle:openNativeRoute",
"route" : "screen-analytics-link",
"shouldResetApplication" : true,
"analytics" : false
} ],
"analytics" : {
"attributes" : [ "message" ]
}
} ],
"id" : "_beagle_6"
}, {
"_beagleComponent_" : "beagle:button",
"text" : "Confirm with disabled analytics configuration",
"onPress" : [ {
"_beagleAction_" : "beagle:confirm",
"title" : "Confirm Title",
"message" : "Confirm Message",
"onPressOk" : [ {
"_beagleAction_" : "beagle:openNativeRoute",
"route" : "screen-analytics-link",
"shouldResetApplication" : true,
"analytics" : false
} ],
"labelOk" : "Accept",
"labelCancel" : "cancel",
"analytics" : false
} ]
}, {
"_beagleComponent_" : "beagle:button",
"text" : "navigateToPage",
"onPress" : [ {
"_beagleAction_" : "beagle:pushView",
"route" : {
"screen" : {
"_beagleComponent_" : "beagle:screenComponent",
"id" : "/analytics2-navigate",
"child" : {
"_beagleComponent_" : "beagle:button",
"text" : "navigate to local screen",
"onPress" : [ {
"_beagleAction_" : "beagle:openNativeRoute",
"route" : "screen-analytics-link",
"shouldResetApplication" : false,
"analytics" : false
} ]
}
}
},
"analytics" : false
} ]
} ]
}
}
Headers= [AnyHashable("Content-Type"): application/json, AnyHashable("Content-Length"): 3181, AnyHashable("Date"): Tue, 21 Sep 2021 17:58:38 GMT, AnyHashable("Vary"): Origin, Access-Control-Request-Method, Access-Control-Request-Headers, AnyHashable("Connection"): keep-alive, AnyHashable("Keep-Alive"): timeout=60]