Commit Graph

689 Commits (84cf2472a82237b931aaa808654d14547e9935d7)

Author SHA1 Message Date
AndiAJ d4ce149c3e Improve coverage for verifyAboutFirefoxPreview 3 years ago
Gabriel Luong 66a31ddbfc Issue #21099 - Update items under "Jump back in" section to the latest designs 3 years ago
AndiAJ abc881f9f8 New deleteBookmarkInEditModeTest UI test 3 years ago
AndiAJ 9546e50451 Improve coverage for copyBookmarkURLTest 3 years ago
AndiAJ d33df2bedd Improve coverage for addPrivateBrowsingShortcut Ui test 3 years ago
AndiAJ fc806283a5 For #21133 fix openMainMenuSyncItemTest UI test 3 years ago
Michael Comella d4b13ce519 For #21183: remove view hierarchy depth check from excessive resource test.
This doesn't seem to be a high value test: increasing the view hierarchy
depth will only result in a performance problem on low end devices
if there is enough content on the new layer to cause the traversal to
take longer. It's more likely to result in a hard-to-workaround false
positive so we can remove it, like component init count.
3 years ago
Michael Comella 09fe569b30 For #21183: remove component init check from excessive resource test.
This check doesn't seem high value because initializing a component
only indicates a performance problem if it's slow, which is not most
components, so it's likely to result in many false positives. To fix
the intermittent, we won't lose much if we remove it.
3 years ago
Michael Comella 951e49fec4 For #21138: change EXPECTED_RUNBLOCKING to range.
Compared with my local runs, CI sees +1 runBlockingIncrement calls so seems to
take other code paths. As such, we search for a range of rather than a single
value. The main downside I can think of is this could make the test trickier to
debug but we can wait and see if that's a problem in practice before taking
action on it.
3 years ago
Michael Comella 0014f94176 For #21138: re-enable excessive resource use test.
This test wasn't running in CI
https://github.com/mozilla-mobile/fenix/issues/20386 so we changed the
CI configuration so that it will. However, the test was then failing so
this is the revision that unignores the test.

