Closed Bug 1225046 Opened 7 years ago Closed 5 years ago

Add Marionette test for launching FxA from Sync Settings

Categories

(Firefox OS Graveyard :: Sync, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID
2.6 S7 - 2/12

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

Attachments

(1 file)

FxA flow should be triggered from various places, including (now) the Sync settings menu.
Assignee: nobody → mbdejong
Target Milestone: --- → FxOS-S11 (13Nov)
Flags: needinfo?(ferjmoreno)
Flags: needinfo?(ferjmoreno) → needinfo?(jlorenzo)
Sorry, I'm not too familiar with Firefox Account. apps/system/fxa/test/marionette/lib/fxa.js has been set up by the Content Services team. They might be a good first contact. Redirecting to :rpapa.
Flags: needinfo?(jlorenzo) → needinfo?(rpappalardo)
(In reply to Michiel de Jong [:michielbdejong] from comment #2)
> Hi Fernando,
> 
> Any idea what I might be doing wrong here?
> https://github.com/mozilla-b2g/gaia/pull/33209/files#diff-
> 7b6abf173f47e146db6b0a2954664a3dR160

Not sure I can be much help here, but replied on github.
Flags: needinfo?(rpappalardo)
Target Milestone: FxOS-S11 (13Nov) → 2.6 S2 - 12/4
Discussed on IRC. The last revision I got was stuck because of the alerts used for debugging purpose. The element #get-started is indeed in the DOM, but not visible. waitForElement() checks if the element is displayed[1].

Once the alerts are removed, the tests pass and you can see the FxA panel popping up. Michiel rebased his patch and I got the 4 tests passing (and 1 pending).

Michiel hasn't tried yet, but one difference between my set up and his was the command line used. I used:
> FIREFOX_SYNC=1 TEST_FILES=apps/system/fxa/test/marionette/fxa_launch_test.js make test-integration 

Hence, the tests won't work until Firefox Sync is turned on regular builds, or we get a custom Sync build made on taskcluster.

[1] https://github.com/mozilla-b2g/gaia/blob/master/tests/jsmarionette/plugins/marionette-helper/index.js#L144
Hi Johan, do you know if TreeHerder will use build/config/phone/device.mk? It still seems to be failing there, see https://github.com/mozilla-b2g/gaia/pull/33209#issuecomment-159947361

> TEST-UNEXPECTED-FAIL | apps/system/fxa/test/marionette/fxa_launch_test.js | Firefox Accounts Launch Tests Should launch FxA flow from FxA-consuming apps: Sync settings

Can you see if the test still passes on your machine with my latest force-push?
Flags: needinfo?(jlorenzo)
Based on the logs[1], FIREFOX_SYNC is false. Like you suggested, I think build/config/phone/device.mk is used, the "phone" configuration is the default one[2].

IMO, you should try to make another suite under "Gij" for the Sync-specific tests. To do so, you can:
* Create a yml new file under tests/taskcluster/tasks/
* Make it inherit from [3]
* Add the FIREFOX_SYNC variable under "task > payload > env"
* Change the task symbol to something different from "Gij", it's under "task > extra > symbol".

Once that is done, your PR should now include the new task you created. BTW, I'm not a peer of the folder tests/taskcluster/tasks. I think you can ask :aus or :gaye to review this new task.

[1] https://public-artifacts.taskcluster.net/SEashiEOT7ayPqzoVk0lag/4/public/logs/live_backing.log
[2] https://github.com/mozilla-b2g/gaia/blob/10d344dbafdf0ed9e78467fee5944a52161f5bb1/Makefile#L106
[3] https://github.com/mozilla-b2g/gaia/blob/0e03613182ebf0c337464d08922e23033b594a99/tests/taskcluster/tasks/marionette_js_tests.yml
Flags: needinfo?(jlorenzo)
Target Milestone: 2.6 S2 - 12/4 → 2.6 S4 - 1/1
Status: NEW → ASSIGNED
Target Milestone: 2.6 S4 - 1/1 → 2.6 S6 - 1/29
Target Milestone: 2.6 S6 - 1/29 → 2.6 S7 - 2/12
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.