Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Release v1.1.4 #917

Merged
merged 37 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
923d109
Add release notes for 1.1.2.4405
devinreams Jun 27, 2019
72d3d05
Bump version to 1.2.0
devinreams Jun 27, 2019
297f829
Add ignore to the flaky test. This needs to be fixed later. (#793)
Jun 27, 2019
17605c3
626, 627: Add kebab menu for delete (#764)
Jul 3, 2019
a4d1ccd
Import strings from android-l10n (#809)
Pike Jul 3, 2019
ec56009
806-uitest-add-delete (#808)
isabelrios Jul 8, 2019
87018f7
Adjust spinner dropdown size to fit longer words (l10n) (#812)
Jul 9, 2019
08cd126
Ellipsize text in item list (#811)
Jul 9, 2019
6fe2146
810: Reset support when syncing (#826)
Jul 10, 2019
9fcc7e1
Removing timeout to be fixed in #791 (#833)
Jul 16, 2019
bab9fe8
828-l10nScreenshotsTest-delete (#829)
isabelrios Jul 17, 2019
3942f6b
Add dot to sentence (#837)
suriyaa Jul 19, 2019
cd78e1b
814: Telemetry for sync (#835)
Jul 24, 2019
7905c2a
Update metrics docs to reflect telemetry sync changes (#841)
Jul 24, 2019
974a585
Revert delete PRs (#836)
Jul 24, 2019
f062807
Update to version 1.1.3 (#844)
Jul 25, 2019
65279d8
Update releases.md (#847)
Jul 26, 2019
19ddc12
Revert "Revert delete PRs (#836)" (#842)
Jul 30, 2019
4828903
816: string updates for localization (#852)
Jul 30, 2019
c7b1c50
Update app services, android components, and megazord configuration (…
Aug 13, 2019
b44f13c
Update Readme with l10n process (#872)
Delphine Aug 14, 2019
4a3226d
867 - Fix obvious NPE sync crash (#884)
jhugman Aug 22, 2019
49b230f
871: Create infrastructure for feature flags (#882)
Aug 26, 2019
3fe3294
Add telemetry probes to syncIfRequired trigger syncs (#887)
jhugman Aug 28, 2019
b738da0
Import strings from l10n (#893)
Aug 30, 2019
7b77b4e
791: Remove fake timeout from sync (#889)
Aug 30, 2019
fecc2f0
Fail fast if the edge between to routes is not in the nav graph. (#895)
jhugman Sep 2, 2019
5a83079
Auto-signin with mozilla AuthProvider (#879) — behind a feature flag.
jhugman Sep 3, 2019
c435688
628: edit view and routing (#843)
Sep 3, 2019
b07e161
Add fxalogin to autofill onboarding route. (#901)
Sep 4, 2019
fea2a77
798: routing back to itemlist on login/search/feedback forms (#890)
Sep 9, 2019
9799eb8
Add null text value for empty usernames (#902)
jhugman Sep 9, 2019
007216b
907 fix ui tests (#908)
isabelrios Sep 9, 2019
dc317a4
Update release-notes.md with v1.1.4
Sep 11, 2019
e1066c7
Merge branch 'production' into release-v1.1.4
Sep 11, 2019
e040a89
Fix lint errors
Sep 11, 2019
a472adb
Update release-notes.md to correct bitrise version
Sep 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ This project is governed by a [Code Of Conduct][coc-link].
To disclose potential a security vulnerability please see our
[security][security-link] documentation.

Localization happens on [Pontoon](https://pontoon.mozilla.org/projects/android-l10n/). Please get in touch with delphine (at) mozilla (dot) com directly for more information.

## [License][license-link]

This module is licensed under the [Mozilla Public License,
Expand Down
49 changes: 13 additions & 36 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ configurations.all { config ->
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation "androidx.recyclerview:recyclerview:$recyclerview_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
Expand All @@ -106,6 +106,7 @@ dependencies {
implementation "org.mozilla.components:lib-dataprotect:${rootProject.ext.android_components_version}"
implementation "org.mozilla.components:lib-fetch-httpurlconnection:${rootProject.ext.android_components_version}"
implementation "org.mozilla.components:lib-publicsuffixlist:${rootProject.ext.android_components_version}"
implementation "org.mozilla.components:support-rusthttp:${rootProject.ext.android_components_version}"
implementation "org.mozilla.components:support-rustlog:${rootProject.ext.android_components_version}"
implementation "org.mozilla.components:concept-sync:${rootProject.ext.android_components_version}"

Expand All @@ -118,8 +119,8 @@ dependencies {
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-alpha01'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-alpha03'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha03'
implementation "android.arch.navigation:navigation-fragment:$navigation_version"
implementation "android.arch.navigation:navigation-ui-ktx:$navigation_version"
implementation 'com.adjust.sdk:adjust-android:4.17.0'
Expand Down Expand Up @@ -151,6 +152,14 @@ dependencies {
androidTestImplementation 'br.com.concretesolutions:kappuccino:1.2.1'
ktlint "com.github.shyiko:ktlint:0.28.0"
androidTestImplementation "tools.fastlane:screengrab:1.2.0"
modules {
module('org.mozilla.appservices:full-megazord') {
replacedBy('org.mozilla.appservices:lockbox-megazord', 'prefer the lockbox megazord, to reduce final application size')
}
module('org.mozilla.appservices:lockbox-megazord') {
replacedBy('org.mozilla.appservices:lockbox-megazord-forUnitTests', 'prefer the forUnitTests variant if present')
}
}
}

sentry {
Expand Down Expand Up @@ -254,35 +263,3 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {

// Internal, but stable and convenient.
import org.gradle.api.internal.artifacts.DefaultModuleIdentifier

// This is the equivalent of what the `org.mozilla.appservices` Gradle plugin
// achieved, minus asserting that the versions of all the megazord components
// agree. That assertion could be added if required.
afterEvaluate {
// The definitions of the megazords themselves evolve: this set was determined from
// https://github.com/mozilla/application-services/blob/v0.27.0/megazords/lockbox/android/build.gradle#L79-L82,
// where the version in the URL is the tag corresponding to `mozilla_appservices_version`. This
// will need to be bumped when `android_components_version` (and thus
// `mozilla_appservices_version`) is rolled forward.
def megazord = DefaultModuleIdentifier.newId('org.mozilla.appservices', 'lockbox-megazord')
def megazordComponents = [
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'fxaclient'),
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'logins'),
DefaultModuleIdentifier.newId('org.mozilla.appservices', 'rustlog'),
]

configurations.each { configuration ->
configuration.resolutionStrategy.dependencySubstitution.all { dependency ->
if (dependency.requested instanceof ModuleComponentSelector) {
def moduleIdentifier = ((ModuleComponentSelector) dependency.requested).moduleIdentifier
if (megazordComponents.contains(moduleIdentifier)) {
def megazordVersion = rootProject.ext.mozilla_appservices_version
def substitution = "${megazord.group}:${megazord.name}:${megazordVersion}"
logger.lifecycle("In ${configuration}: substituting megazord module '$substitution' for component module" +
" '${moduleIdentifier.group}:${moduleIdentifier.name}:${dependency.requested.version}'")
dependency.useTarget(substitution)
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* 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 mozilla.lockbox.robots

import br.com.concretesolutions.kappuccino.actions.ClickActions
import br.com.concretesolutions.kappuccino.assertions.VisibilityAssertions
import mozilla.lockbox.R

// DeleteCredentialDisclaimer
class DeleteCredentialDisclaimerRobot : BaseTestRobot {

override fun exists() = VisibilityAssertions.displayed { id(R.id.alertTitle) }

fun tapCancelButton() = ClickActions.click { text(R.string.cancel) }
fun tapDeleteButton() = ClickActions.click { text("DELETE") }
}

fun deleteCredentialDisclaimer(f: DeleteCredentialDisclaimerRobot.() -> Unit) = DeleteCredentialDisclaimerRobot().apply(f)
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class ItemDetailRobot : BaseTestRobot {
fun toastIsDisplayed(id: Int, activityRule: ActivityTestRule<RootActivity>) =
onView(withText(id)).inRoot(withDecorView(not(`is`(activityRule.activity.getWindow().decorView))))
.check(matches(isDisplayed()))

fun tapKebabMenu() = ClickActions.click { id(R.id.kebabMenuButton) }
}

fun itemDetail(f: ItemDetailRobot.() -> Unit) = ItemDetailRobot().apply(f)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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 mozilla.lockbox.robots

import br.com.concretesolutions.kappuccino.actions.ClickActions
import br.com.concretesolutions.kappuccino.assertions.VisibilityAssertions
import mozilla.lockbox.R

// KebabMenu
class KebabMenuRobot : BaseTestRobot {
override fun exists() = VisibilityAssertions.displayed { text("Delete") }

fun tapEditButton() = ClickActions.click { text(R.string.edit) }
fun tapDeleteButton() = ClickActions.click { text(R.string.delete) }
}

fun kebabMenu(f: KebabMenuRobot.() -> Unit) = KebabMenuRobot().apply(f)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import mozilla.lockbox.R
class WelcomeRobot : BaseTestRobot {
override fun exists() = displayed { id(R.id.buttonGetStarted) }

fun tapGetStarted() = click { id(R.id.buttonGetStarted) }
fun tapGetStarted() = click { id(R.id.buttonGetStartedManually) }

fun tapSkipSecureYourDevice() = click { id(android.R.id.button2) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.rule.ActivityTestRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.espresso.Espresso.pressBack
Expand Down Expand Up @@ -76,6 +77,19 @@ open class ScreenshotsTest {
.check(matches(isDisplayed()))
Screengrab.screenshot("item-detail-screen")

onView(withId(R.id.kebabMenuButton)).perform(click())
Screengrab.screenshot("item-menu")

onView(withText(R.string.delete)).perform(click())
Screengrab.screenshot("item-delete-disclaimer")

onView(withText(R.string.cancel)).perform(click())
/* Edit Menu Not developed yet
onView(withId(R.id.kebabMenu)).perform(click())
onView(withText(R.string.edit)).perform(click())
Screengrab.screenshot("item-edit-menu")
*/

onView(withId(R.id.inputUsername)).perform(click())
Screengrab.screenshot("username-copied-screen")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ open class AppRoutePresenterTest {
navigator.gotoSettings()
navigator.back()
navigator.checkAtItemList()
navigator.back()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import mozilla.lockbox.R
import mozilla.lockbox.robots.itemDetail
import mozilla.lockbox.robots.itemList
import mozilla.lockbox.robots.kebabMenu
import mozilla.lockbox.robots.deleteCredentialDisclaimer
import mozilla.lockbox.view.RootActivity
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -40,4 +42,22 @@ open class ItemDetailsTest {
itemDetail { tapCopyPass() }
itemDetail { toastIsDisplayed(R.string.toast_password_copied, activityRule) }
}

@Test
fun deleteItem() {
navigator.gotoItemDetailKebabMenu()
kebabMenu { tapDeleteButton() }
// First tap on Cancel delete credencial
deleteCredentialDisclaimer { tapCancelButton() }
itemDetail { exists() }
// Now delete the credential
// Disabled until issue #807 is fixed
// and logins can be added after removal
/*
itemDetail { tapKebabMenu() }
kebabMenu { tapDeleteButton() }
deleteCredentialDisclaimer { tapDeleteButton() }
itemList { exists() }
*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import mozilla.lockbox.robots.fingerprintOnboardingScreen
import mozilla.lockbox.robots.fxaLogin
import mozilla.lockbox.robots.itemDetail
import mozilla.lockbox.robots.itemList
import mozilla.lockbox.robots.kebabMenu
import mozilla.lockbox.robots.lockScreen
import mozilla.lockbox.robots.onboardingConfirmationScreen
import mozilla.lockbox.robots.securityDisclaimer
Expand Down Expand Up @@ -292,6 +293,13 @@ class Navigator {
itemDetail { exists() }
}

fun gotoItemDetailKebabMenu(position: Int = 0) {
gotoItemList()
gotoItemDetail_from_itemList(position)
itemDetail { tapKebabMenu() }
kebabMenu { exists() }
}

fun back(remainInApplication: Boolean = true) {
closeSoftKeyboard()
try {
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/mozilla/lockbox/LockboxApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import com.adjust.sdk.Adjust
import com.adjust.sdk.AdjustConfig
import com.squareup.leakcanary.LeakCanary
import kotlinx.coroutines.ExperimentalCoroutinesApi
import mozilla.appservices.LockboxMegazord
import mozilla.appservices.Megazord
import mozilla.components.support.rusthttp.RustHttpConfig
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
import mozilla.components.support.base.log.Log
import mozilla.components.support.base.log.logger.Logger
Expand Down Expand Up @@ -77,7 +78,8 @@ open class LockboxApplication : Application() {
}

private fun setupDataStoreSupport() {
LockboxMegazord.init(lazy { HttpURLConnectionClient() })
Megazord.init()
RustHttpConfig.setClient(lazy { HttpURLConnectionClient() })
RustLog.enable()

FxASyncDataStoreSupport.shared.injectContext(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class LockboxAutofillService(
lateinit var dataStore: DataStore

override fun onConnected() {
dispatcher.dispatch(LifecycleAction.AutofillStart)
telemetryStore.injectContext(this)
accountStore.injectContext(this)
fxaSupport.injectContext(this)
dataStore = DataStore.shared
dispatcher.dispatch(LifecycleAction.AutofillStart)
}

override fun onDisconnected() {
Expand Down
Loading