I wonder if componentInit count is useful - it seems like it'd cause
more false positives than not - but I figure we can leave it in and see
how it goes.
3 years ago
Gabriel Luong 4080eba225 For #21037 - Add a delete history menu item
This removes the existing "Delete history" button in the History in favour of a menu item
3 years ago
AndiAJ dd889d8c0d For #21002 update and add missing tabs setting validations 3 years ago
Oana Horvath fe8f4be9b9 For #20702: fix tests flakiness 3 years ago
Oana Horvath a7c45425d7 For #21002: added page main menu items tests 3 years ago
Mugurell 621c388c12 For #17917 - Finish migrating all synthetics usages 3 years ago
Oana Horvath 84767f84ea For #20716: re-enables mainMenuInstallPWATest UI test 3 years ago
Oana Horvath 9920cbeb1d For #20868, #18764: Update Tracking Protection UI tests 3 years ago
Roger Yang c9b2f9e866 Issue #2783: Add snackbar to collection deletion 3 years ago
codrut.topliceanu 77e12f9014 For #20716 - Disables Intermittent failing UI test 3 years ago
Roger Yang 64cd72871f Update Android Components version 3 years ago
Arturo Mejia fd8e6a9c27 For #19886 fix ui tests 3 years ago
Gabriel Luong 4b2b058b4e For #19886 - Remove tracking protection overlay CFR 3 years ago
Aaron Train 5ff2c21849
Filter out test target packages in Flank-x86 (#20841)
* Filter out test target packages in Flank-x86
* Ignore verifyRunBlockingAndStrictModeSuppresionCount
3 years ago
Elise Richards 7fdad978a3
For FNXV2-17067: always show home in background behind search dialog (#20573)
* Navigate to home on toolbar click. Handle back press from search dialog

Update tests to show home behind search dialog. Remove unused test.

Jump back in show all button is clickable behind search dialog

Recently saved bookmarks show all button is clickable behind search dialog

* Add feature flag

* Past explorations show all button is clickable behind search dialog

Handle keyboard in controllers instead of viewholders. Update tests.

Allow collections to be visible behind search dialog

Dismiss keyboard and search dialog with navigateUp instead of just dismissing the keyboard

Verify navigateUp in tests

Adding ignore for flaky UI test

Only resize home behind search dialog

Add ignore for collection intermittent test

Cleanup
3 years ago
AndiAJ 7a02db22c3 Start on home UI tests 3 years ago
Sebastian Kaspari 1cc4ae9ab2 Fix UI tests: SettingsPrivacyTest, DeepLinkTest. 3 years ago
Sebastian Kaspari 7fed8b4ab5 Add preference for enabling/disabling Android Autofill from within the app. 3 years ago
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Michael Comella f7b85a6e95 Closes #20540: always swipe twice to openSettings in ThreeDotMenuMainRobot. 3 years ago
Oana Horvath f37abbe4ae For #20297: close tab to avoid saving the same tab to collection 3 years ago
Mugurell 52e152300d For #20420 - Re-enable shortcutButtonTest
The issue affecting this was resolved in AC.
3 years ago
Michael Comella 6d609bc651 For #19901: integrate Jetback Benchmark (microbenchmark). 3 years ago
Mugurell 094413578c For #20420 - Temporarily disable SearchTest#shortcutButtonTest 3 years ago
Sebastian Kaspari 8b5aef7def Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 3 years ago
Oana Horvath 81849ec6d0 No issue: adds warning comment to beta & release running tests 3 years ago
Oana Horvath df960c4187 For #10915: fix tests by removing existing session 3 years ago
Oana Horvath ea3e4c9956 No issue: New UI smoke test for the Language menu 3 years ago
Roger Yang e69f3dfbbb Closes #19090: Show snackbar on adding to bookmarks from tabs tray 3 years ago
Oana Horvath d20bebc2a3 For #20000: Re-try swipe on collection items 3 years ago
Arturo Mejia 1d76bc7ca2 For #19922 Update the default autoplay setting to be block audio only 3 years ago
Jonathan Almeida 854da1ac9d Issue #20053: Disabling collection smoke tests temporarily
The changes from #19090 did not fix the issue consistently, and are
causing failures intermittently on-unrelated PRs.

Disabling these tests again until we have another fix for #19090.
3 years ago
AndiAJ 78edf06a7a Text selection tests 3 years ago
Oana Horvath 6278a2b07d For #19090: Re-enable createFirstCollectionTest, shareCollectionTest, deleteCollectionTest 3 years ago
Oana Horvath c5962b2502 For #10587: Fix and re-enable old CollectionTest.kt 3 years ago
AndiAJ 51517bea7e For #19585: disables failing restoreTabCrashedReporterTest UI test 3 years ago
Oana Horvath 1e05e23b23 For #18986: re-enable changeAccessibiltySettings UI test, not failing anymore 3 years ago
Oana Horvath 597c8812f4 Changes to #17416, #19686, #19770 UI smoke tests to remove flakiness 3 years ago
Roger Yang 2e4635334a
Closes #19090: Show snackbar on adding to bookmarks from tabs tray (#19807) 3 years ago
Jonathan Almeida 811dd3e618 Issue #19809: Change default tab tray view to grid layout 3 years ago
Oana Horvath f901f7e92f For #18647: Fixed and re-enabled customTrackingProtectionSettingsTest UI test 3 years ago
Jonathan Almeida bf3f81d271 Issue #19112: Remove old Synced Tabs code 3 years ago
Jonathan Almeida dc11c334b6 Issue #19112: Remove old tab tray code 3 years ago
Oana Horvath e48d285114 No issue: Add more smoke tests coverage 3 years ago
Oana Horvath f3e3f86388 No issue: Change hardcoded package and app name in tests 3 years ago
Oana Horvath 4851bf7545 No issue: cleanup of unused tabs related code in HomeScreenRobot.kt
Deleted SmokeTest#selectTabsButtonVisibilityTest, feature removed
3 years ago
Oana Horvath 60a752f75c No issue: added smoke tests from MediaNotificationTest.kt 3 years ago
Oana Horvath bca8b74263 No issue: Added custom tab UI smoke test 3 years ago
Mugurell d02db131f0 For #19620 - Have MenuScreenShotTest screenshot DefaultBrowser setting again
As a regression from #19590 which added a new setting above the existing
"Set as default browser" setting the settingsTest() needed to be updated to
allow clicking and screenshot of what happens after clicking on the
"Set as default browser" setting which can now be pushed offscreen.
3 years ago
Oana Horvath 0877e4cbb7 For #19415: fixed private browsing button visibility issue 3 years ago
Oana Horvath 5c026d4e7b For #18603: Fix and re-enable startBrowsingButtonTest 3 years ago
AndiAJ 3fc4848aef Fix settingsPrivacyItemsTest 3 years ago
Oana Horvath 9fd7fe3df1 For #15754: Get playback state using MediaSession in MediaNotificationTests 3 years ago
AndiAJ 889cf2e718 For #19468 and #19478 fix intermittent UI tests 3 years ago
AndiAJ 8db42d6d25 Fix flaky UI Tests #19306 #19160 #19404 #19373 3 years ago
Codrut Topliceanu 277034546f
For #18262 - [Credit cards] Turn the "Sync cards across devices" button into a "Sync cards" toggle (#19207)
* For #18262 - Turns "Sync cards/logins" into toggle
3 years ago
Roger Yang 79cf3fc765
Closes #18253: Bookmark and History open new tabs in the background (#19275) 3 years ago
Sebastian Kaspari cd4294d314 Issue #19040 - Fix UI test: settingsPrivacyItemsTest 3 years ago
Mugurell 0f9f439329 For #18591 - Update tests
Some tests trying to "Add to top sites" may fail because of the sticky navbar
now covering that menu item -> scroll the menu up a little.

Some tests that previously were trying to scroll to the bottom of the menu to
interact with navbar options now don't have to. Them trying to interact with
navbar option with the menu opened as collapsed is a good test for the navbar
stickyness.
3 years ago
Elise Richards db76b8fe21
For #19114: check state of sync account when navigating from sync sign in menu item (#19118) 3 years ago
Elise Richards 59c94e447c
For #19005: new tab three-dot menu sync sign in (#19037)
* Show synced tabs or sync account in new tab menu

* Sync sign in item navigates to account settings

* Check account auth and get sync item title

* Look for sync sign in item on home menu for UI test

* Sync sign in menu item UI test
3 years ago
Jonathan Almeida 8bb7abc3fe Disabling tabstray collection tests until #19090 is fixed 3 years ago
Jonathan Almeida 0189fed012 No issue: Use same open tabs tray everywhere 3 years ago
Jonathan Almeida b6f9bbf560 Attempt at fixing openAllTabsInCollectionTest test 3 years ago
Jonathan Almeida 8b1752dd9e Disable/fix tests that rely on Select Tabs button 3 years ago
Oana Horvath 1128f921ad For #18986 & #19016: disabled failing tests changeThemeSetting & changeAccessibiltySettings 3 years ago
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For #16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For #16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago
Oana Horvath 78f0086b7e For #17979 & #17840: fix and re-enable UI tests affected by main menu changes 3 years ago
Oana Horvath 358a3a3d4c Fix screenshots tests: showDefaultHomeScreen, bookmarksManagementTest 3 years ago
Arturo Mejia 8ca9f94abb For issue #16557 set autoplay block audio only
by default
3 years ago
Kate Glazko 841dacb69e For 17798: Sync Menu Item 3 years ago
Mugurell 0f0c319896 For #17772 - Collapse browser menu to "Add to Home screen"
The menu will start as collapsed.
Users can then swipe up to expand it.
3 years ago
Elise Richards ca33aef036
For #17770: New tab three-dot menu reorder (#18427)
* Create new menu order for new tab

* Add new tab menu navigation. Dynamically update menu when sync auth is needed. Make new tab menu and browser menu consistent.

* Lint

Lint and refactoring tests

* Tests for default toolbar menu

* Feature flag for request desktop site

Add todos for UI test issue 17979

Add todos for UI tests
3 years ago
AndiAJ e03ffff3b8 Disable failing UI Tests 3 years ago
Oana Horvath 246348501c For #18644: fix metod to verify system notifications 3 years ago
Oana Horvath aacb5e3ebb For #18421: Ignore the ContextMenusTest class because of test failures 3 years ago
Oana Horvath 1c0360af7b Disable customTrackingProtectionSettingsTest 3 years ago
Oana Horvath 11d410de0b Re-enable working UI tests from #18644 3 years ago
Mugurell 060b986f1c For #18644 - Temporarily disabling UI tests that fail on Firebase.
This is a quick solution to resume PR merges.
Investigations and a proper fix is to follow on this same ticket.
3 years ago
Arturo Mejia 869c99afaa For #15372 Optimize the order and messages of onboarding cards 3 years ago
Aaron Train 246c192de3
Closes #18623: Fix Gradle task name in gradlewbuild.py (#18624) 3 years ago
mcarare d0a45bab21 For #17799: Add extensions submenu item. 3 years ago
Oana Horvath 2743f9cf4f
For #18481: waits for url to be visible in TestHelper.verifyUrl() (#18498) 3 years ago
Oana Horvath be86061a11 Add first set of UI tests to Nightly 3 years ago
Oana Horvath a4691675a1 For #14005: fix strict TP tests loading timeout 3 years ago
dependabot[bot] 5259bdf7be Bump cryptography
Bumps [cryptography](https://github.com/pyca/cryptography) from 2.8 to 3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/2.8...3.2)

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Oana Horvath 9ac54fc06a For #18325: dismiss GooglePlay ToS dialog after UI test 3 years ago
Elise Richards 42cc4cb452
For #17802: Match the design for three-dot menu navigation (#17875)
* Feature flag for toolbar menu redesign. Add new items to menu and reorder.

* Handle toolbar items in menu controller

* Remove bookmark from toolbar nav

* Respect toolbar position

* Inline toolbar orientation checks

* Add Todos for bookmark UI tests

* Make variable names consistent
3 years ago
Jan-Erik Rediger 8b7279ebe4
Pass auto-generated build info (version code and name) to Glean (#18230)
This also re-generated the Glean docs due to an update of the bundled
glean-parser.
3 years ago
Oana Horvath 67c8345364 For #18040: no network access startup test 3 years ago
Vitaly V. Pinchuk 8f5244d528
Closes #18150: select tabs button not displayed (#18216)
For #18150: Improve showing/hiding of "Select tabs" button in tabs tray

Payload argument is unavailable after first call of notifyItemChanged() as the
whole View need to be updated.
Inject a "isPrivate" lambda in the adapter so it will always know what tabs are
currently showing and so always ensure the expected behavior.
3 years ago
AndiAJ 3d817204c2 For #18053 Change and fix Intermittent UI test verifyReaderViewToggle 3 years ago
Oana Horvath d7f1117e17 For #16317 UI tests: save longTap preference to restore it 3 years ago
Oana Horvath 4e4bbcc334 For #16317: resets long press delay at the end of UI tests 3 years ago
Jan-Erik Rediger 3e9ab1b150 Glean: Check for renamed reason 3 years ago
Mugurell 611ff8f25b For #17195 - Don't try setting an idle resource if the View is already off screen
Speculative fix based on the Firebase logs which shows that on a second check
of R.id.tab_wrapper it is not found the screen.
It may be because after `advanceToHalfExpandedState` and before getting a
reference to it in `waitForTabTrayBehaviorToIdle` it was already animated off
the screen.
With this in mind I've added a null check for the view reference before trying
to register an idling resource on it's Behavior.

Also added and used a way to click at a specific location in a View, not just
in the default middle in the View.
It was observed from the Firebase videos that a "click" on the topBar actually
selected the private tabs section. This would leave us to believe that the
"click" was caught by that other View which was placed above the x,y middle of
the topBar.
3 years ago
Mugurell 32493491fa For #17195 - Test a potential fix for the test 3 years ago
Oana Horvath 23cc3522aa For #17484, #18003 UI tests: retry closing tab if it fails 3 years ago
Elise Richards bab7693b9d
Remove unneeded temporary UI test ignores (#17980) 3 years ago
Elise Richards d0fd3e82c5
For #17771: three-dot menu reorder (#17838)
* Feature flag for toolbar menu redesign. Add new items to menu and reorder.

* Handle toolbar items in menu controller

* Menu controller tests

* Make icons invisible

* Lint

* UI tests reflect design change

* Refactor test names

* Lint fixes

* UI tests
3 years ago
ekager 08a1e0f728 For #17906 - Allow screenshots for private home screenshot test 3 years ago
Oana Horvath a98b40896d For #15259 UI test: waits for home screen to be visible 3 years ago
AndiAJ e31b4f49e9 For #17195 Fix Intermittent UI test verifyTabTrayNotShowingStateHalfExpanded 3 years ago
AndiAJ e0c70582b8 For #17852 Change and Fix Intermittent UI test openNewTabTest 3 years ago
AndiAJ 46888cc70f For #14523 Fix Intermittent tests verifyContextOpenLinkNewTab & verifyContextOpenLinkPrivateTab 3 years ago
Oana Horvath c6bf949a03 For #17847: Removes editCustomSearchEngineTest UI test 3 years ago
Oana Horvath f0b7b3b987 For #17847: disables editCustomSearchEngineTest 3 years ago
Andrei Joltan 936966596a
For #16020 Fix Intermittent tests caused by the Menu Button (#17829) 3 years ago
Oana Horvath 9783930ac5 For #16615: UI smoke test customTrackingProtectionSettingsTest 3 years ago
AndiAJ a4a2a59b7d For #12895 Fix Intermittent test navigateBookmarksFoldersTest 3 years ago
Oana Horvath f180d932c8 For #16959: verify page url not content in swipeToSwitchTabTest 3 years ago
AndiAJ c8c0131d00 Go Forward Test Fix 3 years ago
AndiAJ 5eb1a3d210 For #17641 Fix Intermittent test addPredefinedSearchEngineTest 3 years ago
AndiAJ 23e6f7aa91 For #16615: UI Smoke Tests for Tab Crash Reporter 3 years ago
Christian Sadilek 89ad370eb2 Remove SessionManager references from UI tests 3 years ago
Oana Horvath d7b8af78c9 For #9188: wait for page content to appear in Reader mode tests 3 years ago
Oana Horvath 67ff4d460a For #9188: wait for page load in Reader mode 3 years ago
Oana Horvath 46487105d5 For #16615 & #11191: re-enabled ReaderViewTest and added a UI smoke test 3 years ago
Oana Horvath d202daf47e For #16615: UI smoke test mainMenuInstallPWATest 3 years ago
ekager 083fe26f57 For #17542 - Removes flash on renaming top site and fixes title not being updated 3 years ago
Oana Horvath 7c56df41df For #17309, #13447, #14534 UI tests: changed the way page Url is verified 3 years ago
AndiAJ c8c19077ed For #16615: UI Smoke Tests for No history in PB and Add to home screen 3 years ago
AndiAJ f8ea4c5ca1 For #16615: UI Smoke Tests for Tabs Tray 3 years ago
AndiAJ eb910ff5e8 For #16615: UI Smoke Tests for Bookmarks
For #16615: UI Smoke Tests for Bookmarks
3 years ago
Oana Horvath 58cefbbb94 For #16615: Collections UI smoke tests 3 years ago
isabelrios d8584ed632
Changes to run tests on beta builds (#16786)
* Changes to run tests on beta builds

* remove dontoptime and fix bookmarks tests

* fix ktlint and smokeTest

* add variable for package name

* rebase and fix conflicts

* add yml files and modify script to run tests

* fix yml file indentation

* changes in kind file and add try_task

* fix error kind file

* fix error kind file 2

* fix error kind file 3

* fix reviewer comments

* remove mockwebserver implementation as per reviewer comment

* run beta tests only on releases branches

* reg exp for master branch

* reg exp for master branch2

* modify try_task with release branch

* remove try file

* let's start by running only one test

* address latest reviewers comments

* double check correct tasks for release branch

* remove try file after confirming beta build run

Co-authored-by: isabel rios <isabelrios@MBP-de-isabel-2.home>
3 years ago
Oana Horvath 7983a7fc89 For #16615: UI smoke test editCustomSearchEngineTest 3 years ago
AndiAJ fc964862e0 For #16615: UI Smoke Tests for Recently Closed Tabs 4 years ago
Oana Horvath 7ac4af46bc For #10798 & #14526: Apply auto-download test file fix for download UI tests 4 years ago
Oana Horvath 23789c86c4 For #16615: UI smoke test manageDownloadsInDownloadsMenuTest 4 years ago
Oana Horvath d7a35ed6bd For #16966: Remove unnecessary step from mainMenuAddToHomeScreenTest 4 years ago
MarcLeclair 24bce64e0b
16373 Count the # of inflations done on startup (#16778)
* For #16373: Added performance Inflater to counter # of inflations

This class is quite straight forward. The only thing that I have to point out is the onCreateView method. It usually
calls its super if you don't override it. The problem with that is that the super.onCreateView actually uses
android.view. as a prefix for the XML element it tries to inflate. So if we have an element that isn't part
of that package, it'll crash. As I said in the code, a good example is ImageButton. Calling android.view.ImageButton
will make the app crash. The method is implemented the same way that PhoneLayoutInflater does (Another example
is the AsyncLayoutInflater)

* For #16373: Added test for PerformanceInflater

This test got quite awkward / complicated fast.  I wanted to test the  to make sure we don't break *any* of our layouts
and to do so, I decided to just retrieve all our XML in our /res/layout folder. However, this gets quite a bit outside of a unit test scope.
The point was to get every layouts and get their LayoutID through the resources using the testContext we have. It gets even weirder, since some
of the XML tags have special implementation in android. One of them is the <fragment> tag. That tag actually is inflated by the OS using the Factory2
that the Activity.java implements. In order to get around the fragment issue, we just return a basic FrameLayout since the system LayoutInflater doesn't deal
won't ever get a <fragment> tag to inflate. Another issue was the <merge> tag. In order to inflate those, you need 1) a root view and 2) attach your view to it.
In order to be able to test those layouts file, I had to create an empty FrameLayout and use it as the root view for testing. Again, I know this is beyond the spirit of a unit test but if we use this inflater, I think it should make sure that no layouts are broken by it.

* For #16373: Overrode getSystemService to return PerformanceInflater

This allows PerformanceInflater to be called in every inflation to keep track of the number of inflations we do.

* For #16373: Added UI test for # of inflations

* For #16373: Lint fix

* For #167373: Changed the LayoutInflater cloneInContext to take this instead of inflater

The inflater parameter is set on the first call from the OS from  the Window object. However, the activity itself sets multiple factories on the inflater
during its creation (usually through AppCompatDelegateImpl.java). This means that, once we initially set the inflater with a null check, we pass an inflater
that has no factory initially. However, since we keep a reference to it, when cloneInContext was called, it cloned the inflater with the original inflater
which didn't have any factories set up. This meant that the app would crash on either browserFragment creation or any thing that required appCompat (such as
ImageView and ImageButton). Now, passing itself with a cloneInContext means we keep all the factories initially set by the activity or the fragment.

* For #16373: Fixed code issues for PR. No behavior change

* For #16373: fixed some code nits
4 years ago
Oana Horvath 095d07598a Code cleanup in BookmarksRobot and BookmarksTest 4 years ago
Christian Sadilek 36a6d364a7 For #17086 #17143: Temporarily turn off Nimbus 4 years ago
Oana Horvath 0a0dbeb132 Added a description to each smoke test 4 years ago
Oana Horvath b0277c3f39 For #16615: UI smoke test noCrashWithAddonInstalledTest 4 years ago
Oana Horvath f24c6e1316 For #16615: UI smoke test redirectToAppPermissionsSystemSettingsTest 4 years ago
Oana Horvath 9d5ec47ec3 Fix #16960 & #16959: updateSavedLoginTest, swipeToSwitchTabTest UI smoke tests 4 years ago
Oana Horvath 80ad6dea32 For #16615: UI smoke test updateSavedLoginTest 4 years ago
Oana Horvath 5e046c8f04 For #16615: UI smoke test startBrowsingButtonTest 4 years ago
Oana Horvath 7a08175568 For #16615: Smoke UI test swipeToSwitchTabTest 4 years ago
Oana Horvath 8a579ee62b For #16838: deleted mainMenuOpenInAppTest 4 years ago
Christian Sadilek 3722033a5c For #16032: Support installing recommended add-ons from AMO 4 years ago
Oana Horvath 5867d2830a Split UI smoke tests into smaller tests 4 years ago
Oana Horvath c8f8e2e665 Updates to UI tests using the modified recyclerViewIdlingResources minItemCount 4 years ago
Oana Horvath 894b25855e For #16615: UI smoke test toggleSearchSuggestions 4 years ago
Oana Horvath 2d652acbf2 For #16615: UI smoke test addPredefinedSearchEngineTest 4 years ago
Sebastian Kaspari 2b759e9d6f Integrate new search code from Android Components into Fenix. 4 years ago
jhugman 9cdfb6db4a
Nimbus Global Opt Out (#16543) r=gl 4 years ago
Oana Horvath 2d6d49324e For #16615: UI smoke test firstRunScreenTest 4 years ago
Michael Comella 72ab058551 For #16376: move Startup*Test to perf pkg under code owners.
Instead of listing many different files here, we should just put them in
/perf/ packages and code owner them.
4 years ago
Michael Comella 54c7dc70e7 For #16376: assert num ConstraintLayout direct descend RecyclerView.
I'm not convinced this is a useful test because the performance
characteristics seem unfortunately nuanced: if the test fails, it implies
you shouldn't add more but that isn't necessarily true (for example, if
your RV child has a large depth). Furthermore, we haven't measured in a
variety of circumstances that layouts like LinearLayout perform better
as RecyclerView children so maybe it only held for the one small case we
used it in.
4 years ago
Michael Comella b0a1e0884e For #16376: test view hierarchy depth in StartupExcessive*Test. 4 years ago
Oana Horvath 10dadb838e Closes #12899: fixed UI test for ETP off 4 years ago
ekager 1ed9ebf622 For #16132 - Rename normal mode menu item, remove telemetry 4 years ago
Oana Horvath ae407a7367 Closes #13217: fixed UI test for main menu items 4 years ago
Oana Horvath 5e745d0bc3 For #15847: use Espresso's RecyclerView scrollTo action 4 years ago
Michael Comella c96e16112f For #15279: add component init count to StartupExcessiveResourceUseTest. 4 years ago
Mugurell 172977f698
For #14980 - Effectively disable tabs tray STATE_HALF_EXPANDED (#16052)
STATE_HALF_EXPANDED cannot be disabled while also keeping fitToContents = true
based on which the tabs tray layout is currently set.
To work around this we'll set a a minuscule height for the tab tray when in
this state and then immediately advance to STATE_HIDDEN so to make it
imperceptible to the users.
Since I couldn't write unit tests because of InflateExceptions in Robolectric
I've written UI tests to protect against regressions.
4 years ago
Oana Horvath c3204b7644
For #15847 - Disables verifyAboutFirefoxPreview UI test (#16346) 4 years ago
Oana Horvath 4ff2635423 For #13446 UI tests: wait for historyList to exist 4 years ago
Michael Comella bff8a0d6a7 No issue: make StrictMode suppression count thread safe. 4 years ago
MarcLeclair 7b1af41b40
15278 detekt rule runblocking (#15942)
* For #15278: added CoroutineManager to count runBlocking calls

* For #15278: Added actual detekt rule for runblocking and its config to the yaml

* For #15278: Added unit test for RunblockingCounter

* For #15278: renamed StrictModeStartupSuppressionCountTest.kt to PerformanceStartupTest.kt and added runBlockingCount test

* Lint fix

* For #15278: made runblocking a Long to prevent overflow

* For #15278: fixed MozRunblocking name, description and moved RunBlockingCounter to perf package

* For #15278:Renamed MozillaRunblockingCheck to MozillaRunBlockingCheck

* For #15278: Added setup for unit test, since it failed without restting counter

* For #15278: Fixed naming for RunBlocking lint check

* For #15278: removed changes made to test to use runBlockingIncrement

* For #15728: added test exclusion for runBlocking check

* For #15278: changed null check and added Synchronized to count setter

* For #15278: fix for nits

* For #15278: added StartupExcessiveResourceUseTest to CODEOWNERS

* For #15278: fixed for nits

* For #15278: Moved increment function to extension function and fixed indentation

* For #15278: Added tests for Atomic Integer extension and nit fix
4 years ago
Gabriel Luong 66210469c0
For #9548 - Ability to rename top sites (#16285)
* Ability to rename top sites, closes #9548

* Highlight the "Remove" top site action as destructive

With more menu items in the top site contextual menu, it makes sense to differentiate

* Added test for the top site renaming action

* Fixed lint check (wildcard imports, blank spaces)

* Applied suggestions from code review

* Apply suggestions from code review

Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>

* Implemented dialog click listener with manual dismiss/cancel

Co-authored-by: Lorenzo Stanco <lorenzo.stanco@gmail.com>
4 years ago
Oana Horvath e36e61b2c3 For #10690: re-enable editBookmarkTest 4 years ago
Aaron Train b8fff8cef1
For #8169 - Upgrade Mockwebserver (#16186)
Upgrades Mockwebserver to 4.9.0
4 years ago
ekager d5cb9c599c
For #15910 - Adds back automatic toggle, disables slider when enabled (#16070) 4 years ago
Mihai Adrian Carare b1bc024ff5
For #11631: Move report site issue extension to main menu. (#15884)
* For #11631: Move report site issue extension to main menu.

* For #11631: Update UI test for installing add-on.
4 years ago
mcarare edd613ace2 For #15688: Update UI tests. 4 years ago
Sebastian Kaspari 2da24cd91d
Update Android Components, Kotlin, Gradle plugin (#16021)
* Closes #13262: Update AGP to 4

* Update to Mozilla Android Components 63.0.20201019090011.

* Update Kotlin to 1.4.10 and Coroutines to 1.3.9.

* Fix new compiler warnings.

* Fix compilation of lint rules module.

* Pin JNA version.

* Fix new lint errors.

Co-authored-by: Tiger Oakes <toakes@mozilla.com>
4 years ago
Shen 45e3f7805b For #13168 - Removed the close button from history navigation bar 4 years ago
ekager 881e3d6ccd For #14923 - Removes auto size preference toggle 4 years ago
Jonathan Almeida 666781aa62 Fix lint warnings and test in site permissions 4 years ago
Gabriel Luong 5153a3f2c5 For #15115 - Part 9: Fix ui tests for the tabs settings 4 years ago
Jonathan Almeida ee673348bf Issue #15754: Disable failing notification UI tests 4 years ago
Michael Comella 4302cd20b2 For #13959 - post: decrement expected suppression count.
Running locally, I get the same error: I think that there legitimately
was an reduction in the number of StrictMode suppressions on start up.
4 years ago
Michael Comella b222376cb0 For #13959: add test to prevent increasing StrictMode suppression count. 4 years ago
Michael Comella c33aafb024 For #13959: add HomeActivityTestRule.skipOnboarding.
This is more correct, faster, and results in less copy-paste duplication
than the current behavior:
  homeScreen { }.dismissOnboarding()

Which opens settings to dismiss onboarding.
4 years ago
Jocelyne 0154c81f81
For #10107: Show Today and Yesterday labels in History (#15415) 4 years ago
ekager 01e802fef0 For #15324 - Show tab settings and recently closed items in menu when no tabs 4 years ago
mcarare cd53b8fdaf For #15130: Remove "what's new card" check in UI test. 4 years ago
Oana Horvath 108666c277 Closes #14524, #12896, #13830: re-enabled strict ETP tests after code bug fix 4 years ago
Oana Horvath abe06da6e2 Closes #13829: Added idling resources to the addon details view" 4 years ago
Oana Horvath 2e38635781 For #13829: Disables verifyAddonsCanBeUninstalled UI test 4 years ago
Oana Horvath 100cc7c088 Closes #14277: Ads idling resources for History UI tests 4 years ago
Oana Horvath cf69058ce8 Closes #12645: Re-enable mediaSystemNotificationInPrivateModeTest 4 years ago
Oana Horvath bf9f6794e9 For #14524: Disable ETP tests failing on AC 58 update 4 years ago
Arturo Mejia 6f5e9bad26
Pin AC TO 57.0.0 and remove feature flag for view downloads (#14592)
* Update Android Components version to 57.0.0.

* Remove feature flag for "View Downloads".

* Update search enginer list from changes by #13452

Co-authored-by: Chenxia Liu <liuche@mozilla.com>
4 years ago
ekager 2d67e4b748 For #4118 - Creates setting for auto closing tabs 4 years ago
Oana Horvath 4a00131fa1 Closes #13218: adds IdlingResources for the Addons list 4 years ago
Oana Horvath 1e7faa693f Closes #14522: item 'Open link in apps' moved 4 years ago
Oana Horvath 9e47d9e70d
Closes #10911: idling resource registration timing issues (#14231) 4 years ago
Oana Horvath 4ebb070ed7 [Ui Tests] Closes #11944: changes the way the system notifications are verified according to their visibility 4 years ago
Jeff Boek 4b997c1334 No Issue - Fixes UI Tests with new search experience 4 years ago
Oana Horvath 92886121fe Closes #13877: shortens closeTabTest to avoid flakiness 4 years ago
Gilbert Gilb's 9430546d12 for #7584 - fix about libraries toolbar theme
fixes #7584 #13970
4 years ago
Elise Richards feae7fff2f
FNX-14498 ⁃ For #9487: improve fxa onboarding manual sign in card (#13317)
* Replace strings, add learn more, hook up button

* Constrain learn more and icon to the text

* View holder tests

* Lint

* Update homescreen ui test
4 years ago
Oana Horvath 0b2e629774
Closes #13219: Changes device long-tap delay before UI tests (#13502) 4 years ago
TejaswiKarasani cd729b39e5
For #112,#145: Verify Search engine can be changed temporarily using Search engine (#13259) 4 years ago
Oana Horvath 4542b4b934
Closes #12778: re-arranged the steps in closeTabTest and closePrivateTabTest (#13810) 4 years ago
Richard Pappalardo 73fb5e6875 fix: disable broken tests 4 years ago
Aaron Train 25cd1dbac2
No issue: Remove unused import in SettingsAddonsTest (#13345)
Fixes lint-ktlint error on master https://github.com/mozilla-mobile/fenix/runs/954237630
4 years ago
Kadeem M 60526dffd8
Fix failing verifyAddonsCanBeUninstalled test (#13319) 4 years ago
Aaron Train b9391c141b For #13218: Fix settingsAddonsItemsTest 4 years ago
Richard Pappalardo 0e0183aa24
Disable flaky tests: settingsAddonsItemsTest, verifyAboutFirefoxPreview (#13286)
* fix: disable intermittent failing UI tests

* fix: add dependency
4 years ago
ekager f663129632 For #6313 - On first load, hides engineView until firstContentfulPaint 4 years ago
Oana Horvath 1e806b25c1
Closes #12893: fixed deleteAllHistoryTest (#13255) 4 years ago
Oana Horvath 6f5f8cc5aa For #13220, #13217: Disables failing UI tests 4 years ago
Aaron Train 5b997ff1d8 Closes #13021: Fix verifyAboutFirefoxPreview UI test 4 years ago
Roger Yang b7fabdd2f1 Closes #12670: Add lastUri as a parameter in RequestInterceptor 4 years ago
Oana Horvath b0dfdd57dc
For #12968: Re-enables Search settings tests (#13020) 4 years ago
Kadeem M 1353e157cd
Created UI tests for Addon Settings (#9258) 4 years ago
Oana Horvath 808584b75f For: #12894, #12899, #12968, #11239, disables failing UI tests 4 years ago
Oana Horvath a07f8a5041
For #12893: Disables failing deleteAllHistoryTest (#12902) 4 years ago
Oana Horvath a116950fc8
For #12473: Disable failing verifyContextCopyLink (#12891) 4 years ago
Aaron Train aa495b4526
No issue: Fix recent UI test breakage (#12869) 4 years ago
Hakkı Kaan Çalışkan 2a0a11f740 For #12571: Rename 'Shortcuts' to 'Search engines'
Co-Authored-By: Khushraj Rathod <khushrajrathod@gmail.com>
4 years ago
Tiger Oakes c08d375c18
Move settings in components (#12675) 4 years ago
TejaswiKarasani 899f6e63ad
No issue: verify ETP toolbar shield icon is not displayed if ETP is OFF globally in ETP UI tests (#12623) 4 years ago
Oana Horvath 6ab6f3efe9
Fix UI tests from #12752 #12637 #12764 (#12779)
* For #12752 & #12764: Fixes tabs tray behavior in UI tests

* For #12637: fixes goBackTest
4 years ago
Richard Pappalardo 41c256e474
Fixes #12752, #12764 - Temp disable openHistoryInNewTabTest intermittent UI test failures (#12754)
* Fixes #12752 - Temp disable intermittent failing test
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
Roger Yang 7923255fda For #12118: Add isSubframeRequest parameter for app links 4 years ago
James Hugman 798c1bf743 Address review comments 4 years ago
James Hugman 22689a9ff5 Remove need to specify component names for new intents 4 years ago
James Hugman 98a33ea82b Changed home_* style links to urls_* to reflect that the destination is a set of links, rather than where the screen is 4 years ago
James Hugman 4573d09fd8 Add UI tests for deep links 4 years ago
isabelrios 5b61b44f1a
cron-job-ui-screenshots (#12423)
Co-authored-by: isabel rios <isabelrios@MacBook-Pro-de-isabel-2.local>
4 years ago
Oana Horvath af3c232615 Replaces verifyPageContent in UI tests 4 years ago
Aaron Train 661835a35c No issue: Add a couple Tabs Tray UI tests 4 years ago
ekager 9ed85510ae For #7094 - Adds save login exceptions 4 years ago
Oana Horvath 4624bf5c50 For #10911: disables flaky createBookmarkFolderTest 4 years ago
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 4 years ago
TejaswiKarasani 1926ddbc22
No Issue: Verify the page main menu items UI Test (#12336) 4 years ago
isabelrios 8b3f9804b5
No issue: Update screenshots test (#12348) 4 years ago
Richard Pappalardo cf94906e9d fix: disable intermittent test failure 4 years ago
MickeyMoz 4f74f34dba Update Android Components version to 49.0.20200707131055. 4 years ago
MickeyMoz da39a7e671 Update Android Components version to 49.0.20200705130154. 4 years ago
Oana Horvath 836199ff16 For #11764: doubles long-press delay UI test 4 years ago
Aaron Train 3351a02885
For #12309: Disable verifyContextSaveImage and verifyContextMixedVariations (#12314) 4 years ago
isabelrios 84324f52ae
For #12018 - Sync Int tests fixes (#12252) 4 years ago