Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
fixing more reviewers comments
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelrios committed Oct 8, 2019
1 parent 2fc6eaf commit 0e3148f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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

import android.content.Context
import mozilla.components.service.fxa.ServerConfig

/**
* Utility to configure Firefox Account stage servers.
*/

object FxaServer {
const val CLIENT_ID = "a2270f727f45f648"
const val REDIRECT_URL = "https://accounts.stage.mozaws.net/oauth/success/$CLIENT_ID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class SyncIntegrationTest {
passwordInput.setText(passwordValue)
}

fun tapOnSygIn() {
fun tapOnSignIn() {
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
// hidden by the keyboard
Expand Down Expand Up @@ -159,7 +159,7 @@ class SyncIntegrationTest {
tapOnContinueButton()
typePassowrd()
sleep(TestAssetHelper.waitingTime)
tapOnSygIn()
tapOnSignIn()
}
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/org/mozilla/fenix/components/FxaServer.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/* 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

import android.content.Context
import mozilla.components.service.fxa.ServerConfig
import org.mozilla.fenix.Experiments
import org.mozilla.fenix.isInExperiment

/**
* Utility to configure Firefox Account servers.
*/

object FxaServer {
const val CLIENT_ID = "a2270f727f45f648"
const val REDIRECT_URL = "https://accounts.firefox.com/oauth/success/$CLIENT_ID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class BackgroundServicesTest {
val context = mockk<Context>(relaxed = true)

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
// 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
var backgroundServices = TestableBackgroundServices(context)
Expand Down

0 comments on commit 0e3148f

Please sign in to comment.