Closed Bug 935052 Opened 11 years ago Closed 11 years ago

Reduce exposure to launch() method in tests

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(b2g-v1.2 fixed)

RESOLVED FIXED
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: zcampbell, Assigned: viorela)

Details

Attachments

(5 files, 5 obsolete files)

We know that launch() is a bit unreliable but similarly we also know that it takes some liberties by launching the app into user focus. This is an un-natural behaviour.

I think as an ongoing task we can slowly migrate some app objects over to use `self.apps.displayed_app` in some cases.

In some cases we will have to retain `launch()` but that is OK.

I'm going to start off with a patch to the gallery app object to show what kind of code and how we should do it all.
Attached file github pr (obsolete) —
Attachment #827458 - Flags: review?(florin.strugariu)
Attachment #827458 - Flags: review?(florin.strugariu) → review+
https://github.com/mozilla-b2g/gaia/commit/5663b202d9a901186f3b1037841a855721dd8bca
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Leave this open until we clear out as many `launch` from tests and apps as we can :)
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
I'll work on `Phone` app now
Attached file github pr (obsolete) —
Attachment #827458 - Attachment is obsolete: true
Attachment #827502 - Flags: review?(florin.strugariu)
As per my email of earlier today: This needs to be flagged for uplifting to v1.2. I think it makes sense to wait for all the apps to be updated, and then attach an additional PR to this bug for all of them in v1.2 at the end. Either that, or attach PRs for each cherry-picked commit as we go.

If we aren't vigilant about this on each and every bug we're going to end up with a mess again very soon.
Attachment #827502 - Flags: review?(florin.strugariu) → review+
Hi Zac and Bob,

Please refer to following two jobs. We found that Travis CI failed after 83300b7 merged.

9231f8a: https://travis-ci.org/mozilla-b2g/gaia/jobs/13547926
83300b7: https://travis-ci.org/mozilla-b2g/gaia/jobs/13549820

Could you please help check this? Thanks.
Flags: needinfo?(zcampbell)
Flags: needinfo?(bob.silverberg)
@Luke, the step that failed in Travis is the CI_ACTION=test_agent step, which has nothing to do with the Python tests that were affected by the merged pull request, so while it's true that Travis failed, it cannot be a result of that commit. I'm not even sure what the test_agent step is doing. Perhaps James can shed some light on that.
Flags: needinfo?(bob.silverberg) → needinfo?(jlal)
Flags: needinfo?(zcampbell)
Flags: needinfo?(jlal)
Attached file github pr (obsolete) —
Rob I think this better represents the intention of the code here.

See this bug comments for background information about why I'm doing this to the app objects/tests.
Attachment #830215 - Flags: review?(rwood)
Attachment #827502 - Attachment is obsolete: true
Attached file github pr (obsolete) —
Attachment #830229 - Flags: review?(florin.strugariu)
Attached file github pr (obsolete) —
Attachment #830244 - Flags: review?(florin.strugariu)
Attachment #830229 - Flags: review?(florin.strugariu) → review+
Attachment #830244 - Flags: review?(florin.strugariu) → review+
Comment on attachment 830215 [details] [review]
github pr

LGTM (I didn't actually run the code)
Attachment #830215 - Flags: review?(rwood) → review+
Attached file github pr
Attachment #830215 - Attachment is obsolete: true
Attachment #830229 - Attachment is obsolete: true
Attachment #830244 - Attachment is obsolete: true
Attachment #8334468 - Flags: review?(florin.strugariu)
Attachment #8334468 - Flags: review?(bob.silverberg)
Attachment #8334468 - Flags: review?(florin.strugariu) → review+
retested this and still OK
Attachment #8334468 - Flags: review?(bob.silverberg) → review+
Landed on master in https://github.com/mozilla-b2g/gaia/commit/80889faa46c3ce400cbfa748ce00791d796afcb2

This should be brought over to v1.2 as well.
I need this for another commit I'm trying to get into v1.2, so taking this for uplift.
Assignee: nobody → bob.silverberg
Oops, this isn't the one. Letting go for now.
Assignee: bob.silverberg → nobody
Assignee: nobody → viorela.ioia
Attachment #8338502 - Flags: review?(trifandreialin)
Attachment #8338502 - Flags: review?(bob.silverberg)
Attachment #8338502 - Flags: review?(andrei.hutusoru)
Attachment #8338502 - Flags: review?(trifandreialin)
Attachment #8338502 - Flags: review?(bob.silverberg)
Attachment #8338502 - Flags: review?(andrei.hutusoru)
Attachment #8338502 - Flags: review+
Landed on v1.2 in https://github.com/mozilla-b2g/gaia/commit/e396bf145c0759a5f1830e82853f9c015ad205bf
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Comment on attachment 8338996 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/14094

Uplift for v1.2
Comment on attachment 8339001 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/14095

Uplift for v1.2
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Comment on attachment 8339004 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/14096

Uplift to v1.2
All the uplifts have landed.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: