When the canvas published app is initialized >> there could be a delay in registration of published app JSSDK.
If the TestEngine functions including getAppStatus is executed it returns COMMAND NOT FOUND error >> which in turn is interpreted as published app Test Engine JSSDK not found >> though it is still in process.
PROPOSAL
Call TestEngine ready function from TE before any other functions are executed. This way the rest of the functions >> registered (in the app side) before executing them.
With this implementation, lifecycle of TE function execution would look like
Run TE >> execute ready function successfully >> execute other function like getAppStatus..
We just need to make sure TE continue supporting old apps (back compatibility >> older apps won't have this new ready function).
SUPPORTING DIFFERENT SCENARIOS
Webplayer app and published app versions with no testEngineReady() >> Continue test execution.
Webplayer app version with testEngineReady() and published app with no testEngineReady() >> Continue test execution.
Webplayer app version with no testEngineReady() >> Continue test execution.
Webplayer and published app with testEngineReady() >> Continue if true returned, else appropriate error codes are thrown in this case and handled appropriately.
Checklist
[x] The code change is covered by unit tests. I have added tests that prove my fix is effective or that my feature works
[x] I have performed end-to-end test locally.
[x] New and existing unit tests pass locally with my changes
[x] I have commented my code, particularly in hard-to-understand areas
PROPOSAL
We just need to make sure TE continue supporting old apps (back compatibility >> older apps won't have this new ready function).
SUPPORTING DIFFERENT SCENARIOS
Checklist