Closed Bug 1035941 Opened 11 years ago Closed 11 years ago

Add test for loading dialer

Categories

(Testing Graveyard :: Eideticker, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: gakiwate)

Details

(Keywords: perf, Whiteboard: [c=automation p= s=2014.07.18.t u=])

Attachments

(1 file, 2 obsolete files)

We currently have a bunch of eideticker loading tests, but none for the dialer. We should have one.
Keywords: perf
Priority: -- → P2
Whiteboard: [c=automation p= s= u=]
This might make a good first bug for Eideticker, since it's fairly simple and self-contained, and doesn't actually require a camera setup. Process: * Checkout and setup eideticker per https://github.com/mozilla/eideticker#installation * Edit src/tests/b2g/launching/manifest.ini and add a section for [dialer.py], modelled on the existing tests * Add a dialer.py file to the same directory, model it on browser.py. Edit the wait_for_content_ready method to use the logic here to wait for things to be displayed: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/apps/phone/regions/keypad.py#L28 * Test your changes by running runtest.py --no-sync-time --no-capture b2g-dialer-startup I may be missing a step or two, feel free to ask either davehunt (when he's back) or myself if you have questions. :)
Assignee: nobody → gautam.akiwate
Attachment #8458215 - Flags: review?(wlachance)
Comment on attachment 8458215 [details] [diff] [review] Bug-1035941-Add-test-for-loading-dialer.patch Review of attachment 8458215 [details] [diff] [review]: ----------------------------------------------------------------- LGTM!
Attachment #8458215 - Flags: review?(wlachance) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [c=automation p= s= u=] → [c=automation p= s=2014.07.18.t u=]
Comment on attachment 8458215 [details] [diff] [review] Bug-1035941-Add-test-for-loading-dialer.patch Review of attachment 8458215 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the post review/merge comments. I'm sure the code works as-is, but we might want to do some tidy up. ::: src/tests/b2g/launching/dialer.py @@ +11,5 @@ > +class Test(B2GAppStartupTest): > + > + def wait_for_content_ready(self): > + Wait(self.device.marionette).until(lambda m: self.device.gaiaApps.displayed_app.name == 'Phone') > + self.device.gaiaApps.switch_to_displayed_app() These shouldn't be necessary, as this is done before we call wait_for_content_ready. See https://github.com/mozilla/eideticker/blob/c6231a0978addd6a7f23c55816ab68d93f47f959/src/eideticker/eideticker/test.py#L595 @@ +13,5 @@ > + def wait_for_content_ready(self): > + Wait(self.device.marionette).until(lambda m: self.device.gaiaApps.displayed_app.name == 'Phone') > + self.device.gaiaApps.switch_to_displayed_app() > + keypad_toolbar_button = self.device.marionette.find_element(*Phone._keypad_toolbar_button_locator) > + Wait(self.device.marionette).until(lambda m: 'toolbar-option-selected' in keypad_toolbar_button.get_attribute('class')) This feels a little brittle to me. As the dialer app does not load content after launching, I think it would be safe to have a no-op for wait_for_content.
After speaking to Will, let's reopen this and follow-up with another patch based on comment 5. Would you mind taking this Gautam?
Status: RESOLVED → REOPENED
Flags: needinfo?(gautam.akiwate)
Resolution: FIXED → ---
(In reply to Dave Hunt (:davehunt) from comment #6) > After speaking to Will, let's reopen this and follow-up with another patch > based on comment 5. Would you mind taking this Gautam? Sure. So tentatively this is what we want? def wait_for_content_ready(self): pass
Flags: needinfo?(gautam.akiwate)
Attachment #8458215 - Attachment is obsolete: true
Attachment #8460323 - Flags: review?(wlachance)
Comment on attachment 8460323 [details] [diff] [review] Bug-1035941-Add-test-for-loading-dialer-no-op.patch Review of attachment 8460323 [details] [diff] [review]: ----------------------------------------------------------------- Yes, this is right. Could you put a quick comment in the method about this though?
Attachment #8460323 - Flags: review?(wlachance) → review+
Added comments explaining why we modified the test.
Attachment #8460323 - Attachment is obsolete: true
Attachment #8460979 - Flags: review?(wlachance)
Comment on attachment 8460979 [details] [diff] [review] Bug-1035941-Add-test-for-loading-dialer-no-op.patch Review of attachment 8460979 [details] [diff] [review]: ----------------------------------------------------------------- lgtm, thanks!
Attachment #8460979 - Flags: review?(wlachance) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
I've enabled the test in the dashboard.
(In reply to William Lachance (:wlach) from comment #13) > I've enabled the test in the dashboard. Checked into eideticker-ci: https://github.com/mozilla/eideticker-ci/commit/1b71f45f15695201439e10035b6563e3373c4531
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: