Closed Bug 1100342 Opened 10 years ago Closed 10 years ago

Engineering builds need a different app_id for the Facebook app

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: martijn.martijn, Unassigned)

References

Details

From bug 1018307, comment 14:
"
As the "Firefox OS - Test" app (app_id=874414049252748) is too recent compared to the production one, Jose and Francisco came up with another solution: use the app that Telefónica uses for automation (app_id=323630664378726).

I created a new test user (name=Gaia UI Tests, email=gaia_dxnzuri_tests@tfbnw.net) with 5 friends, changed the AppID and logged in with it; it works like a charm.

Martijn, I guess we're ready to ask to change an the AppID for the engineering build.
"

So for being able to do automated testing on the Facebook app, we need to have the engineering builds to use app_id=323630664378726.
Gerry, do you know what needs to be changed here in the build system to get app_id=323630664378726?

I guess we need to change things somewhere around here:
http://mxr.mozilla.org/gaia/source/build/config/communications_services.json
http://mxr.mozilla.org/gaia/source/build/contacts-import-services.js#29

I don't know if this will affect unit tests.
Flags: needinfo?(gchang)
This might need Gaia developer's help on this. 
Hi Rudy,
Do you know who is the right contact for this?
Flags: needinfo?(gchang) → needinfo?(rlu)
I think we should change the following line to assign a different app ID for eng. build.
http://mxr.mozilla.org/gaia/source/build/contacts-import-services.js#29

Redirect the ni to build experts to confirm this.

George, could you or Ricky help on this?
Thank you.
Flags: needinfo?(gduan)
Flags: needinfo?(rlu)
Rudy is right. Just modify "build/contacts-import-services.js#29" can work.
Flags: needinfo?(gduan)
(In reply to Ricky Chien [:rickychien] from comment #4)
> Rudy is right. Just modify "build/contacts-import-services.js#29" can work.

Ricky, so that would only change it for the engineering build?
It would also be nice if this would work for the b2g desktop build, because this test could also run there. Does that need a chance here? http://mxr.mozilla.org/gaia/source/build/config/communications_services.json#7
Flags: needinfo?(ricky060709)
It doesn't only change in engineering build but also change the others.

Take [1] for example. We set facebook.applicationId = 395559767228801 if someone pass OFFICIAL=1.

If they don't, we will take the default applicationId (123456) from build/contacts-import-services.js#29

So you can modify both of them in your branch depend on what you want.


[1] http://mxr.mozilla.org/gaia/source/build/contacts-import-services.js#29
Flags: needinfo?(ricky060709)
I want to have an automated gaia-ui test for facebook import (bug 1086680).

Iiuc, engineering builds on Flame have OFFICIAL=1 set, since facebook works fine there.
I only want to change this for testing purposes, this can't and shouldn't change for official builds at all.

So I guess I need to find a different solution, because I don't know if you can discern between engineering builds and user builds? Or can I use config.PRODUCTION for that?
Flags: needinfo?(ricky060709)
If you need to change appId for your testing, it would be improperly to change appId from contacts-import-services.js#29. We should create a new API for supporting your test. Let you customize different appId in variant test state you want.

Please ni me again if above described is correct.
Flags: needinfo?(ricky060709)
(In reply to Ricky Chien [:rickychien] from comment #8)
> If you need to change appId for your testing, it would be improperly to
> change appId from contacts-import-services.js#29. We should create a new API
> for supporting your test. Let you customize different appId in variant test
> state you want.
> 
> Please ni me again if above described is correct.

Yeah, I think customizing the appId for testing is the way to go. I guess Marionette should be able to handle that, the ability to change facebook.applicationId. Or it should be possible to change the parameters.js file before the test is run or something like that.
Flags: needinfo?(ricky060709)
Flags: needinfo?(dave.hunt)
Yeah, just modify the parameters.js is a better way to change appId without any build system changes.
I think that it is feasible to read and modify the parameters.js whatever in Marionette or Python UI test.
Flags: needinfo?(ricky060709)
(In reply to Martijn Wargers [:mwargers] (QA) from comment #9)
> (In reply to Ricky Chien [:rickychien] from comment #8)
> > If you need to change appId for your testing, it would be improperly to
> > change appId from contacts-import-services.js#29. We should create a new API
> > for supporting your test. Let you customize different appId in variant test
> > state you want.
> > 
> > Please ni me again if above described is correct.
> 
> Yeah, I think customizing the appId for testing is the way to go. I guess
> Marionette should be able to handle that, the ability to change
> facebook.applicationId. Or it should be possible to change the parameters.js
> file before the test is run or something like that.

Sorry, what is the info you need from me here? If we need to push alternative files to the device we can do that but it would be better if we can make this change simply by executing JavaScript, which Marionette can do.
Flags: needinfo?(dave.hunt)
We found a workaround, so this bug is not really needed anymore.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.