Commit Graph

71 Commits (48ea10cd9d62ae924757a528656265f5805019f1)

Author SHA1 Message Date
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
Kate Glazko 3370762248 For #13983: Show Only Completed Downloads in List 4 years ago
Kate Glazko f83372b67c For #349: View Downloads 4 years ago
Tiger Oakes a04b91ee3c
FNX-14513 ⁃ For #12862: Use concept-menu in library (#13332) 4 years ago
Kainalu Hagiwara 1ad9da09b0 Remove selection holder from bookmark viewholder constructors.
Now that we're passing the mode to the viewholders in their bind
methods, there's no real need to pass them into their constructors. This
also allows us to remove the indirection of having the adapter implement
the SelectionHolder interface and have the mode implement it directly.
4 years ago
Kainalu Hagiwara b1db1cf976 Add tests for Bookmarks DiffUtil and ViewHolders. 4 years ago
Kainalu Hagiwara 30c7b5ea5e For #12831 - Disable SwipeRefreshLayout while swiping a bookmark. 4 years ago
Kainalu Hagiwara 5318d64911 For #12906 - Fix swipe-to-delete bookmark folder. 4 years ago
Mihai-Eduard Badea 1823fdb66d
For issue #9949 - Bookmarks/History deletion inconsistencies (#12630)
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.

