This effect occurs due to this check in deviceDetectionOnPremise.js:
if (!updateOnStart) {
// Not updating on start. Initialise the engine straight away
this.initEngine();
}
It starts the engine if updateOnStart is not needed, otherwise it expects that the updateOnStart will complete and then the engine will be started in the refresh function:
However in the case that data file update was not needed or the download was not successful - the engine will never start... The current workaround is to set updateOnStart: false in case the provided data file is up to date.
Objective
Guarantee that engine always starts independently of the value of updateOnStart flag. The engine should start with updateOnStart happening after it has started.
Test
First need to simulate / mock the scenario where Update is not needed and assert that engine exists and is started - so the test fails. Then introduce the fix that would make the test green..
Background
This effect occurs due to this check in deviceDetectionOnPremise.js:
It starts the engine if updateOnStart is not needed, otherwise it expects that the updateOnStart will complete and then the engine will be started in the
refresh
function:However in the case that data file update was not needed or the download was not successful - the engine will never start... The current workaround is to set
updateOnStart: false
in case the provided data file is up to date.Objective
Guarantee that engine always starts independently of the value of
updateOnStart
flag. The engine should start with updateOnStart happening after it has started.Test
First need to simulate / mock the scenario where
Update is not needed
and assert that engine exists and is started - so the test fails. Then introduce the fix that would make the test green..cc: @Tracy51D