Closed Bug 940306 Opened 11 years ago Closed 10 years ago

Expose an `is_initialized` property to the dom for testability

Categories

(Firefox OS Graveyard :: Gaia::Clock, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 837670

People

(Reporter: zcampbell, Unassigned)

Details

Both in the Python UI tests and the marionette js tests we suffer from intermittents of the tests starting before they're ready.

I suspect the most common one is tapping on id=alarm-new before the eventlistener has been applied to it and thus nothing happens.

If there were a bool property exposed letting us know when startup is complete (eg here https://github.com/mozilla-b2g/gaia/blob/master/apps/clock/js/startup.js#L22 ) 

then we could wait like (pseudo code):
for(marionette.execute_script(return window.wrappedJSObject.clock.is_initialized))

and then we are 100% sure that the app is ready to go and the test can proceed.
Hi Zac,

You might be interested in Bug 837633, which (although motivated by performance tests) would serve a similar purpose. You'll notice that it's a meta-bug with concrete bugs filed for each Gaia application, so this issue should already be on the minds of module owners.
Mike, yes that's exactly what we want but doesn't look like there's much action over there.

You and I need this sooner - can you nudge the clock owners?
You just did :)
:D
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.