Expose an `is_initialized` property to the dom for testability

RESOLVED DUPLICATE of bug 837670

Status

RESOLVED DUPLICATE of bug 837670
5 years ago
5 years ago

People

(Reporter: zcampbell, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 2

5 years ago
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 :)
(Reporter)

Comment 4

5 years ago
:D
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 837670
You need to log in before you can comment on or make changes to this bug.