Check for entry_point as well as manifestURL in wait_to_be_displayed/wait_to_not_be_displayed

RESOLVED FIXED

Status

Firefox OS
Gaia::UI Tests
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: Martijn Wargers (dead))

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
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.

Updated

2 years ago
Assignee: nobody → manel.rhaiem92
Created attachment 8669435 [details] [review]
[gaia] mermi:bug-1204894 > mozilla-b2g:master
(Assignee)

Updated

2 years ago
Assignee: manel.rhaiem92 → martijn.martijn
(Assignee)

Comment 2

2 years ago
This is potentially a problem here:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py#41
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py#214
Except there, the wait_to_be_displayed()/wait_to_not_be_displayed() call is not implemented there.
(Assignee)

Comment 3

2 years ago
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"
Created attachment 8669938 [details] [review]
[gaia] mwargers:1204894 > mozilla-b2g:master
(Assignee)

Comment 5

2 years ago
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+
(Assignee)

Comment 7

2 years ago
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+
(Assignee)

Updated

2 years ago
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+
(Assignee)

Comment 10

2 years ago
Merged: https://github.com/mozilla-b2g/gaia/commit/aa72e81e2ef74fe92c7199f337cd514d108e409d
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.