Co-authored-by: Mihai Eduard Badea <mihai.badea@softvision.ro>
4 years ago
Tiger Oakes a0491b702e
Fix nav graph and theme tests (#12567) 4 years ago
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 4 years ago
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 4 years ago
person808 ad90625b48 For #2165 - Add swipe to refresh gesture to bookmarks view. 4 years ago
Emily Kager 44ff29bdc0 Revert "For issue #9949 - Bookmarks/History deletion inconsistencies"
This reverts commit 3feab90b19.
4 years ago
David Walsh 3feab90b19 For issue #9949 - Bookmarks/History deletion inconsistencies
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.
4 years ago
person808 d14b39a56e For #2165 - Implement pull-to-refresh gesture to sync history. 4 years ago
Tiger Oakes f0295048fa Remove Mockito 4 years ago
Mihai Eduard Badea 02bd0cc203 For issue #8648 4 years ago
ekager 5d51c4f059 Don't use ProcessLifecycleOwner for view-tied consume 4 years ago
Grisha Kruglov 853a0acab4 Closes #4046: Always display 'Desktop' bookmarks folder
See https://github.com/mozilla-mobile/fenix/issues/4046 for a detailed discussion of this.

In short, this patch removes code that would conditionally hide desktop bookmarks depending
on the signed-in state of the browser.
4 years ago
Jeff Boek 4cbb9aebaf
Cleans up nav_graph.xml (#9829)
* For #9751 - Cleans up homeFragment directions

* For #9751 - Uses global actions for fragments not owned by homeFragment

* For #9751 - Cleans up SearchFragment directions

* For #9751 - Removes settings action from DeleteBrowsingDataFragment

* For #9751 - Removes browser action from SettingsFragment

* For #9751 - Adds ManagePhoneFeature global action

* For #9751 - Clean up unused deletebrowsingfragment actions

* For #9751 - Cleans Up HistoryFragment actions

* For #9751 - Removes Home -> Search action

* For #9751 - Removes the Bookmark -> Browser action

* For #9751 - Cleans up bookmark fragment actions

* For #9751 - Cleans up actions from ShareController

* For #9751 - Removes defaultBrowserFragment to browserFragment action

* For #9751 - Removes about -> browser action

* For #9751 - Adds global action to TrackingProtectionFragment

* For #9751 - Removes exception -> browser action

* For #9751 - Removes login -> browser action

* For #9751 - Fixes LoginFragment directions

* For #9751 - Removes ExternalAppBrowser directions

* for #9751 - Cleans up actions

* For #9751 - Fixes unit tests

* For #9751 - Addresses nits in PR
4 years ago
Michael Comella 376740cd2c For #9631: replace assertk assertions with junit.
I created a series of editor macros to do this with minimal errors (and
to do it quickly!).
4 years ago
Michael Comella 6e0d851da3 For #9605: replace unit test runners with FenixRobolectricTestRunner.
This is how we can apply the new test runner to remove duplication.

This commit was generated programmatically with the following commands:
```
  // Replace test runners with new one.
  find app/src/test -type f -exec gsed -i "s/@RunWith(RobolectricTestRunner::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +
  find app/src/test -type f -exec gsed -i "s/@RunWith(AndroidJUnit4::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +

  // Replace imports of old test runners with new one
  find app/src/test -type f -exec gsed -i "s/org.robolectric.RobolectricTestRunner/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +
  find app/src/test -type f -exec gsed -i "s/androidx.test.ext.junit.runners.AndroidJUnit4/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +

  // Remove unused imports
  find app/src/test -type f -exec gsed -i "/@Config(application = TestApplication::class)/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.mozilla.fenix.TestApplication/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.robolectric.annotation.Config/d" {} +
```

Where gsed is the GNU version of sed installed via homebrew. After
running these commands, I need to manually clean up the following files:
- FenixRobolectricTestRunner
- LocaleManagerExtensionTest
4 years ago
Mugurell 9f3bbf1fb7 For #8651 - Add HistoryInteractor/Controller unit/ui tests 4 years ago
Jeff Boek cbad832b19 For #8153 - Allow web-extensions to open tabs in correct browsing mode 4 years ago
Jeff Boek 541bcf072a Reverts all BrowsingModeManager changes 4 years ago
Emily Kager 39db8c9557
For #8470 - Fix Unit Tests MockKExceptions (#8471) 4 years ago
Simon Chae 2c01022c4b For #8153: Allow web-ext to open new tabs in correct browsing mode 4 years ago
Sawyer Blatz c7c4ad051a
For #6413: Adds more snackbar positioning logic (#7444)
* For #6413: Adds more snackbar positioning logic

* Refactor
4 years ago
Sawyer Blatz 3fb060f682
For #6413: Fixes snackbar positionining for bottom toolbar (#7415)
* For #6413: Fixes snackbar positionining for bottom toolbar

* For #6413: Cleans up snackbar usage
4 years ago
Suraj Shah 6344a8892d For #7041 - Respect current mode when opening library items (#7311)
* Fixes #7041
Consumes `browserMode` from home activity for tap method of bookmark

* Fixes spaces

* Cleaning tests

* Cleaning tests
4 years ago
Tiger Oakes ea486d7c66
Split out CustomTabToolbarIntegration (#7107) 4 years ago
Afzal Najam b9656a978e Hide add folder option when in Desktop Bookmarks folder 4 years ago
shldhll 8e17ac05b1 Optimized imports. Closes #5876 5 years ago
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 5 years ago
Tiger Oakes ee1f040e53 No issue: Move signedIn tracking to BookmarksSharedViewModel (#4755) 5 years ago
Severin Rudie dffa61bf16 Closes #4513: fixes bookmark tests broken by loading change
Note that BookmarkFragmentStoreTest changes preserve existing behavior, which in many cases is more expansive than the test name implies
5 years ago
Severin Rudie fd7f1b2665 Closes #4513: adds tests for bookmark loading state 5 years ago
Colin Lee de93b05cac For #2754 Add tab cards to share sheet (#5493)
* For #2754 Add tab cards to share sheet

* For #2754: Fix background near rounded corners and ShareButtonAppearanceTest

* Add license to share_tab_item
5 years ago
Tiger Oakes e3c60faf24 Move BookmarkNode extensions to helper class (#4752) 5 years ago
Tiger Oakes d0ef2d40c2 Move bookmark navigation listener to separate file 5 years ago
Sebastian Kaspari 2723a55b03 Rename HistoryStore/State/Action to HistoryFragmentStore/State/Action. 5 years ago
Sebastian Kaspari 76063e307a Rename BookmarkStore/State/Action to BookmarkFragmentStore/State/Action. 5 years ago
Sourabh 091778a4b9 For #4398 - add HistoryController (#4837) 5 years ago
Tiger Oakes c475bc87cf Move classes out of top-level package 5 years ago
Jeff Boek e601fe7c9f For #4326 - Updates codebase to support latest version of ktlint 5 years ago
Emily Kager c1b1c2f332 For #3967 - Invokes pending deletion with more bookmark actions (#4522) 5 years ago
Mugurell 645674c9bd Closes #4396 - Add a Bookmarks Controller (#4593)
* For #4396 - Rename BookmarkInteractor methods

Following the naming model used in other Interactors this too will use reactive
method names in the form of "on..." instead of the previous imperative model.

Kept the imperative naming model for the methods from `SelectionInteractor` as
they are a new addition and I'm not sure about the future direction.

* For #4396 - Add a BookmarkController

It abstracts the Fragment behavior in a contract through which various
Interactors can inform about the specific View changes and can ask for
modifications in their container Fragment.

This contract and it's implementation - `DefaultBookmarkController` are the
result of extracting the container Fragment's business logic from
`BookmarkFragmentInteractor` in it's own standalone component.

* For #4396 - Refactored Bookmark related tests

Added a new `BookmarkControllerTest` tests class which complements the new
`BookmarkController` to ensure that it properly operates on `BookmarkFragment`

Also refactored the existing `BookmarkFragmentInteractorTest` to accommodate
`BookmarkFragmentInteractor`'s now more specialized behavior.
5 years ago
Grisha Kruglov 634ee184a6 No issue: add some BookmarkFragmentInteractor tests 5 years ago
Sawyer Blatz da06b0fb15
For #4508: Treats warnings as errors (#4543) 5 years ago