Closed Bug 1204894 Opened 9 years ago Closed 9 years ago

Check for entry_point as well as manifestURL in wait_to_be_displayed/wait_to_not_be_displayed

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

Details

Attachments

(2 files)

The Phone and Contacts app both have the same manifestURL, e.g. app://communications.gaiamobile.org/manifest.webapp

That means that wait_to_be_displayed/wait_to_not_be_displayed are not working well in that case, because that only checks for manifestURL, which means that either the Phone or Contacts app can be displayed.
The check should include the entry_point for the app object, if it's there.
But I don't think that's currently in the GaiaApps.getDisplayedApp in gaia_apps.js, so it would need to be added there, as well, in some way.

I guess if bug 1135340 gets fixed, then this isn't needed anymore.
Assignee: nobody → manel.rhaiem92
Assignee: manel.rhaiem92 → martijn.martijn
window.Service.query('getTopMostWindow') in the system app returns a whole bunch, but I don't see anything with entryPoint in it.
It looks like the .manifest.launch_path:"/dialer/index.html#keyboard-view" is what we need.
For contacts, it's: launch_path:"/contacts/index.html"
Comment on attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master

So something like this, I think.
Please ignore the console.log calls for now, I'll remove those.
I didn't fix this for installed_apps and running_apps for now, it's not really needed for here, really.
The thing in tap_done in contact_form.py also could use improvement, but I'll leave that for now as well.
Attachment #8669938 - Flags: feedback?(jlorenzo)
Comment on attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master

I'm not sure the case where an app has no entry point is correctly handled (see comments in PR), but that's the way to go, I believe.
Attachment #8669938 - Flags: feedback?(jlorenzo) → feedback+
Comment on attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master

Ok, updated the pull request, removed the prints/console.logs and added one check, so it works for browser too.
Regarding your comment in the pull request, I don't think we need the extra null check for entryPoint, because we also pass null when entryPoint doesn't exist, see:
http://mxr.mozilla.org/gaia/source/tests/atoms/gaia_apps.js#308
308         app.launch(entryPoint || null);
Attachment #8669938 - Flags: review?(jlorenzo)
Comment on attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master

Looks fine to me. There is one small nit I noticed while running adb logcat. It's not blocker though.

I tested with Gallery (no entry point), Dialer and Conctacts, they were lunching fine and the logs (once corrected) looked coherent.
Attachment #8669938 - Flags: review?(jlorenzo) → review+
Attachment #8669938 - Flags: review+ → review?(jlorenzo)
Comment on attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master

The template strings are great. They are correctly displayed in the logcat. Thanks for the link you gave me on IRC https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/template_strings
Attachment #8669938 - Flags: review?(jlorenzo) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/aa72e81e2ef74fe92c7199f337cd514d108e409d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: