fixing more reviewers comments
parent
2fc6eaf5d4
commit
0e3148f0da
|
@ -1,8 +1,16 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
package org.mozilla.fenix.components
|
package org.mozilla.fenix.components
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import mozilla.components.service.fxa.ServerConfig
|
import mozilla.components.service.fxa.ServerConfig
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility to configure Firefox Account stage servers.
|
||||||
|
*/
|
||||||
|
|
||||||
object FxaServer {
|
object FxaServer {
|
||||||
const val CLIENT_ID = "a2270f727f45f648"
|
const val CLIENT_ID = "a2270f727f45f648"
|
||||||
const val REDIRECT_URL = "https://accounts.stage.mozaws.net/oauth/success/$CLIENT_ID"
|
const val REDIRECT_URL = "https://accounts.stage.mozaws.net/oauth/success/$CLIENT_ID"
|
||||||
|
|
|
@ -108,7 +108,7 @@ class SyncIntegrationTest {
|
||||||
passwordInput.setText(passwordValue)
|
passwordInput.setText(passwordValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun tapOnSygIn() {
|
fun tapOnSignIn() {
|
||||||
mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTime)
|
mDevice.wait(Until.findObjects(By.text("Sign in")), TestAssetHelper.waitingTime)
|
||||||
// Let's tap on enter, sometimes depending on the device the sign in button is
|
// Let's tap on enter, sometimes depending on the device the sign in button is
|
||||||
// hidden by the keyboard
|
// hidden by the keyboard
|
||||||
|
@ -159,7 +159,7 @@ class SyncIntegrationTest {
|
||||||
tapOnContinueButton()
|
tapOnContinueButton()
|
||||||
typePassowrd()
|
typePassowrd()
|
||||||
sleep(TestAssetHelper.waitingTime)
|
sleep(TestAssetHelper.waitingTime)
|
||||||
tapOnSygIn()
|
tapOnSignIn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
package org.mozilla.fenix.components
|
package org.mozilla.fenix.components
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -5,6 +8,10 @@ import mozilla.components.service.fxa.ServerConfig
|
||||||
import org.mozilla.fenix.Experiments
|
import org.mozilla.fenix.Experiments
|
||||||
import org.mozilla.fenix.isInExperiment
|
import org.mozilla.fenix.isInExperiment
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility to configure Firefox Account servers.
|
||||||
|
*/
|
||||||
|
|
||||||
object FxaServer {
|
object FxaServer {
|
||||||
const val CLIENT_ID = "a2270f727f45f648"
|
const val CLIENT_ID = "a2270f727f45f648"
|
||||||
const val REDIRECT_URL = "https://accounts.firefox.com/oauth/success/$CLIENT_ID"
|
const val REDIRECT_URL = "https://accounts.firefox.com/oauth/success/$CLIENT_ID"
|
||||||
|
|
|
@ -50,10 +50,10 @@ class BackgroundServicesTest {
|
||||||
val context = mockk<Context>(relaxed = true)
|
val context = mockk<Context>(relaxed = true)
|
||||||
|
|
||||||
every { context.isInExperiment(eq(Experiments.asFeatureWebChannelsDisabled)) } returns false
|
every { context.isInExperiment(eq(Experiments.asFeatureWebChannelsDisabled)) } returns false
|
||||||
// assertEquals("urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel", BackgroundServices.redirectUrl(context))
|
assertEquals("urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel", FxaServer.redirectUrl(context))
|
||||||
|
|
||||||
every { context.isInExperiment(eq(Experiments.asFeatureWebChannelsDisabled)) } returns true
|
every { context.isInExperiment(eq(Experiments.asFeatureWebChannelsDisabled)) } returns true
|
||||||
// assertEquals("https://accounts.firefox.com/oauth/success/a2270f727f45f648", BackgroundServices.redirectUrl(context))
|
assertEquals("https://accounts.firefox.com/oauth/success/a2270f727f45f648", FxaServer.redirectUrl(context))
|
||||||
|
|
||||||
every { context.isInExperiment(eq(Experiments.asFeatureSyncDisabled)) } returns false
|
every { context.isInExperiment(eq(Experiments.asFeatureSyncDisabled)) } returns false
|
||||||
var backgroundServices = TestableBackgroundServices(context)
|
var backgroundServices = TestableBackgroundServices(context)
|
||||||
|
|
Loading…
Reference in New Issue