Compare commits

...

1128 Commits

Author SHA1 Message Date
Ishan Jain b57b2cf75a
feat: close tab when back button is pressed and history is empty and bring up the home page 2023-01-08 00:10:22 +05:30
Ishan Jain c8dde9b239
feat: close last active tab when home button is pressed 2023-01-08 00:10:19 +05:30
MickeyMoz 4f5c2f1d42 Update to Android-Components 110.0.20230107143316. 2023-01-07 16:14:57 +00:00
MatthewTighe 24674cbec4 For #28428: update growth data with new events 2023-01-07 03:08:39 +00:00
mozilla-l10n-automation-bot a3801065eb
Import l10n. (#28445) 2023-01-07 01:12:19 +00:00
MickeyMoz 7525ea87ff Update to Android-Components 110.0.20230106190247. 2023-01-06 21:09:38 +00:00
MickeyMoz caf018acbb Update to Android-Components 110.0.20230106143238. 2023-01-06 16:29:48 +00:00
AndiAJ b18d32a7f4 Bug 1807302 - New set desktop site before page load UI tests 2023-01-06 10:22:35 +00:00
mozilla-l10n-automation-bot 99ff1e92d5
Import l10n. (#28427)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-06 01:06:23 +00:00
Arturo Mejia 804d286650 Bug 1797593 - Add re-engagement dialog for cookie banners. 2023-01-06 00:39:17 +00:00
Harrison Oglesby 614ba71842 For #28201 - replace existing night mode preview annotations with LightDarkPreview annotation 2023-01-06 00:05:59 +00:00
Harrison Oglesby cab8c35568 For #28201 - Make a LightDarkPreview annotation
Add LightDarkPreview annotation
2023-01-06 00:05:59 +00:00
Noah Bond 4f8c9c3e64 For #28262 - Refactor InactiveTabsAutoCloseDialogInteractor into InactiveTabsInteractor 2023-01-05 23:33:44 +00:00
rahulsainani 38a67b9517 Closes 28417: Add nimbus flags for pre permission prompt 2023-01-05 21:33:04 +00:00
Ryan VanderMeulen 923bb27abf Bug 1801022 - Update AndroidX testing libraries to the latest releases 2023-01-05 20:57:44 +00:00
Noah Bond a2f0580344 For #28261 - Rename solo `xInteractor` parameters in the Tabs Tray to `interactor` 2023-01-05 19:40:33 +00:00
rahulsainani f62c56db2f Closes 28414: NotificationManagerCompat extension to safely check if notifications are enabled 2023-01-05 19:01:49 +00:00
MickeyMoz 8994a66a3c Update to Android-Components 110.0.20230105143224. 2023-01-05 18:03:37 +00:00
jhugman 60d7a658b1
For EXP-2992: Add notification config with polling interval to messaging feature (#28381) 2023-01-05 16:57:15 +00:00
AndiAJ d69ad4e962 Bug 1807288 - Disable intermittent validateBaselinePing UI test 2023-01-05 16:12:55 +00:00
Alexandru2909 8186c44ef0 Bug 1807727 - Dismiss SearchDialogFragment on editing cancelled 2023-01-05 15:40:12 +00:00
AndiAJ e4fc184ece No issue - Use android resource for positive/negative dialog buttons 2023-01-05 10:24:02 +00:00
AndiAJ b8877c2388 Bug 1807302 - New sponsored shortcuts UI tests and other refactoring work 2023-01-05 09:18:46 +00:00
mcarare b1c40a784b Switch to AC implementation for checking device manufacturer. 2023-01-05 07:22:55 +00:00
MickeyMoz af51a7e34c Update to Android-Components 110.0.20230105001740. 2023-01-05 01:55:46 +00:00
mozilla-l10n-automation-bot b9930bf48f
Import l10n. (#28402) 2023-01-05 00:53:57 +00:00
Arturo Mejia 14ef1fe841 Bug 1797593 - Update text descriptions for cookie banner handling dialog 2023-01-04 22:16:19 +00:00
Ryan VanderMeulen 24ab9789fc Bug 1808338 - Update Sentry to version 6.11.0 2023-01-04 21:46:19 +00:00
MickeyMoz 7fec0a07bc Update to Android-Components 110.0.20230104190109. 2023-01-04 20:28:25 +00:00
sunil9211 469345b074 For #23841: Hide keyboard when selecting month or year 2023-01-04 18:05:42 +00:00
MickeyMoz 774b872e5a Update to Android-Components 110.0.20230104143250. 2023-01-04 17:11:08 +00:00
sarah541 4c1db2837c For #27035 - Add padding around onboarding buttons and content 2023-01-04 16:39:03 +00:00
Arturo Mejia f0be6e673a Bug 1797593 - Pre-land text for cookie banner handling dialog 2023-01-04 15:33:33 +00:00
AndiAJ 025895dd91 Bug 1807270 - re-enable collections UI tests disabled by the tabs tray migration to compose 2023-01-04 09:06:32 +00:00
Alexandru2909 d88d930b83 For #25812 - Set the cursor at the end for search terms when switching to toolbar editMode. 2023-01-04 08:03:42 +00:00
mozilla-l10n-automation-bot 9565b48b70
Import l10n. (#28384) 2023-01-04 00:35:12 +00:00
Arturo Mejia 9490561c75 Bug 1796146 - Add learn more link to cookie banner handling settings page 2023-01-03 22:14:29 +00:00
Jeff Boek aea7cbff9d For #3722: Invoke search on long press home button
Co-authored-by: s-ankur <s.ankursonawane@gmail.com>
2023-01-03 21:30:24 +00:00
MickeyMoz 767d18ae64 Update to Android-Components 110.0.20230103190107. 2023-01-03 20:37:51 +00:00
dependabot[bot] dbe56f1a85 Bump certifi from 2022.9.24 to 2022.12.7 in /taskcluster
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 18:06:50 +00:00
kycn c3b9c540ca Bug 1807933 - Enable places storage maintenance feature for the Beta variant.
Places storage maintenance flag is enabled for the Beta variant, previously it was enabled only for Nightly variant. This feature registers a periodic storage maintenance worker that runs to prune and maintain places db.
2023-01-03 17:31:48 +00:00
github-actions[bot] 58c530cd4b
Update to Android-Components 110.0.20230103143200. (#28373)
Co-authored-by: MickeyMoz <sebastian@mozilla.com>
2023-01-03 11:58:58 -05:00
mozilla-l10n-automation-bot a9729abb43
Import l10n. (#28365) 2023-01-03 00:47:59 +00:00
MickeyMoz 7fb602fbbe Update to Android-Components 110.0.20230102203010. 2023-01-02 21:53:37 +00:00
MickeyMoz c07ee762e6 Update to Android-Components 110.0.20230102143325. 2023-01-02 16:21:56 +00:00
MickeyMoz 364ef98a3b Update to Android-Components 110.0.20230101143317. 2023-01-02 01:26:28 +00:00
mozilla-l10n-automation-bot 83110e3c71
Import l10n. (#28359) 2023-01-02 00:43:37 +00:00
MickeyMoz 2bcb5214f2 Update to Android-Components 110.0.20221231143335. 2022-12-31 16:05:14 +00:00
mozilla-l10n-automation-bot 089969f5bc
Import l10n. (#28352) 2022-12-31 00:41:57 +00:00
Zac McKenney 4946c2795c For bug 1807716: Move engine warmup above Glean initialization to fix crash at launch 2022-12-30 22:14:29 +00:00
MickeyMoz bdf6432abc Update to Android-Components 110.0.20221230143323. 2022-12-30 16:13:32 +00:00
mozilla-l10n-automation-bot d9106ff1a7
Import l10n. (#28345) 2022-12-30 00:37:13 +00:00
MickeyMoz b4a5f14610 Update to Android-Components 110.0.20221229143342. 2022-12-29 16:12:28 +00:00
mozilla-l10n-automation-bot 0502da2f5c
Import l10n. (#28333) 2022-12-29 00:41:30 +00:00
MickeyMoz c74a2e70d1 Update to Android-Components 110.0.20221228143243. 2022-12-28 16:10:15 +00:00
mozilla-l10n-automation-bot 8336d98c0e
Import l10n. (#28325) 2022-12-28 00:40:43 +00:00
mozilla-l10n-automation-bot c6b69bac76
Import l10n. (#28312)
Co-authored-by: dsmithpadilla <88508950+dsmithpadilla@users.noreply.github.com>
2022-12-27 13:30:54 +00:00
AndiAJ 26a2fb3b3f For #28182 fix disabled verifySearchEnginesWithRTLLocale and toggleSearchEnginesShortcutListTest UI tests 2022-12-27 11:46:34 +00:00
oana.horvath 8ab6826d4a No issue: Fix add-on name check in UI test 2022-12-27 10:20:58 +00:00
MickeyMoz 0c15e9f723 Update to Android-Components 110.0.20221223190300. 2022-12-23 20:30:40 +00:00
MickeyMoz adb0f85c7a Update to Android-Components 110.0.20221223143308. 2022-12-23 16:46:03 +00:00
mozilla-l10n-automation-bot 5efab07eba
Import l10n. (#28269) 2022-12-23 15:20:53 +00:00
DreVla 073bbbf5c8 For #28298: Disable deletion of last element in search engines list
When removing search engines from settings,
the option to delete the last one should not be
available
2022-12-23 11:43:25 +00:00
Mugurell 6bff78b738 For #28273 - Configure search with the selected search engine before user searching 2022-12-23 10:19:10 +00:00
MickeyMoz 7598cbca67 Update to Android-Components 110.0.20221222151132. 2022-12-22 16:52:21 +00:00
AndiAJ f6f52972fe For #28212 disable failing emailLinkPWATest UI test 2022-12-22 14:15:02 +00:00
AndiAJ 9ca3179ab0 For #26286 new privateHomeThreeDotMenuItemsTest UI test 2022-12-22 14:15:02 +00:00
MickeyMoz 50cc477d14 Update to Android-Components 110.0.20221221190038. 2022-12-21 21:57:03 +00:00
MickeyMoz 991e622583 Update to Android-Components 110.0.20221221143317. 2022-12-21 17:14:58 +00:00
Mugurell b69e3c18b1 For #26957 - Disable intermittently failing ui test to unblock landing. 2022-12-21 15:52:05 +00:00
Alexandru2909 782a903072 For #26957 - Allow SearchDialogFragment to be dismissed on homescreen swipe 2022-12-21 15:52:05 +00:00
MickeyMoz d07de1e028 Update to Android-Components 110.0.20221221024602. 2022-12-21 04:29:24 +00:00
MickeyMoz 6fe346ced6 Update to Android-Components 110.0.20221220190216. 2022-12-20 20:41:49 +00:00
rahulsainani 3a79234a1b Bug 1796319 - Select existing addon settings tab if already opened 2022-12-20 16:54:37 +00:00
MickeyMoz 5ff72d4c08 Update to Android-Components 110.0.20221220143331. 2022-12-20 16:13:55 +00:00
mozilla-l10n-automation-bot 4e52da097a
Import l10n. (#28252)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-20 01:30:16 +00:00
MickeyMoz 6aec6edd1d Update to Android-Components 110.0.20221219220907. 2022-12-20 00:14:17 +00:00
rxu b10b33dac0 Update MOZILLA_ONLINE_ADDON_EXCLUSIONS 2022-12-19 23:39:15 +00:00
MickeyMoz 0c37b85001 Update to Android-Components 110.0.20221219190241. 2022-12-19 20:52:59 +00:00
MickeyMoz 3ace765deb Update to Android-Components 110.0.20221219143418. 2022-12-19 16:41:57 +00:00
AndiAJ f31246de06 For #28182 fix for verifySearchEnginesWithRTLLocale UI test 2022-12-19 16:08:55 +00:00
Arturo Mejia a39ac5a4d1 Bug 1804383 - Save as PDF text is missing in Private Mode 2022-12-19 15:05:06 +00:00
Gabriel Luong 212d32a137
No issue - Bump relbot to 5.0.2 (#28243) 2022-12-19 09:19:46 +00:00
MickeyMoz d37196d89f Update to Android-Components 110.0.20221218234933. 2022-12-19 02:05:20 +00:00
mozilla-l10n-automation-bot 9478a84be7
Import l10n. (#28237) 2022-12-19 00:38:37 +00:00
mozilla-l10n-automation-bot b73b37329e
Import l10n. (#28233) 2022-12-18 01:13:55 +00:00
MickeyMoz 185ea4a81f Update to Android-Components 110.0.20221217143322. 2022-12-17 17:03:14 +00:00
mozilla-l10n-automation-bot 74c48af0dd
Import l10n. (#28228) 2022-12-17 00:39:28 +00:00
MickeyMoz a643553360 Update to Android-Components 110.0.20221216190240. 2022-12-16 21:05:34 +00:00
sarah541 775258db6b Bug 1800700 - Add default search suggest header 2022-12-16 18:06:35 +00:00
Alexandru2909 52b4a1ebfa For #28155 - Show search terms in address bar for both edit and display modes 2022-12-16 16:38:08 +00:00
MickeyMoz 96ed5ecc0d Update to Android-Components 110.0.20221216143118. 2022-12-16 16:38:08 +00:00
DreVla 2e9a6685c4 For #27697 - Load icon for unified search engine immediately.
The engine icon was set after the screen was visible leading to a delay.
With this solution, the icon will be set before the screen is visible
eliminating any visible artefacts.
2022-12-16 08:04:22 +00:00
DreVla 35ab4db755 For #27697 - Load icon for browser and history search immediately.
The icon was set after the screen was visible leading to a flicker.
With this solution, the icon will be set before the screen is visible
eliminating any visible artefacts.
2022-12-16 08:04:22 +00:00
mozilla-l10n-automation-bot 4a0c1e5a8c
Import l10n. (#28218) 2022-12-16 00:38:05 +00:00
MickeyMoz 499385fb9c Update to Android-Components 110.0.20221215190237. 2022-12-15 20:57:21 +00:00
MickeyMoz 28c2b83d4e Update to Android-Components 110.0.20221215143201. 2022-12-15 16:19:49 +00:00
DreVla 60e09709ff For #28013 - Display correct hint for topic specific search engine
Since the search engines are split into two categories, general and
topic specific, the hint for each category is different.
2022-12-15 14:21:49 +00:00
DreVla 7e9b7b9279 For #28090: Show QR scanner when general or custom search engine is selected 2022-12-15 12:47:48 +00:00
AndiAJ d4d814ac25 For #26087 re-enable UI tests disabled due to tabs tray migration to compose 2022-12-15 10:31:57 +00:00
mike a 8d3a691d4e Closes #28205: fix ripple position over unified search icon 2022-12-15 09:55:17 +00:00
oana.horvath c9083280ea Issue #27312: Fallback measure for ETP UI tests and re-enabling them 2022-12-15 09:16:38 +00:00
mozilla-l10n-automation-bot a35bfdc79b
Import l10n. (#28203) 2022-12-15 05:43:21 +00:00
MickeyMoz b4a0ca596e Update to Android-Components 110.0.20221214190352. 2022-12-14 21:26:55 +00:00
Abdul Basit 5d1da3a5bc Closes mozilla-mobile#26733 Language search doesn't reset to full list view anymore 2022-12-14 19:43:42 +00:00
MickeyMoz 4cc8ccb13d Update to Android-Components 110.0.20221214143050. 2022-12-14 16:43:06 +00:00
Arturo Mejia ae25f75ee4 Bug 1797577 - Clear site data when turning off cookie banner handling. 2022-12-14 15:16:14 +00:00
AndiAJ 679cd403e6 For #26286 new verifyUndoRemoveTopSite UI test 2022-12-14 05:21:37 +00:00
mozilla-l10n-automation-bot a24e874c65
Import l10n. (#28191)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-14 02:51:04 +00:00
Gabriel Luong 7d15265299 Bug 1804820 - Refactor Versions to FenixVersions 2022-12-14 00:21:55 +00:00
Gabriel Luong 36c06f1276 Bug 1804820 - Refactor Deps to FenixDependencies 2022-12-14 00:21:55 +00:00
mozilla-l10n-automation-bot 6649416dd5
Import l10n. (#28187)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-13 19:21:59 +00:00
Arturo Mejia 278e1d301a No issue: Update add-ons collection. 2022-12-13 18:50:02 +00:00
MickeyMoz 622ffd80ac Update to Android-Components 110.0.20221213163249. 2022-12-13 13:20:01 -05:00
AndiAJ 7d0b1e9dd1 For #28165 fix showDefaultHomeScreen screenshot UI test 2022-12-13 16:51:56 +00:00
AndiAJ 3632aab037 For #26087 fix disabled tabMediaControlButtonTest UI test 2022-12-13 14:50:37 +00:00
Alexandru Putanu 4ee62ddfe7
For #26957 - Exit search dialog when interacting with home fragment (#27262)
* Revert "For #26790 - Dismiss search dialog when opening recent bookmark dropdown menu"

This reverts commit 262aa16991.

* Revert "For #26790 - Dismiss search dialog when opening recent visit dropdown menu"

This reverts commit b93b0850

* Revert "For #26790 - Dismiss search dialog when opening recent tab dropdown menu"

This reverts commit 44b71bb590.

* Revert "For #26690 - Dismiss search dialog when opening recent synced tab dropdown menu"

This reverts commit bda817a608.

* For #26957 - Remove code to dismiss search dialog when interacting with homescreen top sites

* For #26957 - Remove code to dismiss search dialog when interacting with homescreen collection

* For #26957 - Remove code to dismiss search dialog when interacting with homescreen recent visits

* For #26957 - Remove code to dismiss search dialog when interacting with homescreen recent tabs

* For #26957 - Remove code to dismiss search dialog when interacting with homescreen recent bookmarks

* For #26957 - Remove code to dismiss search dialog when interacting with pocket stories

* For #26957 - Dismiss search dialog when interacting with home fragment

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-13 12:42:05 +00:00
AndiAJ df4e08ff38 For #28170 fix failing mainMenuAddToHomeScreenTest UI test 2022-12-13 11:38:42 +00:00
AndiAJ 78c0b7ec3b For #26286 improve homeThreeDotMenuItemsTest UI test coverage and other refactoring work 2022-12-13 11:38:42 +00:00
AndiAJ 875a339ee7 Create new MatcherHelper object 2022-12-13 11:38:42 +00:00
mozilla-l10n-automation-bot 6bc1d27a7e
Import l10n. (#28178) 2022-12-13 00:54:35 +00:00
Gabriel Luong a09fb7999b For #28161- Refactor mozilla-detekt-rules in detekt.yml to the bottom of the file 2022-12-12 23:44:40 +00:00
MickeyMoz 46a8ed82e4 Update to Android-Components 110.0.20221212191718. 2022-12-12 23:06:56 +00:00
Arturo Mejia 1ea7554026 No issue: Update Cookie banner handling strings 2022-12-12 21:53:33 +00:00
Gabriel Luong c216e3b268 For #28174 - Remove all unused strings marked moz:removedIn <= 107 2022-12-12 20:00:59 +00:00
Jonathan Almeida c3dea0a834 Close #28137: Disable run-build tasks on Pull Requests 2022-12-12 18:39:37 +00:00
Ryan VanderMeulen 7d3784f9cd Update version.txt to 110.0b1 2022-12-12 17:44:53 +00:00
MickeyMoz 0d3f33a751 Update to Android-Components 109.0.20221212145348. 2022-12-12 16:37:28 +00:00
rahulsainani 5a1a6c1b5b Bug 1804690 - Allow emulator to access network of the host machine sidestepping the TLS error on debug channel 2022-12-12 13:25:44 +00:00
AndiAJ 0e88bfad6b For #26286 improve firstRunScreenTest UI test coverage 2022-12-12 07:59:06 +00:00
MickeyMoz 814328427b Update to Android-Components 109.0.20221211143351. 2022-12-11 19:16:43 +00:00
MickeyMoz 70048b810c Update to Android-Components 109.0.20221211031229. 2022-12-11 05:04:35 +00:00
mozilla-l10n-automation-bot bc94d00479
Import l10n. (#28157) 2022-12-10 00:48:38 +00:00
MickeyMoz 38f2f750f0 Update to Android-Components 109.0.20221209143110. 2022-12-09 16:50:59 +00:00
AndiAJ 2d2f4a0346 For #26286 improve verifySearchEnginesWithRTLLocale UI test coverage 2022-12-09 16:06:31 +00:00
oana.horvath 61d052b9d6 New UI test coverage for Toolbar position preference 2022-12-09 14:53:56 +00:00
oana.horvath 49ac79df65 New UI test coverage for Pull to refresh preference 2022-12-09 14:53:56 +00:00
oana.horvath 2c1622650d New UI test coverage for Swipe toolbar preference 2022-12-09 14:53:56 +00:00
oana.horvath b22fe8d3e5 Create a robot and test class for Customize Settings menu 2022-12-09 14:53:56 +00:00
AndiAJ 826cbdbaae For #28069 fix disabled openPocketStoryItemTest UI test 2022-12-09 13:57:21 +00:00
AndiAJ cf70dd11ca No issue: refactor verifyLinkFromClipboardNotDisplayedTest UI test 2022-12-09 09:17:01 +00:00
MickeyMoz 324e0cfac7 Update to Android-Components 109.0.20221209032153. 2022-12-09 05:19:42 +00:00
jeddai fb5e474273 update initial_experiments.json based on the current first-run experiments in experimenter 2022-12-09 01:59:13 +00:00
MickeyMoz f24c978620 Update to Android-Components 109.0.20221208190115. 2022-12-08 21:00:06 +00:00
Noah Bond 21c270bb87 For #28133 - Fix Pocket story category color mismatch 2022-12-08 19:44:46 +00:00
Arturo Mejia cc666c8887 Bug 1797577 - Add cookie banner handling panel to the toolbar. 2022-12-08 18:43:18 +00:00
MickeyMoz e7a7712a6b Update to Android-Components 109.0.20221208144508. 2022-12-08 17:08:25 +00:00
mozilla-l10n-automation-bot 6eaf7d5c51
Import l10n. (#28131) 2022-12-08 14:51:42 +00:00
Mugurell 4298ae9d96 Bug 1804544 - Disable TCP by default in beta and release 2022-12-08 10:02:00 +00:00
MickeyMoz a479ac5b26 Update to Android-Components 109.0.20221208025039. 2022-12-08 00:06:56 -05:00
DreVla f38d5c52f3 For #15348: Voice search option appears for all search engines
Voice search was restricted only for google, with the condition removed
it should appear now for all search engines
2022-12-08 04:58:06 +00:00
mozilla-l10n-automation-bot 3edc91d13d
Import l10n. (#28120) 2022-12-08 00:40:53 +00:00
t-p-white e65209af74 For #28114: Update CFR strings in Private Browsing Mode. 2022-12-07 23:37:31 +00:00
MickeyMoz b962311510 Update to Android-Components 109.0.20221207203046. 2022-12-07 22:07:05 +00:00
MickeyMoz f89ebb8753 Update to Android-Components 109.0.20221207143211. 2022-12-07 16:14:29 +00:00
mozilla-l10n-automation-bot 953f033cfd
Import l10n. (#28107) 2022-12-07 09:25:28 +00:00
mozilla-l10n-automation-bot 342f8138ed
Import l10n. (#28102)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-07 01:18:45 +00:00
Zac McKenney 4cd398a0b5 Bug 1804107 - Fix for BaseBrowserFragment toolbar getter null crash and invalidating actions when modifying toolbar 2022-12-07 00:46:00 +00:00
Aaron Train f6a52e9216 For #28098 - Disable openPocketDiscoverMoreTest 2022-12-06 22:48:49 +00:00
Jonathan Almeida 7a8b0a91c0 Bug 1799996 - Speculative fix checks CFRPopup.anchor is attached to window
We're seeing crashes in the Fenix copy of the `CFRPopup` that are
happening when our activity has already been destroyed, and then we are
trying to add a view to it with the WindowManager.

Our guess from looking at the traces are that the
`BrowserToolbarCFRPresenter` is receiving the `collect call on the main
thread, but further down the event loop. As well as the Runnable in
`CFRPopup#show` that is posting to the end event loop - both of these
calls are putting us in a state where the activity we want has already
been destroyed before we get to the moment where we want to use it.

This is a crash that is difficult to synthesize or write a test for.
As a result, our fix is rather speculative but still straight-forward
and safe to uplift, should it work.

There are three remaining follow-ups to do when fix is confirmed:
1. There is a CFRPopup that was upstreamed which is based on the Fenix
   implementation. We should upstream this patch to that component as
   well.
2. We should remove this copy of the CFRPopup and use the upstreamed
   version to avoid confusion between the two copies.
3. With this change, we are now gracefully failing when our users get
   into this state, however our telemtry and onboarding flows are
   unaware that the CFR was never shown.
   We need to to correct telemetry for `TrackingProtection.tcpCfrShown`
   to stop incorrectly reporting false positives and reset our
   `shouldShowTotalCookieProtectionCFR` pref to false so that we can
   try again at the appropriate time.

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2022-12-06 22:00:12 +00:00
MickeyMoz 383051eeeb Update to Android-Components 109.0.20221206190339. 2022-12-06 21:27:26 +00:00
Roger Yang 40e4c57ec4 Close #27949: Add Nimbus exposure event for re-engagement notification 2022-12-06 20:36:32 +00:00
priyanka0906 d4303a29c6 For #7924 - added an undo snackbar when a pinned site is removed 2022-12-06 19:12:54 +00:00
MickeyMoz 90d7ee2575 Update to Android-Components 109.0.20221206143258. 2022-12-06 16:35:33 +00:00
mozilla-l10n-automation-bot 54b2dac294
Import l10n. (#28083)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ryan VanderMeulen <rvandermeulen@mozilla.com>
2022-12-06 14:36:36 +00:00
Alexandru2909 3135062936 For #22770 - Use String.toShortUrl from A-C 2022-12-06 13:03:38 +00:00
Alexandru2909 9361fb1bb8 For #28010 - Update documentation for browser_search_with_ads and browser_search_ad_clicks 2022-12-06 12:20:55 +00:00
DreVla 80a1708d2f For #27753 - Update search engines immediately after changing system language 2022-12-06 10:33:51 +00:00
DreVla 807b0567f9 For #27753 - Update search engines immediately after changing language 2022-12-06 10:33:51 +00:00
Madalin Valceleanu 1b63240f99 Fixed link from clipboard open up from same URL on every new tab #15588 2022-12-06 00:31:05 +00:00
Jeff Boek 0ea57ded11 For mozilla-mobile#17904 - Increases tap area on the add shortcut button 2022-12-05 21:49:33 +00:00
joaopmatos 630edbb709 For #8545 - Change home screen recyclerView height to wrap_content 2022-12-05 21:03:41 +00:00
Perry McManis ce6dd57487 For #28042 - Increase lifetime of customize_home.contile to application 2022-12-05 17:53:41 +00:00
MickeyMoz 39d186b560 Update to Android-Components 109.0.20221205143121. 2022-12-05 16:01:16 +00:00
mozilla-l10n-automation-bot b054222676
Import l10n. (#28060)
Co-authored-by: Ryan VanderMeulen <rvandermeulen@mozilla.com>
2022-12-05 14:16:35 +00:00
oana.horvath 5b61f2ec72 No issue: RTL nav bar UI tests 2022-12-05 13:06:21 +00:00
oana.horvath 2c00a4b587 No issue: disables openPocketStoryItemTest 2022-12-05 11:25:42 +00:00
MickeyMoz c2442e8206 Update to Android-Components 109.0.20221203143207. 2022-12-03 16:09:14 +00:00
mozilla-l10n-automation-bot 70b623ca9f
Import l10n. (#28058) 2022-12-03 14:38:15 +00:00
MickeyMoz 351561a164 Update to Android-Components 109.0.20221202210159. 2022-12-02 23:55:19 +00:00
Zac McKenney b634f0e115 For #27540: Add screen size configuration change handling 2022-12-02 23:14:22 +00:00
Ryan VanderMeulen 3e4f0fabce Update protobuf to version 3.21.10 2022-12-02 15:53:31 +00:00
AndiAJ 181f6b5ffe For #26286 new dismissOnboardingWithPageLoadTest UI test 2022-12-02 09:02:01 +00:00
MickeyMoz a38def3468 Update to Android-Components 109.0.20221202003559. 2022-12-02 02:37:07 +00:00
mozilla-l10n-automation-bot e04b8b77b8
Import l10n. (#28049) 2022-12-02 00:31:48 +00:00
MickeyMoz 301034ac77 Update to Android-Components 109.0.20221201174451. 2022-12-01 19:48:47 +00:00
Rahul Sainani efdb1172ef
For mozilla-mobile#26736 - fix username validation error state (#28017) 2022-12-01 18:43:38 +01:00
mozilla-l10n-automation-bot 68bcf7e872
Import l10n. (#28038) 2022-12-01 01:02:46 +00:00
MickeyMoz 4d5ca81c6b Update to Android-Components 109.0.20221130170727. 2022-11-30 19:23:28 +00:00
MickeyMoz 148fe08f94 Update to Android-Components 109.0.20221129190138. 2022-11-30 01:19:38 +00:00
mozilla-l10n-automation-bot 561b56389b
Import l10n. (#28027) 2022-11-30 00:43:13 +00:00
Roger Yang 322b9ecf73 Close #28021: Add ability to opt in to receiving push notifications on Android 13+ devices 2022-11-29 19:51:51 +00:00
Andrew Halberstadt f42e18a20e Update Taskgraph to version 3.7.0 2022-11-29 18:49:16 +00:00
mozilla-l10n-automation-bot c1afeac743
Import l10n. (#28018)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-29 17:27:41 +00:00
MickeyMoz 1b34d74869 Update to Android-Components 109.0.20221129143251. 2022-11-29 11:32:20 -05:00
Alexandru2909 326986b98f For #26708 - Add search widget preview for nightly 2022-11-29 07:40:30 +00:00
mozilla-l10n-automation-bot acc4b8b2d9
Import l10n. (#28007)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-29 02:29:57 +00:00
Charlie Humphreys 73d105bd4e update nimbus event for sync sign in
https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/sync_auth_sign_in
2022-11-29 01:29:32 +00:00
Charlie Humphreys f3f98173e6 update override method response to be nullable 2022-11-29 01:29:32 +00:00
Charlie Humphreys 01bc96990c remove extra line 2022-11-29 01:29:32 +00:00
Charlie Humphreys 4dc05644c6 add license headers 2022-11-29 01:29:32 +00:00
Charlie Humphreys e400a8ed8d fix tests and linting 2022-11-29 01:29:32 +00:00
Charlie Humphreys 41f7698bfa remove mavenLocal from repositories 2022-11-29 01:29:32 +00:00
Charlie Humphreys 65a4442d89 update for pr feedback and add sync login event 2022-11-29 01:29:32 +00:00
Charlie Humphreys d8e724218f add Experimentation helper 2022-11-29 01:29:32 +00:00
Charlie Humphreys f709036636 Fixes #27933: record app opened event and add nimbus event test suite 2022-11-29 01:29:32 +00:00
Roger Yang 11efaff96c Close #27949: Add engagement notification for inactive users 2022-11-28 20:08:10 +00:00
MickeyMoz 9b920a472c Update to Android-Components 109.0.20221128143301. 2022-11-28 16:16:45 +00:00
DreVla f681171720 For #27896 - Match share sheet header style with the rest
"Send to device" share sheet header is now styled to match the other headers.
2022-11-28 12:04:26 +00:00
mcarare 171a2e6522 For #26633: Add post notifications permission. 2022-11-28 08:37:30 +00:00
MickeyMoz 4f5165d1da Update to Android-Components 109.0.20221127143308. 2022-11-28 01:16:30 +00:00
mozilla-l10n-automation-bot c4b9983bfb
Import l10n. (#27991) 2022-11-28 00:42:30 +00:00
mozilla-l10n-automation-bot fb0db11265
Import l10n. (#27981) 2022-11-27 00:39:25 +00:00
MickeyMoz 093918da60 Update to Android-Components 109.0.20221125143304. 2022-11-25 16:48:52 +00:00
mozilla-l10n-automation-bot 2d04c13c5c
Import l10n. (#27970) 2022-11-25 00:40:03 +00:00
AndiAJ 53d0a50973 For #26286 new verifyPocketLearnMoreLinkTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ e0cc64a13a For #26286 new selectStoriesByTopicItemTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ 12c01ff4f9 For #26286 new openPocketDiscoverMoreTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ 808884f625 For #26286 new openPocketStoryItemTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ d014295eaa For #26286 improve coverage for verifyPocketHomepageStoriesTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ cf0cf784eb For #26286 new verifyJumpBackInSectionTest UI test 2022-11-24 19:00:12 +00:00
AndiAJ c86c917cce For #26286 refactor homeScreenItemsTest UI test 2022-11-24 19:00:12 +00:00
MickeyMoz 38a1c4a357 Update to Android-Components 109.0.20221124143318. 2022-11-24 17:06:17 +00:00
James Hugman 5606e72872 Use NimbusBuilder from AppServices/AndroidComponents 2022-11-24 15:42:04 +00:00
AndiAJ 79d99a819b For #27966 disable verifySponsoredShortcutsSponsorsAndPrivacyOptionTest UI test 2022-11-24 14:55:30 +00:00
mcarare 216cb7233d For #27536: Update Jetpack Compose to latest version. 2022-11-24 13:39:16 +00:00
oana.horvath 8e09d2a023 No issue: Adding new start on homepage setting UI test 2022-11-24 12:34:41 +00:00
mozilla-l10n-automation-bot b2ef07bb10
Import l10n. (#27962)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-24 02:16:08 +00:00
Ryan VanderMeulen 3847ded1ba Update Sentry to version 6.8.0 2022-11-24 01:45:34 +00:00
MickeyMoz 8eb853db19 Update to Android-Components 109.0.20221123190051. 2022-11-23 21:37:58 +00:00
MatthewTighe 1fd2bab054 For #27950: add first week days of use growth data 2022-11-23 19:37:21 +00:00
MickeyMoz bca7ecc7d6 Update to Android-Components 109.0.20221123143300. 2022-11-23 16:25:40 +00:00
Arturo Mejia 9bf17f1a6a Disable cookie banner handling by default. 2022-11-23 09:43:15 -05:00
mcarare 415849f09d Use blank string instead of empty string for version name fallback in release variants.
App version name cannot be empty or null in SDK 33 PackageInfo.
2022-11-23 10:11:33 +00:00
mozilla-l10n-automation-bot 03ca41b0a8
Import l10n. (#27954) 2022-11-23 00:30:37 +00:00
Jocelyne 0631941e17 Closes #27288: Remove glean test rule and Android test runner from WallpaperUseCasesTest 2022-11-22 23:16:13 +00:00
PrashantSaroj eb9df51de6 Closes #27290 - Refactor DefaultLoadBitmapUseCase to receive orientation and files directory as argument 2022-11-22 19:09:56 +00:00
MickeyMoz 6a4cfe6777 Update to Android-Components 109.0.20221122143037. 2022-11-22 16:41:47 +00:00
mozilla-l10n-automation-bot 1a42fdd199
Import l10n. (#27940)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-22 01:08:18 +00:00
BFadairo 71bc9eb4f7 Closes #27854: Remove unnecessary Theme.getTheme() calls from FirefoxTheme usages 2022-11-22 00:13:35 +00:00
Arturo Mejia 4610fb2186 Update to Android-Components 109.0.20221121201219 2022-11-21 22:09:29 +00:00
James Hugman 5d2cf6f6b6 Fixup breaking change for application-services 96.0.0 2022-11-21 22:09:29 +00:00
Jonathan Almeida 6d9808a067 Close #26320: Make Nimbus first-startup comments clear in FenixApplication 2022-11-21 19:32:14 +00:00
Jonathan Almeida fc8b6788d3 Bug 1796146 - Update l10n descriptions for Cookie Banner protection 2022-11-21 19:00:39 +00:00
MickeyMoz e1f6122850 Update to Android-Components 109.0.20221121143245. 2022-11-21 17:03:51 +00:00
Mugurell 9671d0a638 For #27228 - Resume qr scanning if camera permission is changed
If permissions are changed the app process is restarted with the same
happening for the previously running app components.
SearchDialogFragment used for searches will check if qr scanning was in
progress and resume if needed.
PairFragment used for signing-in will start scanning on itself.

Android-Components will avoid resuming the scan functionality if the camera
permission is missing and so allow to request the permission again without the
camera permission related system calls causing issues.
2022-11-21 15:22:24 +00:00
Alexandru2909 43612486e4 For #27885 - Change default browser notification delay to 72 hours 2022-11-21 13:06:44 +00:00
MickeyMoz 592d19f4b6 Update to Android-Components 109.0.20221120190220. 2022-11-20 20:45:37 +00:00
mozilla-l10n-automation-bot c3705b3b1f
Import l10n. (#27910) 2022-11-20 00:35:52 +00:00
MickeyMoz 26361ce4f7 Update to Android-Components 109.0.20221119143258. 2022-11-19 16:23:18 +00:00
MickeyMoz 63a5171718 Update to Android-Components 109.0.20221118221738. 2022-11-19 01:17:50 +00:00
mozilla-l10n-automation-bot 8c736129b6
Import l10n. (#27904) 2022-11-19 00:33:41 +00:00
MickeyMoz 07c6a6f24e Update to Android-Components 109.0.20221118190312. 2022-11-18 21:13:59 +00:00
MickeyMoz 69e5ea8951 Update to Android-Components 109.0.20221118143430. 2022-11-18 16:03:08 +00:00
mozilla-l10n-automation-bot 78fc99ebfb
Import l10n. (#27890) 2022-11-18 00:36:29 +00:00
MickeyMoz df500666d7 Update to Android-Components 109.0.20221117204150. 2022-11-17 22:31:57 +00:00
James Hugman b3ec3062cc Fixes: #26320 Reorganize Nimbus Startup 2022-11-17 21:00:48 +00:00
Noah Bond 79521d692b For #27852 - Set BrowsingMode to Normal when selecting a wallpaper 2022-11-17 18:25:55 +00:00
MickeyMoz e99d9a5ccc Update to Android-Components 109.0.20221117143310. 2022-11-17 16:57:50 +00:00
oana.horvath d3dfbeb1a0 For #27704: Disable search group tests 2022-11-17 14:48:59 +00:00
Mugurell f81efb17c0 For #27346 - Disable swiping to switch tabs when fullscreen 2022-11-17 06:59:45 +00:00
MickeyMoz ebfcf11f9c Update to Android-Components 109.0.20221117001233. 2022-11-17 02:33:05 +00:00
mozilla-l10n-automation-bot 9ff56968cb
Import l10n. (#27871) 2022-11-17 00:35:58 +00:00
mcarare 7c7028844e For #25808: Re-enable UI media notification tests. 2022-11-16 22:11:43 +00:00
MickeyMoz 4b4875adeb Update to Android-Components 109.0.20221116192746. 2022-11-16 21:40:40 +00:00
DreVla 868a63a91a For #27801 - Update header text for the search selector menu 2022-11-16 21:00:20 +00:00
Noah Bond 3f3f508b2b For #27457 - Refactor Pocket category colors 2022-11-16 20:13:34 +00:00
Noah Bond 0609475ede For #27457 - Refactor Pocket category colors 2022-11-16 20:13:34 +00:00
mcarare 9a52bbcc3d For #25808: Temporary disable UI media notification tests.
Locally, on some devices, these tests pass.
Also, with devices on which the test fail, on mirroring the tests in real app usage the notification closes on tab close.
2022-11-16 17:30:51 +00:00
mcarare de8b990e8a Update to Android-Components 109.0.20221116143121 2022-11-16 17:30:51 +00:00
mcarare 0884a178ef For #25808: Fix failing 'process make_default_browser deep link for API 23 and below' test. 2022-11-16 17:30:51 +00:00
mcarare d9b2c6e5e1 For #25808: Handle PackageManager methods deprecation in UI tests. 2022-11-16 17:30:51 +00:00
mcarare 3472933c37 For #25808: Suppress deprecations in tests. 2022-11-16 17:30:51 +00:00
mcarare 5ddeba154c For #25808: Suppress onBackPressed deprecation. 2022-11-16 17:30:51 +00:00
mcarare 2e9fd871d6 Update to Android-Components 109.0.20221116053804. 2022-11-16 17:30:51 +00:00
mcarare ca46f2f07e For #25808: Remove unnecessary safe call. 2022-11-16 17:30:51 +00:00
mcarare 0b2fe605ce For #25808: Handle PackageManager methods deprecation. 2022-11-16 17:30:51 +00:00
mcarare 324b29cca7 For #25808: Handle get(String) deprecation. 2022-11-16 17:30:51 +00:00
mcarare a4b858e90f For #25808: Update URLStringUtils package path. 2022-11-16 17:30:51 +00:00
mcarare c5af10fac0 For #25808: Remove unnecessary elvis operator. 2022-11-16 17:30:51 +00:00
mcarare 87ed4e4c56 For #25808: Handle onBackPressed() deprecation. 2022-11-16 17:30:51 +00:00
mcarare e057bb4514 For #25808: Link only URLs in library descriptions.
Linkify.ALL is deprecated.
2022-11-16 17:30:51 +00:00
mcarare 8c0c9af65b For #25808: Update method signature for GestureDetector.SimpleOnGestureListener 2022-11-16 17:30:51 +00:00
mcarare 5feedd38c2 For #25808: Update method signature for AnimatorListenerAdapter. 2022-11-16 17:30:51 +00:00
mcarare 40fbcb6e9e For #25808: Update method signatures for View.OnAttachStateChangeListener 2022-11-16 17:30:51 +00:00
mcarare 0189958bff For #25808: Handle a11y obtain() methods deprecations. 2022-11-16 17:30:51 +00:00
mcarare 8638fa3ba3 For #25808: Update method signature for View.AccessibilityDelegate. 2022-11-16 17:30:51 +00:00
mcarare c947fa07bf For #25808: Fix smart cast exception. 2022-11-16 17:30:51 +00:00
mcarare ef96a08a55 For #25808: Build with compileSdkVersion for Android 13 / API 33. 2022-11-16 17:30:51 +00:00
Mugurell a71aad1702 For #26826 - Add test tags allowing to differentiate Pocket stories 2022-11-16 10:11:45 +00:00
oana.horvath 537c296f63 For #27220: replaces manually deleting a file with deleting storage programmatically. 2022-11-16 09:05:46 +00:00
Arturo Mejia cca309e0e6 Improve site permissions 2022-11-16 03:28:25 +00:00
MickeyMoz 9a47aa3ac9 Update to Android-Components 109.0.20221115235215. 2022-11-16 03:28:25 +00:00
rxu fd716ddbe3 Add distribution_id in baseline ping 2022-11-16 02:24:12 +00:00
mozilla-l10n-automation-bot 5c0dcda19e
Import l10n. (#27856) 2022-11-16 00:34:30 +00:00
Jonathan Almeida 840c91d9e8 Close #26475: Remove more feature flags 2022-11-15 22:06:01 +00:00
Michelle Goossens a343d60478 Bug 1799910 - Migrate fenix from AWS to GCP 2022-11-15 16:20:52 -05:00
owlishDeveloper 8589aec0a0 Bug 1796146 - Add UI for the Cookie Banner preferences 2022-11-15 19:42:54 +00:00
kl3jvi c87589bef2 For #27575: Add String.toHexColor extension 2022-11-15 19:11:57 +00:00
MickeyMoz 1a5443167d Update to Android-Components 109.0.20221115143228. 2022-11-15 17:45:08 +00:00
Alexander Gramiak 48288f0198 For #21414: Use MenuProvider and MenuHost interface methods
onPrepareOptionsMenu was not being called on invalidateOptionsMenu,
which led to the saveButton being left enabled even with invalid
hostnames, usersnames, and passwords.
2022-11-15 15:12:08 +00:00
mcarare c67bbb3e03 For #27538: Return null for clipboard text longer than MAX_URI_LENGTH.
This avoids extra processing of large text that is unlikely to be an URL.
2022-11-15 09:42:56 +00:00
MickeyMoz be7c0ba401 Update to Android-Components 109.0.20221114224659. 2022-11-15 01:42:01 +00:00
mozilla-l10n-automation-bot 76159bcbba
Import l10n. (#27835)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-15 01:08:35 +00:00
MatthewTighe b2c89763f1 Remove all unused strings marked moz:removedIn <= 106 2022-11-15 00:32:58 +00:00
Roger Yang 5222d2bd8b Close #27795: Add metrics ping to see if user allows notifications 2022-11-15 00:00:31 +00:00
Gabriel Luong 20b396e0cd For #26475 - Remove unnecessary features flags 2022-11-14 22:31:55 +00:00
MickeyMoz d5459de3b5 Update to Android-Components 108.0.20221114190357. 2022-11-14 21:32:11 +00:00
mike a 7c4050eb08 Closes #25809: tapping on search engine triggers engine selection 2022-11-14 20:47:03 +00:00
dsmithpadilla 74ff3f4c51 Update version.txt to 109.0b1 2022-11-14 20:16:48 +00:00
MickeyMoz 004158028e Update to Android-Components 108.0.20221114143121. 2022-11-14 16:17:05 +00:00
Julien Cristau aa7e56d036
Update mergify queue conditions to account for update-nimbus-experiments PRs (#27774)
The update-nimbus-experiments workflow creates PRs that don't schedule a
`complete-pr` task (because the github-actions bot is untrusted), but in this
case we have a `complete-push` task which is good enough.
2022-11-14 11:17:40 +01:00
mozilla-l10n-automation-bot 9113bdb513
Import l10n. (#27821) 2022-11-14 00:42:02 +00:00
MickeyMoz 98df4b87e6 Update to Android-Components 108.0.20221113143151. 2022-11-13 15:46:18 +00:00
mozilla-l10n-automation-bot ae751dd574
Import l10n. (#27817) 2022-11-13 00:40:06 +00:00
MickeyMoz 3d1e6b4eea Update to Android-Components 108.0.20221112143158. 2022-11-12 16:15:26 +00:00
mozilla-l10n-automation-bot 2aa79d30d2
Import l10n. (#27811) 2022-11-12 00:36:43 +00:00
Ryan VanderMeulen 669b8fc043 Update leakcanary to version 2.10 2022-11-11 19:54:31 +00:00
MickeyMoz c779c36f65 Update to Android-Components 108.0.20221111143147. 2022-11-11 16:05:04 +00:00
Alexander Gramiak fbea76df74 No issue: Remove deprecated gradle property
This fixes the following build warning with no behavior change:

WARNING:The option 'android.enableUnitTestBinaryResources' is deprecated.
The current default is 'false'.
It has been removed from the current version of the Android Gradle plugin.
The raw resource for unit test functionality is removed.
2022-11-11 03:53:14 +00:00
mozilla-l10n-automation-bot cdabd25cd8
Import l10n. (#27805) 2022-11-11 00:40:17 +00:00
Roger Yang be63c162b0 Close #27779: Add telemetry for showing the default browser notification 2022-11-10 19:07:33 +00:00
Aaron Train 7c92420690 For #27799: Upgrade AndroidX Test Depdencies 2022-11-10 18:10:07 +00:00
MickeyMoz a60a4c5bc9 Update to Android-Components 108.0.20221110143111. 2022-11-10 16:12:24 +00:00
Mugurell 18d51d9ce2 For #27549 - Collect shim data about the Pocket sponsored stories.
With the new telemetry will immediately report when a certain Pocket sponsored
story is shown (visible more than 50%) or clicked by the user.
The reasons for the new ping help easily identify the probe being sent and the
type of shim data.
2022-11-10 14:38:59 +00:00
mcarare 573e320708 No issue: Make the Startup profiling hints clearer. 2022-11-10 08:15:04 +00:00
mozilla-l10n-automation-bot 786358c7dd
Import l10n. (#27787) 2022-11-10 00:38:09 +00:00
MatthewTighe 3c9ba2bbaa For #27782: add first URI load growth data 2022-11-09 22:48:05 +00:00
MatthewTighe 5947344dd2 For 27768: add FirstAppOpenForDay growth data 2022-11-09 22:48:05 +00:00
mergify 6b89c28604 update initial_experiments.json based on the current first-run experiments in experimenter 2022-11-09 14:35:59 -05:00
AndiAJ 8fa230a78e For #27714 fix disabled sponsored shortcut UI tests 2022-11-09 18:40:55 +00:00
Alexander Gramiak ba5ee133dc For #27734: Make tab tray overflow menu background layer2
This matches with the toolbar overflow menu.
2022-11-09 18:15:04 +00:00
Alexander Gramiak df2458002b For #27715: Allow FirefoxColors.copy to override some values
This helps to reduce theme color duplication, making it easier to see
which parameters differ.

This also brings FirefoxColors closer to the upstream Compose Material
Colors class.
2022-11-09 17:17:48 +00:00
MickeyMoz f814c7c0f3 Update to Android-Components 108.0.20221109144837. 2022-11-09 11:42:38 -05:00
Mugurell af8e364381 For #26826 - Add test tags for the recent bookmarks section. 2022-11-09 16:38:04 +00:00
Mugurell 0924de7753 For #26826 - Add test tags for the recent visits section. 2022-11-09 16:38:04 +00:00
Mugurell 5102adc001 For #26826 - Add test tags for the recent tabs section. 2022-11-09 16:38:04 +00:00
Mugurell f8c0ad0e59 For #26826 - Add test tags for the Pocket section 2022-11-09 16:38:04 +00:00
oana.horvath f8124ffb28 For #27522: Re-enabled and added search group UI tests 2022-11-09 16:03:54 +00:00
mozilla-l10n-automation-bot 55185dcca9
Import l10n. (#27769)
Co-authored-by: dsmithpadilla <88508950+dsmithpadilla@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-09 06:59:31 +00:00
Jonathan Almeida 706a73ea3e Issue #27759: Add link to storageMaintenance flag 2022-11-09 06:25:42 +00:00
mergify 945019e07c update initial_experiments.json based on the current first-run experiments in experimenter 2022-11-09 00:58:38 -05:00
github-actions[bot] e483644de6
Update to Android-Components 108.0.20221108190330. (#27761)
Co-authored-by: MickeyMoz <sebastian@mozilla.com>
Co-authored-by: dsmithpadilla <88508950+dsmithpadilla@users.noreply.github.com>
2022-11-09 00:07:24 -05:00
Jonathan Almeida 81f513e357 Bug 1798805 - Initialize the FxaPushSupportFeature
We added the new `initialize` to explicitly make the call to start the
feature but we never actually used it here after it landed.
2022-11-08 17:45:40 -05:00
Roger Yang 5af08cd72c Close #27023: Add capability to override telemetry URL using local properties 2022-11-08 18:13:52 +00:00
MickeyMoz d7e40b2a0c Update to Android-Components 108.0.20221108143336. 2022-11-08 16:40:57 +00:00
AndiAJ 39937f51c9 For #27392 fix flaky verifyAboutFirefoxPreview UI test 2022-11-08 10:03:50 +00:00
MickeyMoz 00327bb4e4 Update to Android-Components 108.0.20221108031613. 2022-11-08 05:00:42 +00:00
Ben Dean-Kawamura 70e740f23e Updating the code to work with application-services v95.0.0
This required updating the code to handle the new app-services error
hierarchy.
2022-11-08 05:00:42 +00:00
mozilla-l10n-automation-bot 78bedb9f3c
Import l10n. (#27749)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-08 01:14:05 +00:00
MatthewTighe 2bccb86a9b For #27698: add set as default growth data 2022-11-07 19:04:46 -05:00
Noah Bond c59b0845a0 For #27746 - Move top sites text outside of backplating 2022-11-07 22:52:45 +00:00
Noah Bond 82fb016098 Revert "For #26606 - Add backplating to Top Sites 2022-11-07 22:52:45 +00:00
MickeyMoz 9524ab4845 Update to Android-Components 108.0.20221107190113. 2022-11-07 20:36:58 +00:00
Alexander Gramiak 3c0aaa75c0 For #27511: Remove duplicate padding update code
This padding update is already performed in FenixSnackbar.make when
isDisplayedWithBrowserToolbar is true, and that variable has no other
side-effects, so simply use that code.
2022-11-07 18:47:12 +00:00
mozilla-l10n-automation-bot ac64ec9eff
Import l10n. (#27741)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-07 17:55:55 +00:00
Gregory Mierzwinski bfc385ffce Bug 1793823 - Disable perf tests running on P2. 2022-11-07 17:25:35 +00:00
MickeyMoz c2dbba996a Update to Android-Components 108.0.20221107143052. 2022-11-07 16:03:55 +00:00
mozilla-l10n-automation-bot 3b85861a0c
Import l10n. (#27736) 2022-11-07 00:32:22 +00:00
MickeyMoz c9bebbc4f9 Update to Android-Components 108.0.20221106143258. 2022-11-06 16:01:00 +00:00
mozilla-l10n-automation-bot 61dc36be9f
Import l10n. (#27727) 2022-11-06 00:40:30 +00:00
MickeyMoz 8a38f84bd0 Update to Android-Components 108.0.20221105143131. 2022-11-05 16:01:12 +00:00
mozilla-l10n-automation-bot dae5265c40
Import l10n. (#27717) 2022-11-05 00:38:51 +00:00
MickeyMoz 56cd0e9022 Update to Android-Components 108.0.20221104182737. 2022-11-04 20:16:28 +00:00
AndiAJ 03602239bd For #26710 fix flaky deleteCookiesTest UI test 2022-11-04 16:36:12 +00:00
Gabriel Luong 5410be0e8c For #27667 - Update the commit sha in .git-blame-ignore-revs 2022-11-04 07:36:58 +00:00
Alexandru2909 f10634e593 For #27252 - Update a11y services label for private browsing myths button 2022-11-04 06:57:56 +00:00
mozilla-l10n-automation-bot 61b7815e08
Import l10n. (#27701) 2022-11-04 00:42:32 +00:00
Gabriel Luong 9654b4dfb1 For #27667 - Remove import-ordering from the list of disabled ktlint rules 2022-11-03 23:27:03 +00:00
Noah Bond 1b89abdf3e For #27469 - Update no collections button colors when a wallpaper is selected 2022-11-03 22:35:56 +00:00
Noah Bond 07e461390b For #27468 - Backplate homepage MessageCard 2022-11-03 22:05:47 +00:00
Alexandru2909 62b65d3a57 For #27691 - Replace 'Pocket' word in all strings with placeholder 2022-11-03 20:30:37 +00:00
perrymcmanis144 90d0d9a7c5 Update app/metrics.yaml
Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
2022-11-03 15:56:09 -04:00
Perry McManis c4b4f07a25 added search metrics to baseline ping 2022-11-03 15:56:09 -04:00
kycn dda6719c32 Close #7227: Re-enable storage maintenance call.
Re-enable storage maintenance call by introducing WorkManager worker on A-C side and consuming it from Fenix.
The work request is periodic and the repeat interval is 24h. It requires the device to be idle and not to have
low battery. This feature is available only for Nightly for now.
2022-11-03 19:04:58 +00:00
MickeyMoz 408d15af9b Update to Android-Components 108.0.20221103143443. 2022-11-03 16:33:12 +00:00
AndiAJ 035305ceb2 For #27220 disable failing manageDownloadsInDownloadsMenuTest UI test 2022-11-03 15:48:12 +00:00
t-p-white 6228dad8e4 For #27472 - Added telemetry data points for the Google Play Store review prompts 2022-11-03 14:57:54 +00:00
Jonathan Almeida ef2af26b69 Bug 1795105: Remove usages of ContentState.thumbnail 2022-11-03 13:56:42 +00:00
Alexandru2909 ee0bff886a For #25814 - Hide "Show search engines" toggle from search settings when unified search is enabled 2022-11-03 08:36:25 +00:00
mozilla-l10n-automation-bot 3a41b00e36
Import l10n. (#27679) 2022-11-03 00:36:18 +00:00
MickeyMoz cd5923f669 Update to Android-Components 108.0.20221102215151. 2022-11-02 23:20:50 +00:00
Noah Bond c89a0d20ef For #27578 - Add optional color parameters to MessageCard 2022-11-02 22:16:21 +00:00
MickeyMoz c18972c29d Update to Android-Components 108.0.20221102190107. 2022-11-02 21:30:30 +00:00
Ryan VanderMeulen ac1393e640 Update Adjust to version 4.33.0 2022-11-02 18:34:17 +00:00
DreVla 27c34cecbf For #27635 - New telemetry for Save to PDF failures 2022-11-02 17:19:42 +00:00
MickeyMoz 063f00ca95 Update to Android-Components 108.0.20221102143037. 2022-11-02 12:42:41 -04:00
Christian Sadilek 1dbee2291b Closes #27652: Fix A-C auto publish docs in README 2022-11-02 12:41:07 -04:00
Gabriel Luong 03e6ac04e8 For #27656 - Add a Fenix prefix to GitHub actions 2022-11-02 16:00:10 +00:00
AndiAJ 7d2f18b314 For #27522 new search codes UI tests 2022-11-02 15:02:30 +00:00
oana.horvath e9ef7c2546 Issue #27522: Search groups tests refactoring 2022-11-02 09:33:26 +00:00
Alexandru2909 4047d97ad6 For #25813 - Use specific hint for history, bookmarks and tab unified search 2022-11-02 08:21:19 +00:00
mozilla-l10n-automation-bot c75efe35b3
Import l10n. (#27654)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-02 00:58:21 +00:00
Arturo Mejia 3c70d237d8 Bug 1796482 - Report save to PDF errors. 2022-11-02 00:10:21 +00:00
MickeyMoz 1b9a86bfaa Update to Android-Components 108.0.20221101212406. 2022-11-01 23:06:39 +00:00
MickeyMoz d30753ccef Update to Android-Components 108.0.20221101190054. 2022-11-01 21:19:16 +00:00
Roger Yang d9d855685e Close #27023: Add capability to override telemetry URL 2022-11-01 20:26:26 +00:00
Noah Bond 79f0ce4cd3 For #27331 - Add migration for Turning Red wallpaper card colors 2022-11-01 19:55:20 +00:00
Noah Bond a44d9ff8d9 For #27485 - Replace `Button` in `CustomizeHomeButtonViewHolder` with `TertiaryButton` 2022-11-01 19:26:26 +00:00
Noah Bond 8857073e5b For #27485 - Add optional overrides for the colors in `Button` Composables 2022-11-01 19:26:26 +00:00
Noah Bond 0933f901fc For #27579 - Fix broken previews for MessageCard 2022-11-01 18:56:58 +00:00
Alexandru2909 62a661ab97 For #26911 - Allow users to enable re-supported Fennec extensions 2022-11-01 17:13:24 +00:00
dsmithpadilla 90b8d339e1 Update to Android-Components 108.0.20221101143225
AC version off the new firefox-android repo
2022-11-01 17:13:24 +00:00
Mugurell 50c8e56bd2 For #27627 - Check the TCP CFR status lazily
Use lazyFeatureFlagPreference as a quick small way to avoid a race between
initializing the value and the Nimbus initialization based on which the value
should be calculated.
This is the same flow that the other MR experiments use.
2022-11-01 14:13:43 +00:00
DreVla bc76907605 For #10344 - Enable tab reordering in beta/release 2022-11-01 12:11:42 +00:00
AndiAJ a5c1c578bd For #27522 remove shortcutButtonTest UI test and unused SearchRobot functions 2022-11-01 11:27:31 +00:00
AndiAJ 307460c3c3 For #27522 refactor shortcutSearchEngineSettingsTest to setDefaultSearchEngineFromShortcut 2022-11-01 11:27:31 +00:00
AndiAJ 9c46639331 For #27522 new toggleSearchEnginesShortcutListTest UI test 2022-11-01 11:27:31 +00:00
AndiAJ 3efd1dc9f2 For #27522 new verifySearchEnginesWithRTLLocale UI test 2022-11-01 11:27:31 +00:00
AndiAJ 418302dbfa For #27522 new changeSearchEnginesBasedOnTextTest UI test 2022-11-01 11:27:31 +00:00
Alexandru2909 97f3a1fd8a For #25811 - Add header to unified search engine menu 2022-11-01 09:20:29 +00:00
iorgamgabriel 5ae0ed3830 For #27450 Fix Crash from Navigation action/destination org.mozilla.firefox:id/action_savedLoginsAuthFragment_to_loginsListFragment 2022-11-01 07:36:41 +00:00
AndiAJ 7ac5674e81 For #26934 fix showDefaultHomeScreen screenshot test 2022-11-01 06:21:35 +00:00
mozilla-l10n-automation-bot f0cc6e071e
Import l10n. (#27631) 2022-11-01 00:44:40 +00:00
Harrison Oglesby e052493cd5
For #27459 - Add divider composable (#27544) 2022-10-31 12:36:41 -07:00
MickeyMoz 400fc98d35 Update to Android-Components 108.0.20221031143305. 2022-10-31 16:19:42 +00:00
MickeyMoz ef79099e97 Update to Android-Components 108.0.20221031113629. 2022-10-31 13:36:51 +00:00
AndiAJ a16e6ce102 For #27522 new delete all search engines UI test 2022-10-31 10:03:13 +00:00
AndiAJ c47986e742 For #27522 new delete default search engine UI test 2022-10-31 10:03:13 +00:00
AndiAJ 29f1356cdf For #27522 new undo delete search engine UI test 2022-10-31 10:03:13 +00:00
mozilla-l10n-automation-bot d027b47d3e
Import l10n. (#27618) 2022-10-31 00:36:41 +00:00
MickeyMoz 4768aa2599 Update to Android-Components 108.0.20221030143256. 2022-10-30 16:04:35 +00:00
mozilla-l10n-automation-bot cb12f20cc9
Import l10n. (#27612) 2022-10-30 00:39:19 +00:00
MickeyMoz 9f8216d654 Update to Android-Components 108.0.20221029143054. 2022-10-29 16:11:53 +00:00
MickeyMoz 5d3f2ad5c5 Update to Android-Components 108.0.20221029010307. 2022-10-29 02:29:14 +00:00
mozilla-l10n-automation-bot db31b3e2fb
Import l10n. (#27606) 2022-10-29 00:37:13 +00:00
Aaron Train 703d9ba466 Update Google Cloud SDK Version in ui-tests Dockerfile
203 -> 407

https://cloud.google.com/sdk/docs/release-notes
2022-10-28 18:50:04 +00:00
Arturo Mejia 3fe88c05b2 Bug 1780639 - let Save as PDF ride the trains. 2022-10-28 18:19:36 +00:00
oana.horvath c528c371d5 For #27522: New search settings UI tests coverage 2022-10-28 17:43:16 +00:00
MickeyMoz 1da0d91ed9 Update to Android-Components 108.0.20221028143126. 2022-10-28 12:41:50 -04:00
iorgamgabriel 1362ec6b66 For #27524 Set as default browser toggle get set to true after user select Fenix as default browser 2022-10-28 07:59:32 +00:00
Gabriel Luong 9a4d4c1371 For #27584 - Replace Button in RecentSyncedTab with SecondaryButton 2022-10-28 07:00:19 +00:00
MickeyMoz 75460afc10 Update to Android-Components 108.0.20221028000535. 2022-10-28 02:17:15 +00:00
mozilla-l10n-automation-bot b67fb6573e
Import l10n. (#27581) 2022-10-28 00:39:09 +00:00
Alexander Gramiak f352a4f9dc For #27269: Use parentFile method over substring extraction
This fixes gradle tests on Windows, where the file separator is "\"
and not "/".
2022-10-27 22:54:18 +00:00
Roger Yang 35e0afe329 Close #24613: Remove history improvement feature flag 2022-10-27 21:30:45 +00:00
Ryan VanderMeulen e8ef439469 Update Sentry to 6.6.0 2022-10-27 20:58:18 +00:00
chettas 5f51a62424 For #27336: Combine Google package name regex 2022-10-27 19:57:34 +00:00
MickeyMoz 5e44259f17 Update to Android-Components 108.0.20221027143133. 2022-10-27 18:08:05 +00:00
Alexander Gramiak 5c2679006d Add and update tests for login address view holder 2022-10-27 17:36:28 +00:00
Alexander Gramiak 9fd2d20310 For #16162: Simplify site addresses in saved logins view
This is what Firefox Desktop does.
2022-10-27 17:36:28 +00:00
t-p-white 0c13a5aa5d For #27455 - Rename all reference names to `AppStore` as appStore 2022-10-27 16:57:38 +00:00
mozilla-l10n-automation-bot 7d39494c06
Import l10n. (#27566)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-27 15:10:04 +00:00
ohall-m 02d4da00d6 For #27458: Add AD_ID Permission
Added AD_ID Permission to Manifest for Android 13.
2022-10-27 14:43:13 +00:00
MickeyMoz 2f34e8f8cd Update to Android-Components 108.0.20221026223604. 2022-10-27 03:04:56 +00:00
mozilla-l10n-automation-bot 1255319747
Import l10n. (#27558) 2022-10-27 02:31:25 +00:00
MickeyMoz ba02e745b2 Update to Android-Components 108.0.20221026190101. 2022-10-26 20:32:11 +00:00
Noah Bond f4e7471aea For #26520 - Color homepage cards via wallpaper card colors 2022-10-26 17:41:11 +00:00
MickeyMoz 374bff84c4 Update to Android-Components 108.0.20221026143138. 2022-10-26 17:07:37 +00:00
mozilla-l10n-automation-bot e9387e50d4
Import l10n. (#27553) 2022-10-26 16:32:14 +00:00
Roger Yang 489548b0de For #11404 - Add 'Open all' options in bookmarks
* Add "Open all in new tabs" options in bookmarks
* Add "Open all in private tabs" options in bookmarks
* Add metrics tracking if the usage of "Open all in..." in bookmarks

Co-authored-by: Pg <pg.developper.fr@gmail.com>
2022-10-26 14:17:28 +00:00
mozilla-l10n-automation-bot adb9cfbb24
Import l10n. (#27546) 2022-10-26 00:37:04 +00:00
mcarare 6913cd59c9 For #27541: Update AndroidX Annotation to latest version.
Add AndroidX Annotation as a direct dependency to app build.gradle.
Update imports for annotations moved to Companion Object.
2022-10-25 19:15:08 +00:00
MickeyMoz 919c40e407 Update to Android-Components 108.0.20221025143110. 2022-10-25 16:26:17 +00:00
Roger Yang 6237b26e36 No issue: Update data renewal request script 2022-10-25 15:32:49 +00:00
MickeyMoz 5a0b85fad2 Update to Android-Components 108.0.20221025010754. 2022-10-25 02:55:24 +00:00
MickeyMoz 722ea2b559 Update to Android-Components 108.0.20221024190111. 2022-10-24 21:01:39 +00:00
Timshel 814f87f9f3 For #26577 - resetFocus only when camera permission is denied 2022-10-24 18:50:17 +00:00
MickeyMoz 7ceb931940 Update to Android-Components 108.0.20221024143125. 2022-10-24 17:20:54 +00:00
AndiAJ 7ea69a43ab For #26286 new external links UI tests 2022-10-24 14:47:02 +00:00
AndiAJ 6998809039 For #26286 new web control UI tests 2022-10-24 14:47:02 +00:00
AndiAJ ce3d6b84ca Add external links static asset 2022-10-24 14:47:02 +00:00
AndiAJ f369129aad Add HTML controls static asset 2022-10-24 14:47:02 +00:00
mozilla-l10n-automation-bot 731748a5b1
Import l10n. (#27512) 2022-10-24 00:31:07 +00:00
MickeyMoz 8b01578488 Update to Android-Components 108.0.20221023143208. 2022-10-23 16:03:24 +00:00
MickeyMoz 5f136e8227 Update to Android-Components 108.0.20221022143114. 2022-10-22 16:00:04 +00:00
mozilla-l10n-automation-bot d44e8b0052
Import l10n. (#27498) 2022-10-22 00:39:02 +00:00
MickeyMoz 8c22f3faab Update to Android-Components 108.0.20221021143146. 2022-10-21 15:59:54 +00:00
Alexandru2909 9a99666d2b For #27135 - Correctly report top sites for a11y services 2022-10-21 09:32:55 +00:00
Alexandru2909 dbc05b4aa5 For #9323 - Use android:background to set small search widget microphone icon 2022-10-21 06:41:35 +00:00
MickeyMoz bd465bb44f Update to Android-Components 108.0.20221021021005. 2022-10-21 03:35:56 +00:00
mozilla-l10n-automation-bot 2517804c8f
Import l10n. (#27488) 2022-10-21 00:39:17 +00:00
MickeyMoz 37a3f43875 Update to Android-Components 108.0.20221020190123. 2022-10-20 20:48:27 +00:00
MatthewTighe 83e2ab5d38 No issue: add script to generate filled telemetry renewal request 2022-10-20 19:53:07 +00:00
MickeyMoz 79a55e0b0f Update to Android-Components 108.0.20221020143135. 2022-10-20 18:32:02 +00:00
AndiAJ 990d015c3d Add smoke test annotations for blockCookiesStorageAccessTest and allowCookiesStorageAccessTest UI tests 2022-10-20 13:55:53 +00:00
AndiAJ 6834aadf84 For #27478 fix for allowCookiesStorageAccessTest UI test 2022-10-20 13:55:53 +00:00
sarah541 8ac2dc317b Truncate urls to prevent slowing down of UI 2022-10-20 03:55:56 +00:00
Meiirbek Baimuratov adfed996a2 For mozilla-mobile#27282: delete WallpaperManager 2022-10-20 01:31:08 +00:00
mozilla-l10n-automation-bot 0cfa44e634
Import l10n. (#27474) 2022-10-20 00:39:13 +00:00
Gregory Mierzwinski 5e60cea503
Bug 1791998 - Disable TCP popup when running performance tests. (#27451)
* Disable TCP popup when running performance tests.

* Run some perf tests.

* Undo testing changes.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-19 22:47:42 +00:00
Alexandru2909 fe25aa8e14 For #21787 - Update the Pocket stories toggle label and summary from homepage settings 2022-10-19 22:18:44 +00:00
MickeyMoz 90960153ce Update to Android-Components 108.0.20221019143129. 2022-10-19 17:05:53 +00:00
sv-ohorvath 106b692c41 Adds TCP prompt & storage access tests 2022-10-19 15:33:44 +00:00
sv-ohorvath 61a3f26cba No issue: refactoring for ETP tests 2022-10-19 15:33:44 +00:00
AndiAJ 9721381243 For #25029 and #26087 re-enable useAppWhileTabIsCrashedTest and privateBrowsingUseAppWhileTabIsCrashedTest UI tests 2022-10-19 15:01:45 +00:00
Aaron Train 89acf3b3a2 No issue: Fix for None key-pair in Flank client-details
Remove URL construction
2022-10-19 14:32:20 +00:00
AndiAJ 6a07c171ca No issue: Refactor web page items long clicks 2022-10-19 12:01:35 +00:00
AndiAJ 8cd394b88e No issue: Refactor web page items clicks and setting text 2022-10-19 12:01:35 +00:00
Noah Bond a0df375b17 For #27456 - Migrate Context.isDark() into a top-level extension 2022-10-19 02:08:42 +00:00
mozilla-l10n-automation-bot 1e8a719197
Import l10n. (#27462) 2022-10-19 00:35:54 +00:00
Roger Yang 20b25d77dd For #27439: Remove all unused strings marked moz:removedIn <= 105 2022-10-18 19:51:55 +00:00
Ryan VanderMeulen 0194e11a19 Update jna to version 5.12.1 2022-10-18 19:02:01 +00:00
MickeyMoz 14d169dd4c Update to Android-Components 108.0.20221018160640. 2022-10-18 17:39:04 +00:00
Aaron Train c1b2f78219 No issue: Add source commit pair to Flank client-details flag 2022-10-18 13:29:16 +00:00
Alexandru2909 2b2f3a711e For #27405 - Clean up references to "Sing in to Sync" phrase 2022-10-18 10:06:46 +00:00
mozilla-l10n-automation-bot 8fa81d4cd2
Import l10n. (#27441) 2022-10-18 00:35:36 +00:00
MickeyMoz cfe143ae6a Update to Android-Components 108.0.20221017190200. 2022-10-17 21:59:59 +00:00
Ryan VanderMeulen 4a118751a3 Update protobuf to 3.21.7 2022-10-17 20:20:19 +00:00
DonalMe c0fbd2bd13 Update version.txt to 108.0b1. 2022-10-17 14:57:49 -04:00
MickeyMoz 573d854e7c Update to Android-Components 107.0.20221017143148. 2022-10-17 16:19:01 +00:00
mozilla-l10n-automation-bot 9284513b49
Import l10n. (#27431) 2022-10-17 00:35:26 +00:00
MickeyMoz f362aed4b2 Update to Android-Components 107.0.20221016143152. 2022-10-16 16:02:49 +00:00
mozilla-l10n-automation-bot cd2a8987ea
Import l10n. (#27424) 2022-10-16 00:34:27 +00:00
MickeyMoz 4c0571af22 Update to Android-Components 107.0.20221015145354. 2022-10-15 16:34:02 +00:00
mozilla-l10n-automation-bot 16062968cc
Import l10n. (#27419) 2022-10-15 00:36:14 +00:00
MickeyMoz 53ecff6a21 Update to Android-Components 107.0.20221014190058. 2022-10-14 20:49:09 +00:00
MickeyMoz 01990accf9 Update to Android-Components 107.0.20221014143152. 2022-10-14 16:46:15 +00:00
Ryan VanderMeulen ab7ba41946 Update Adjust to latest release 2022-10-14 14:34:09 +00:00
Ryan VanderMeulen e6ca08df3b Update Google Play Review dependency to 2.0.0 2022-10-14 13:23:52 +00:00
mozilla-l10n-automation-bot 6661a61e57
Import l10n. (#27404)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-14 01:02:21 +00:00
Sammy Khamis b36ce9fd34 For #27117 - Update copy for the menu from "Sign in to sync" to "Sync and save data" 2022-10-14 00:14:08 +00:00
Noah Bond 1d4fc6aa36 For #27396 - Add optional text colors to SelectableChip 2022-10-13 23:41:08 +00:00
MickeyMoz aac92cbb49 Update to Android-Components 107.0.20221013190102. 2022-10-13 23:08:40 +00:00
Ryan VanderMeulen faf6d30928 Update Kotlin and coroutines. 2022-10-13 22:07:57 +00:00
MickeyMoz ba9791e41f Update to Android-Components 107.0.20221013143128. 2022-10-13 17:00:58 +00:00
Johan Lorenzo 3dfbae0d10 Pin relbot Github Action to the 1.0.0 tag
https://github.com/mozilla-mobile/relbot/pull/88 will introduce some breaking changes that shouldn't make the fenix repo.
2022-10-13 16:09:33 +00:00
sv-ohorvath 881d761d4f No issue: Adds TCP & jump back in contextual hints UI tests 2022-10-13 15:16:47 +00:00
mozilla-l10n-automation-bot 832e832ec7
Import l10n. (#27391)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-13 01:08:59 +00:00
MatthewTighe 5e282ae326 For #27101: set dialog to be dismissed when touched outside 2022-10-13 00:42:11 +00:00
Noah Bond 538fd700bd For #27388 - Add optional background colors to SelectableChip 2022-10-13 00:05:33 +00:00
MickeyMoz 56c80f2539 Update to Android-Components 107.0.20221012190125. 2022-10-12 20:38:18 +00:00
MatthewTighe 846e60987a Closes #27292: renew telemetry expiring in 108 and 109 2022-10-12 19:16:07 +00:00
Mugurell 09b11da8c2 For #27381 - Unregister FXA observer to prevent memory leaks 2022-10-12 16:53:14 +00:00
MickeyMoz 8ee0a8a27a Update to Android-Components 107.0.20221012143145. 2022-10-12 12:21:53 -04:00
Mugurell f0aced49c0 For #27366 - Revert "For #26644 - Apply the new theme earlier to the private browsing button"
This reverts commit c7c5682104 given that the
severity of the new issue is much higher.
2022-10-12 07:10:30 +00:00
MickeyMoz 8b0fd1b85a Update to Android-Components 107.0.20221011190253. 2022-10-12 03:45:09 +00:00
mozilla-l10n-automation-bot 46e463db31
Import l10n. (#27376) 2022-10-12 00:32:35 +00:00
Noah Bond 165a516c38 For #27330 - Cache selected wallpaper card colors 2022-10-11 17:41:04 +00:00
MickeyMoz c6ff008f4b Update to Android-Components 107.0.20221011143144. 2022-10-11 16:03:55 +00:00
mcarare 8ed3bf704f For #25980: Use new backQueue instead of removed backStack. 2022-10-11 07:56:26 +00:00
mcarare 55724deda9 For #25980: Suppress LongParameterList warning.
Remove issues from baseline.
2022-10-11 07:56:26 +00:00
mcarare 5e88437d61 For #25980: Update method signatures for View.OnAttachStateChangeListener. 2022-10-11 07:56:26 +00:00
mcarare d9d39bd979 For #25980: Solve overload resolution ambiguity. 2022-10-11 07:56:26 +00:00
mcarare d9d01db7cc For #25980: Replace deprecated setHasOptionsMenu with MenuProvider. 2022-10-11 07:56:26 +00:00
mcarare 2b8b6a9aca For #25980: Replace deprecated popUpTo var. 2022-10-11 07:56:26 +00:00
mcarare 0ceeda92df For #25980: Update method signatures for onInitializeAccessibilityNodeInfo. 2022-10-11 07:56:26 +00:00
mcarare 0b4d9dc270 For #25980: Update method signatures for SimpleOnGestureListener.
GestureDetector onTouchEvent now expects only a NonNull MotionEvent.
2022-10-11 07:56:26 +00:00
mcarare 4e481f4f3e For #25980: Use new extension function to get fragment's NavController. 2022-10-11 07:56:26 +00:00
mcarare a4696c8fba For #25980: Replace removed BottomSheetDialog style. 2022-10-11 07:56:26 +00:00
mcarare ab928ac272 For #25980: Upgrade navigation, lifecycle, fragment and core to latest versions. 2022-10-11 07:56:26 +00:00
mozilla-l10n-automation-bot 89df72b415
Import l10n. (#27361)
Co-authored-by: Ryan VanderMeulen <rvandermeulen@mozilla.com>
2022-10-11 00:39:53 +00:00
Ryan VanderMeulen f84b65364a Update gradle testing dependencies 2022-10-11 00:05:23 +00:00
suman fab8300a78 For #27289: standardize coroutine usage in WallpaperFileManager
scope variable inlined as in only one place it is used, class injected dispatcher is used in all withcontext to use differnt dispatchers in different scenarios, clean function suspend keyword removed, as there no requirement to know its result, unnecessary return removed
2022-10-10 22:27:00 +00:00
Noah Bond 3207e6213e For #27095 - Download light/dark wallpaper card colors 2022-10-10 20:41:44 +00:00
MickeyMoz 8da9ba432e Update to Android-Components 107.0.20221010143126. 2022-10-10 17:06:10 +00:00
Mugurell 47b7336387 For #27016 - Ensure smooth search UX after the MR onboarding is closed
If the app is opened from the search widget and the MR onboarding is shown then
the backstack will have the following structure:
- root, homeFragment, searchDialogFragment, onboardingFragment
as opposed to otherwise
- root, homeFragment, searchDialogFragment.

This patch allows to avoid the MR onboarding fragment causing the
SearchDialogFragment to not know that below it is the HomeFragment and
consequently not applying transparency or propagate user touches to the parent
Activity.
2022-10-10 06:13:12 +00:00
Mugurell 6c6c3f5259 For #27016 - Prevent the MR onboarding always going to homescreen
This will mean that hen the onboarding is finished the user will get back to
the screen that should've been opened if not the onboarding.
2022-10-10 06:13:12 +00:00
mozilla-l10n-automation-bot 809f632f72
Import l10n. (#27349) 2022-10-10 00:38:17 +00:00
MickeyMoz 6c89feb0c3 Update to Android-Components 107.0.20221009143152. 2022-10-09 17:02:18 +00:00
mozilla-l10n-automation-bot ec0be08b7e
Import l10n. (#27342) 2022-10-09 00:38:45 +00:00
MickeyMoz 15a95b8ddf Update to Android-Components 107.0.20221008143216. 2022-10-08 16:37:57 +00:00
mozilla-l10n-automation-bot effc40dc32
Import l10n. (#27335) 2022-10-08 00:33:13 +00:00
MickeyMoz 0c76929f9a Update to Android-Components 107.0.20221007190140. 2022-10-07 20:30:17 +00:00
kycn f9efa5e8bb Close #26948: Enable custom extension collections in Beta.
Similar to how Nightly functions, custom extension collections are enabled to be used in Firefox Beta as well.
2022-10-07 19:04:09 +00:00
Jonathan Almeida 90fb56a251 Close #27320: Include testing regex to Google Maven allowlist
When running UI tests locally, we found that the
`android-device-provider-local` dependency is no longer available on
mavenCentral. Our dependency repository uses various regex to allow only
google dependencies to be fetched from Google Maven, but somehow these
did not include the test ones everywhere.
2022-10-07 18:04:51 +00:00
Gabriel Luong b6b892faab For #27307 - Use the correct warning button text and icon color for DestructiveButton 2022-10-07 16:53:50 +00:00
MickeyMoz 4ecc432b69 Update to Android-Components 107.0.20221007143235. 2022-10-07 12:21:21 -04:00
mozilla-l10n-automation-bot 62f5f44917
Import l10n. (#27323) 2022-10-07 00:36:55 +00:00
Roger Yang 3f7391a322 Close #27147: Add telemetry for bookmark search 2022-10-06 20:41:17 +00:00
Roger Yang e81da189cd Close #24498: Add test for history search telemetry 2022-10-06 19:21:28 +00:00
MickeyMoz 102acb3a4b Update to Android-Components 107.0.20221006143319. 2022-10-06 18:53:29 +00:00
Aaron Train fb80d2ee8c No issue: Disable ETP permanent UI test failures 2022-10-06 14:06:45 -04:00
Alexandru2909 30b8de0dce For #27128 - Fix accessibility for wallpaper settings "Learn more" heading 2022-10-06 14:12:10 +00:00
mcarare 7a240eb9f6 For #26930: Upgrade kotlin to 1.7.10 and compose compiler to 1.3.0.
Replace deprecated Xopt-in with op-in.
Replace deprecated Xjvm-default=enable with Xjvm-default=all.
2022-10-06 08:12:01 +00:00
Ryan VanderMeulen fbe8dfee6f Bump Sentry to 6.4.2 2022-10-05 23:37:42 -04:00
MickeyMoz 18eb3678af Update to Android-Components 107.0.20221005223456. 2022-10-05 23:37:42 -04:00
mozilla-l10n-automation-bot c26bdae1f6
Import l10n. (#27296) 2022-10-06 00:33:49 +00:00
mergify 11af9ab394 update initial_experiments.json based on the current first-run experiments in experimenter 2022-10-05 16:32:46 -04:00
Arturo Mejia 5cce4b5f15 For #3709: Add save to PDF UI. 2022-10-05 15:33:07 -04:00
MickeyMoz 5391b4cbc3 Update to Android-Components 107.0.20221005143122. 2022-10-05 16:58:48 +00:00
mcarare 5d33d387a1 For #27253: Add content description to close button. 2022-10-05 11:53:35 +00:00
mozilla-l10n-automation-bot 49791c3774
Import l10n. (#27271) 2022-10-05 00:37:58 +00:00
MickeyMoz ec85814ce3 Update to Android-Components 107.0.20221004145201. 2022-10-04 16:19:23 +00:00
sv-ohorvath 8cf20cc6c6 No issue: adds new onboarding smoke tests 2022-10-04 13:47:52 +00:00
Alexandru2909 31e9f69aae For #27129 - Fix accessibility for default wallpaper thumbnail 2022-10-04 11:39:36 +00:00
mozilla-l10n-automation-bot 69849cafa4
Import l10n. (#27260) 2022-10-04 00:34:11 +00:00
MickeyMoz 390201b9bc Update to Android-Components 107.0.20221003143033. 2022-10-03 16:04:43 +00:00
Mugurell db79ad5cb0 For #26884 - Re-enable selectAllAndCopyTextTest and copyTextTest
With the other changes from this patch they should now pass.
2022-10-03 12:16:57 +00:00
Mugurell d391d1bf95 For #26884 - Update tests to modify settings through the activity rules 2022-10-03 12:16:57 +00:00
Mugurell 0442695972 For #26884 - Merge FeatureSettingsHelper with activity rules 2022-10-03 12:16:57 +00:00
Mugurell ddf0dc3b4d For #24544 - Have Talkback use "expand" and "collapse" actions for collections 2022-10-03 11:18:02 +00:00
mozilla-l10n-automation-bot 0c5b1a910b
Import l10n. (#27248) 2022-10-03 01:01:28 +00:00
MickeyMoz 853ee1aa92 Update to Android-Components 107.0.20221002190240. 2022-10-02 20:35:21 +00:00
mozilla-l10n-automation-bot ee970d4fc8
Import l10n. (#27242) 2022-10-02 00:35:02 +00:00
MickeyMoz ffecc11a98 Update to Android-Components 107.0.20221001143328. 2022-10-01 15:58:31 +00:00
mozilla-l10n-automation-bot d70f8dec4f
Import l10n. (#27235) 2022-10-01 00:39:22 +00:00
MickeyMoz 41c0d822bd Update to Android-Components 107.0.20220930190122. 2022-09-30 21:42:42 +00:00
mike a 595d931dc0 Closes #27209: fix WallpapersSettings crash 2022-09-30 16:20:22 +00:00
sv-ohorvath acf9756a76 No issue: remove sdk suppression tests tags for API28 and unschedule cron job 2022-09-30 07:35:40 +00:00
MickeyMoz f8682dab94 Update to Android-Components 107.0.20220929190135. 2022-09-30 01:29:32 +00:00
mozilla-l10n-automation-bot 3fdbbe9ef5
Import l10n. (#27225) 2022-09-30 00:30:29 +00:00
AndiAJ f58442d3c5 For #26087 re-enable UI tests affected by tabs tray migration to compose 2022-09-29 20:51:10 +00:00
MatthewTighe 521f1485e6 For #27127: do not display wallpaper onboarding in private browsing mode 2022-09-29 20:24:55 +00:00
MickeyMoz 189b22fb69 Update to Android-Components 107.0.20220929143100. 2022-09-29 16:27:28 +00:00
mozilla-l10n-automation-bot d30ca3d57a
Import l10n. (#27211) 2022-09-29 00:35:02 +00:00
MickeyMoz 7abfb5728c Update to Android-Components 107.0.20220928143130. 2022-09-28 16:21:43 +00:00
Alexandru2909 19685170de For #26424 - Handle special legacy wallpaper cases 2022-09-28 06:02:12 +00:00
MickeyMoz f0c4660851 Update to Android-Components 107.0.20220928020045. 2022-09-28 04:16:44 +00:00
Delphine Lebédel 094c2f028f Added missing locales
Also updated top section.
This is for #26964
2022-09-28 03:08:19 +00:00
mozilla-l10n-automation-bot 6ebecfcaa7
Import l10n. (#27199) 2022-09-28 00:34:50 +00:00
MickeyMoz 83c49cc050 Update to Android-Components 107.0.20220927143145. 2022-09-27 17:40:50 +00:00
AndiAJ 8a652fc06f For #24978 re-enable media notification UI tests 2022-09-27 14:25:12 +00:00
AndiAJ af36e27933 For #24978 re-enable mainMenuOpenInAppTest UI test 2022-09-27 14:25:12 +00:00
AndiAJ 397ffd555c For #24978 re-enable verifyContextMixedVariations UI test 2022-09-27 14:25:12 +00:00
AndiAJ 81fd5f2644 For #24978 re-enable homeThreeDotMenuItemsTest UI test 2022-09-27 14:25:12 +00:00
AndiAJ 67bd387e0d For #24978 re-enable audioPlaybackSystemNotificationTest UI test 2022-09-27 14:25:12 +00:00
AndiAJ 46c2a714f6 For #24978 re-enable testStrictVisitDisableExceptionToggle UI test 2022-09-27 14:25:12 +00:00
Mugurell 460008c759 For #27172 - Enable the home onboarding dialog in all releases 2022-09-27 12:13:23 +00:00
Mugurell c3a3cae99b For #27172 - Enable the sync onboarding cfr in all releases 2022-09-27 12:13:23 +00:00
Mugurell 6c2609ad58 For #27111 - Allow TCP in all releases. Control it from Nimbus.
After this change the TCP feature (and CFR) are enabled by default.
Rollout can be controlled through Nimbus.
2022-09-27 11:43:18 +00:00
AndiAJ 66f16eeb69 For #24978 re-enable verifyAboutFirefoxPreview UI test 2022-09-27 11:16:04 +00:00
mcarare 1a21d49390 For #27133: Specify type when retrieving resValues. 2022-09-27 11:16:04 +00:00
Mugurell c7c5682104 For #26644 - Apply the new theme earlier to the private browsing button
This will help avoid a race between the two layers of the svg, with previously
only changing the color for just one.
By applying the new theme to the button when needing to apply the textColor
from wallpaper it will automatically use the right
2022-09-27 03:17:49 +00:00
mozilla-l10n-automation-bot d6883bc1f3
Import l10n. (#27186) 2022-09-27 00:37:50 +00:00
MickeyMoz 1005412862 Update to Android-Components 107.0.20220926143208. 2022-09-26 16:33:46 +00:00
sv-ohorvath 7e796d1cdc Issue #26711: re-enabled verifyPageMainMenuItemsTest 2022-09-26 15:21:08 +00:00
MatthewTighe 5c9a713512 For #27111: disable TCP in beta and release 2022-09-26 06:54:08 +00:00
mozilla-l10n-automation-bot 00f28939a1
Import l10n. (#27165) 2022-09-26 00:34:04 +00:00
MickeyMoz 96fc8e19d8 Update to Android-Components 107.0.20220925143143. 2022-09-25 15:58:36 +00:00
mozilla-l10n-automation-bot 4834f789e7
Import l10n. (#27157) 2022-09-25 00:35:07 +00:00
MickeyMoz d295390165 Update to Android-Components 107.0.20220924190144. 2022-09-24 20:18:37 +00:00
MickeyMoz e6680a4faa Update to Android-Components 107.0.20220924143230. 2022-09-24 17:50:28 +00:00
mozilla-l10n-automation-bot 0164544e41
Import l10n. (#27150) 2022-09-24 00:31:32 +00:00
MickeyMoz bc5bc7f564 Update to Android-Components 107.0.20220923143109. 2022-09-23 16:34:17 +00:00
AndiAJ a2011e201f For #26936 and #26818 fix saveLoginFromPromptTest and neverSaveLoginFromPromptTest UI tests 2022-09-23 14:55:15 +00:00
AndiAJ f9d7483bdd For #25345 re-enable customTrackingProtectionSettingsTest UI test 2022-09-23 14:10:41 +00:00
Julien Cristau 4d5f2f8ab4 Bug 1789398 - ensure task["metadata"]["owner"] is not empty on github-push decision tasks
Treeherder requires this in its ingestion pipeline, so if the pusher
doesn't have an email then use their name instead.
2022-09-23 09:07:31 +00:00
mozilla-l10n-automation-bot 4c3db08399
Import l10n. (#27116) 2022-09-23 00:39:08 +00:00
MatthewTighe 5811b06679 For #27055: handle legacy wallpaper naming case 2022-09-22 21:42:44 +00:00
Gabriel Luong 444f663143 For #27026 - Use the wallpaper adapted text color for the Collections placeholder 2022-09-22 20:07:02 +00:00
jeddai fba46517ff update initial_experiments.json based on the current first-run experiments in experimenter 2022-09-22 15:38:41 -04:00
Jonathan Almeida 911f350642 Closes #27077: Load first run experiments synchronously.
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
Co-authored-by: Charlie Humphreys <chumphreys@mozilla.com>
Co-authored-by: jhugman <jhugman@users.noreply.github.com>
2022-09-22 14:46:40 -04:00
MickeyMoz 6e99d6310b Update to Android-Components 107.0.20220922143126. 2022-09-22 16:14:58 +00:00
mozilla-l10n-automation-bot 89998334f3
Import l10n. (#27098) 2022-09-22 00:30:22 +00:00
Roger Yang bc1cfb88e8 Revert "For #11404 - Create open all function"
This reverts commit 9cf42cb7d9.
2022-09-21 23:11:23 +00:00
Roger Yang 366423e85c Revert "For #11404 - Create the open_all_in_new_tabs metric in Glean"
This reverts commit f1bd7e192d.
2022-09-21 23:11:23 +00:00
Roger Yang dff4c31606 Revert "For #11404 - Add 'Open all in private tabs' option as requested."
This reverts commit fe16a81c1d.
2022-09-21 23:11:23 +00:00
Roger Yang cfa376e5d2 Revert "For #11404 - Create alert message when a lot of tabs are to be opened."
This reverts commit c75e331a30.
2022-09-21 23:11:23 +00:00
Roger Yang 7fc213ce0c Revert "For #11404 - Update open all tabs warning message"
This reverts commit b11fd9131d.
2022-09-21 23:11:23 +00:00
Roger Yang 79ba4b8039 Revert "For #11404 - Disable new open bookmarks tests pending compose refactoring"
This reverts commit 0d439f91e3.
2022-09-21 23:11:23 +00:00
MickeyMoz 4a5abdb849 Update to Android-Components 107.0.20220921190147. 2022-09-21 22:40:07 +00:00
mcarare 017d45e80d For #26023: Run lint test only once.
Avoids running with added extra whitespaces.
2022-09-21 20:50:49 +00:00
mcarare 7efc9fcb7a For #26023: Supress LongParameterList warnings. 2022-09-21 20:50:49 +00:00
mcarare 258acf5fd9 For #26023: Remove inaccurate VisibleForTesting annotations. 2022-09-21 20:50:49 +00:00
mcarare a914e72b68 For #26023: Replace VisibleForTesting with @get:VisibleForTesting. 2022-09-21 20:50:49 +00:00
mcarare e5cc8f7592 For #26023: Suppress NewApi warning for autofillConfiguration. 2022-09-21 20:50:49 +00:00
mcarare 4196308ac6 For #26023: Sync android lint version to gradle plugin version. 2022-09-21 20:50:49 +00:00
mcarare 8f67b30117 For #26023: Update Gradle, Gradle plugin and kotlin-dsl plugin. 2022-09-21 20:50:49 +00:00
MickeyMoz 6937faefba Update to Android-Components 107.0.20220921143112. 2022-09-21 16:36:45 +00:00
AndiAJ f043362176 For #27008 fix flaky addAndRemoveMostViewedTopSiteTest UI test 2022-09-21 15:35:32 +00:00
Mugurell 7b5ba840ab For #26644 - Apply the wallpaper provided text color to the Fenix logo
And to the private mode switcher.
2022-09-21 13:03:55 +00:00
Mugurell 103a0cb250 For #26644 - Split the Fenix logo in two images
This will allow us applying a certain tint just for the image containing a text
to have a better contrast with wallpapers.
2022-09-21 13:03:55 +00:00
mozilla-l10n-automation-bot 74cb0679e2
Import l10n. (#27083) 2022-09-21 00:34:02 +00:00
MatthewTighe ace7b1e35c Closes #27081: enable wallpaper onboarding flag 2022-09-20 22:42:55 +00:00
MatthewTighe 414c569e86 For #27055: check whether applied wallpaper name is blank 2022-09-20 22:12:45 +00:00
MickeyMoz 16f490ea15 Update to Android-Components 107.0.20220920190143. 2022-09-20 20:34:18 +00:00
Noah Bond 892e9842d4 For #26854 - Fix bug causing the Top Sites sponsored text to show scrollbars 2022-09-20 18:03:24 +00:00
MickeyMoz 4f507faa9d Update to Android-Components 107.0.20220920143100. 2022-09-20 16:09:15 +00:00
AndiAJ 1d15fad8ca For #27005 fix flaky updateSavedLoginTest UI test 2022-09-20 14:52:28 +00:00
mcarare bcc12b65ce For #27004: Make the top site frame layout focusable.
This makes the layout visible to a11y screen readers.
2022-09-20 07:05:11 +00:00
mozilla-l10n-automation-bot 8fa1924e83
Import l10n. (#27069) 2022-09-20 00:36:26 +00:00
MatthewTighe 6f24fadebb Closes #26966: enable wallpapers V2 2022-09-19 23:28:52 +00:00
MickeyMoz 7c1555e4e7 Update to Android-Components 107.0.20220919190141. 2022-09-19 22:22:39 +00:00
Gabriel Luong 997a4af839 For #26582 - Renew telemetry expiring in 107 2022-09-19 21:51:31 +00:00
MatthewTighe c77ee6f371 For #27064 - Remove all unused strings marked moz:removedIn <= 104 2022-09-19 19:54:08 +00:00
MatthewTighe c6af07dc8c Closes #26997: convert v1 wallpapers into collection group 2022-09-19 19:24:27 +00:00
AndiAJ 8dd71a0523 For #24978 re-enable UI tests with frequent ANR 2022-09-19 18:55:25 +00:00
Mugurell 0d439f91e3 For #11404 - Disable new open bookmarks tests pending compose refactoring 2022-09-19 14:25:16 -04:00
Pg b11fd9131d For #11404 - Update open all tabs warning message
Specify Firefox will only slow down while pages are loading.
2022-09-19 14:25:16 -04:00
Pg c75e331a30 For #11404 - Create alert message when a lot of tabs are to be opened.
Current threshold is 15.
2022-09-19 14:25:16 -04:00
Pg fe16a81c1d For #11404 - Add 'Open all in private tabs' option as requested.
https://github.com/mozilla-mobile/fenix/pull/21212#discussion_r739172674

- Add option is tree dot menu
- Edit folder opening to be aware of browsing mode
- Add metrics
- Add unit tests for 'Open all in private tabs'
- Add Android tests for open all in private.
2022-09-19 14:25:16 -04:00
Pg f1bd7e192d For #11404 - Create the open_all_in_new_tabs metric in Glean
Expiration date is set to the same of others bookmark metrics.
2022-09-19 14:25:16 -04:00
Pg 9cf42cb7d9 For #11404 - Create open all function
- Create element to be displayed

- Update the interface and bind in the view holder
Set the filter to limit this action to FOLDER.

- Create core function
Main logic is done on the controller (has it should be done). The whole
process is done in one coroutine to be non-blocking as many
(sub)folders & links can be present. If folder is empty, a toast is
displayed. Else iterate on items. When item is:
- a FOLDER -> restart process (without toast) on the folder
- a ITEM -> open it
- a SEPARATOR -> do nothing
Once finished, show the tabs tray.

Toast message is defined in fragment to have access to context.

- Create androidTest for openAllInTabs
- Create tests for handleBookmarkFolderOpening
- Display 'open all' options only if folder has at least on child:
A coroutine and suspended functions have to be used, since `getTree`
is async.
2022-09-19 14:25:16 -04:00
AndiAJ 400a2a60d1 For #26286 new homepage settings UI tests 2022-09-19 15:09:42 +00:00
Ryan VanderMeulen de14a20fae Update protobuf to latest release. 2022-09-19 14:02:30 +00:00
Pascal Chevrel 7b5ee112b4 Update version.txt to 107.0b1 2022-09-19 12:56:27 +00:00
mozilla-l10n-automation-bot 26cd937a61
Import l10n. (#27056) 2022-09-19 00:38:04 +00:00
MickeyMoz 8e33d78211 Update to Android-Components 106.0.20220918143158. 2022-09-18 18:48:54 +00:00
mozilla-l10n-automation-bot 055afeade8
Import l10n. (#27050) 2022-09-18 00:32:12 +00:00
MickeyMoz f2f1e74d81 Update to Android-Components 106.0.20220917211210. 2022-09-17 22:33:23 +00:00
mozilla-l10n-automation-bot 85b9c6e057
Import l10n. (#27047) 2022-09-17 00:37:53 +00:00
MickeyMoz 61463da357 Update to Android-Components 106.0.20220916143058. 2022-09-16 16:14:07 +00:00
Aaron Train 70fdfc8d2d No issue: Adjust shard count in legacy/nightly/beta UI test jobs 2022-09-16 14:41:38 +00:00
mozilla-l10n-automation-bot 9822a2d65b
Import l10n. (#27037) 2022-09-16 00:34:29 +00:00
mike a c81e7a1453 Closes #26999: fix disapprearing wallpapers after going back to home screen 2022-09-15 23:44:54 +00:00
MickeyMoz 8b18d24187 Update to Android-Components 106.0.20220915212218. 2022-09-15 23:12:24 +00:00
sarah541 924f00024e For #27020 - Correct padding for wallpaper thumbnails 2022-09-15 22:41:38 +00:00
sarah541 5e2fe2285c For #27029 - Use placeholder inplace of app name 2022-09-15 22:14:06 +00:00
mike a 4972b70018 Closes #26995: add sorting of wallpapers on wallpapers onboarding tool 2022-09-15 21:46:02 +00:00
sarah541 dafe5dbdd6 For #27024 - Use textAccent for the "Learn more" link in the wallpaper settings 2022-09-15 20:55:00 +00:00
mike a 2ee00374dd Closes #27021: add wallpaper onboarding downloading error snackbar 2022-09-15 18:58:43 +00:00
MatthewTighe 9ce3f65b51 Closes #26945: adds telemetry for learn more link on wallpaper settings 2022-09-15 18:07:57 +00:00
AndiAJ af1fbd5eeb For #26784 refactor use of idling resources in UI tests 2022-09-15 14:27:25 +00:00
AndiAJ 43b6445b46 For #27002 use featureSettingsHelper instead of app settings 2022-09-15 13:01:53 +00:00
AndiAJ 7193e4e637 For #26286 new sponsored shortcut UI tests and other refactoring work 2022-09-15 08:35:11 +00:00
mike a cc30e3dc5a Closes #26971: fix wallpaper onboarding display condition 2022-09-15 05:56:57 +00:00
mavduevskiy 7fc96b01b2
Closes #26973: adjust wallpaper onboarding ui (#26974)
Co-authored-by: mike a <mavduevskiy@gmail.com>
Co-authored-by: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-15 04:06:15 +00:00
Mugurell d987afd23a For #26424 - Add contrasting text color for migrated Turning Red Wallpapers 2022-09-15 03:19:02 +00:00
Alexandru2909 817827997f For #26424 - Create wallpaper file migration helper 2022-09-15 03:19:02 +00:00
Aaron Train 0f4d711083 Update SmokeTest.kt
Disabled selectAllAndCopyTextTest()
2022-09-15 02:47:12 +00:00
Aaron Train 51c314e262 Disable copyTextTest in SmokeTest.kt
See https://github.com/mozilla-mobile/fenix/issues/26884
2022-09-15 02:47:12 +00:00
mozilla-l10n-automation-bot 9f0f052cab
Import l10n. (#26991)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-15 01:41:43 +00:00
MickeyMoz 3d4ded26eb Update to Android-Components 106.0.20220914204738. 2022-09-15 01:10:31 +00:00
Gabriel Luong d468bb5c58 For #26987 - Update MR Onboarding strings for existing users 2022-09-14 23:20:36 +00:00
MatthewTighe 7f59fa235f For #26980: enable task continuity in all channels 2022-09-14 22:37:18 +00:00
mike a 9cb441a6ca Closes #26215: add telemetry events for wallpaper onboarding dialog 2022-09-14 21:27:26 +00:00
sarah541 805fb0ff60 For #26908 - Update wallpapers settings page design 2022-09-14 19:45:38 +00:00
Jan-Erik Rediger 29e871086b Fix naming of generated exception 2022-09-14 12:57:21 -04:00
MickeyMoz 85f52e5329 Update to Android-Components 106.0.20220914143042. 2022-09-14 12:57:21 -04:00
Mugurell 8af2ee8aa9 For #26884: Properly disable the jumpBackIn and TCP CFRs in BookmarksTest 2022-09-14 15:22:47 +00:00
Mugurell 5010aa7d0d For #26884: [UI tests] Reset modified settings just before the Activity finishes
This should prevent issues with the cleanup being done earlier (even in @After)
and affecting the behavior of the Activity which is still running.
With this issue fixed I've re-enabled verifyCustomizeHomepageTest.

Because when FeatureSettingsHelper is instantiated it caches the settings
values from that instant it's important to only use one instance of it so I've
updated all tests that are using HomeActivityTestRule.
HomeActivityIntentTestRule may be updated with a similar functionality later.
2022-09-14 15:22:47 +00:00
Aaron Train 4e99fe8521
For #26792 - Change active Firebase Test Lab emulator from x86 to ARM (#26793)
* For #26792 - Change active Firebase Test Lab emulator from x86 to ARM

Update startup-test kind.yml Jobs for ARM
Update ui-test kind.yml Jobs for ARM
Cleans up and renames Flank configurations for ARM
Updates ui-test.sh for ARM

* Fix BookmarksTest.kt and HomeScreenTest.kt

* Fix intent matcher for SettingsAboutTest

Adds a helper function for Play Store intent

* Fix SettingsSearchTest.kt

* ktlint fix TestHelper.kt and SettingsRobot.kt
2022-09-14 16:42:25 +02:00
Mugurell 2899a66b15 For #26737 - Use the body2 for title else caption style in the Pocket section 2022-09-14 13:42:51 +00:00
Alexandru2909 bda817a608 For #26690 - Dismiss search dialog when opening recent synced tab dropdown menu 2022-09-14 12:49:08 +00:00
Alexandru2909 262aa16991 For #26790 - Dismiss search dialog when opening recent bookmark dropdown menu 2022-09-14 10:36:30 +00:00
Alexandru2909 b93b085085 For #26790 - Dismiss search dialog when opening recent visit dropdown menu 2022-09-14 10:36:30 +00:00
Alexandru2909 44b71bb590 For #26790 - Dismiss search dialog when opening recent tab dropdown menu
For #26790 -  recent tab
2022-09-14 10:36:30 +00:00
mozilla-l10n-automation-bot 1164703571
Import l10n. (#26970) 2022-09-14 00:36:07 +00:00
MatthewTighe 3ef7f959db For #26511: apply wallpapers immediately and observe updates 2022-09-13 22:40:36 +00:00
mcarare aa4a072d73 For #26743: Update the URL text styling in ClickableSubstringLink used by PoweredByPocketHeader
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
2022-09-13 20:25:01 +00:00
Gabriel Luong 62c36ab46d For #26888 - Change Home Section Headers to use Headline6 2022-09-13 15:44:59 -04:00
MickeyMoz 8a29213e0c Update to Android-Components 106.0.20220913143057. 2022-09-13 15:56:29 +00:00
mike a 3aff74b40a Closes #26212: Download wallpapers when a thumbnail is clicked 2022-09-13 05:55:24 +00:00
mozilla-l10n-automation-bot 67ba299f77
Import l10n. (#26952) 2022-09-13 00:40:06 +00:00
mike a 65bee4bb27 Closes #26750: add Wallpapers Onboarding dialog 2022-09-12 23:21:25 +00:00
Mugurell 93615438fc For #26910: Enable TCP for all modes
Unify the TCP feature with the TCP setting allowing both to be controlled
through the same Nimbus experiment.
Allow changing the default cookie policy to TCP based on the Nimbus experiment.
2022-09-12 22:54:30 +00:00
Charlie Humphreys d469624d25 fixes #26905: update nimbus experiments github action control flow and versions 2022-09-12 21:53:10 +00:00
Arturo Mejia 1bc33c53fa Closes #26865: Make the Nimbus MR Onboarding features true by default. 2022-09-12 16:44:08 -04:00
MickeyMoz 322d96dadd Update to Android-Components 106.0.20220912143111. 2022-09-12 16:57:31 +00:00
Roger Yang c99ff75787 Close #24913: Update metrics.yaml owners 2022-09-12 16:19:55 +00:00
AndiAJ 27e2402429 For #26932 disabled failing verifyCustomizeHomepageTest UI test 2022-09-12 14:51:25 +00:00
AndiAJ aef6c0a5e4 For #26286 new site security quick settings UI tests 2022-09-12 09:34:52 +00:00
Mozilla L10n Automation Bot d5592687d2 Import l10n. 2022-09-11 21:03:38 -04:00
Christian Sadilek 9cae449e06 Revert "For #26511: Parallelize work for setting the wallpaper"
This reverts commit ce3a7152f9.
2022-09-11 13:26:12 -04:00
Christian Sadilek d39759e7ea Revert "For #26511: Avoid waiting to set no wallpaper"
This reverts commit 4a88dbf1f1.
2022-09-11 13:26:12 -04:00
Christian Sadilek a4692a67f0 Revert "Closes #26750: add Wallpapers Onboarding dialog"
This reverts commit 05b95b6a97.
2022-09-11 13:25:28 -04:00
Christian Sadilek 8dd326f9f2 Revert "Closes #26750: add ktlintFormat changes"
This reverts commit 0ff140193b.
2022-09-11 13:25:28 -04:00
Christian Sadilek 29a36d5e9a Revert "Closes #26750: pr review changes"
This reverts commit 87334d2a76.
2022-09-11 13:25:28 -04:00
Christian Sadilek 7ec570e8b1 Revert "Closes #26750: disable wallpapers onboarding in HomeScreenTest.verifyCustomizeHomepageTest"
This reverts commit 72d7264201.
2022-09-11 13:25:28 -04:00
Christian Sadilek 6525439709 Revert "Closes #26750: remove unused files from WallpaperOnboarding"
This reverts commit 97987dbf8b.
2022-09-11 13:25:28 -04:00
Mozilla L10n Automation Bot 42b9bbce44 Import l10n. 2022-09-11 12:52:57 -04:00
MickeyMoz 5e2051ddde Update to Android-Components 106.0.20220911143157. 2022-09-11 16:23:30 +00:00
MickeyMoz 7fd3a8802b Update to Android-Components 106.0.20220910143058. 2022-09-10 16:14:23 +00:00
mozilla-l10n-automation-bot 3d5c6b96b8
Import l10n. (#26912) 2022-09-10 00:38:28 +00:00
mike a 97987dbf8b Closes #26750: remove unused files from WallpaperOnboarding 2022-09-09 23:30:31 +00:00
mike a 72d7264201 Closes #26750: disable wallpapers onboarding in HomeScreenTest.verifyCustomizeHomepageTest 2022-09-09 23:30:31 +00:00
mike a 87334d2a76 Closes #26750: pr review changes 2022-09-09 23:30:31 +00:00
mike a 0ff140193b Closes #26750: add ktlintFormat changes 2022-09-09 23:30:31 +00:00
mike a 05b95b6a97 Closes #26750: add Wallpapers Onboarding dialog 2022-09-09 23:30:31 +00:00
Ryan VanderMeulen 93be491f26 Update hash to be ignored for ktlint update
The original commit was rebased before landing and the hash changed. Update it to the landed one. Also add a reference to the issue number.
2022-09-09 18:47:18 +00:00
MickeyMoz 3d3a52edd8 Update to Android-Components 106.0.20220909143109. 2022-09-09 13:42:49 -04:00
mcarare c7ebec3602 For #26844: Ignore fix ktlint issues commit from blame. 2022-09-09 16:52:09 +00:00
mcarare ffcef5ff2e For #26844: Fix ktlint issues and remove them from baseline. 2022-09-09 16:52:09 +00:00
Julien Cristau ba611e848e
mergify: allow complete-push check as an alternative to complete-pr in queue conditions (#26902)
PRs created by github actions don't get a pull-request taskcluster graph
scheduled (because that is only done for PRs created by collaborators).
However, if the PR is created in the main fenix repo, typically because
it comes from one of our internal github workflows, then we get a push
graph, which is sufficient to run the required checks.

This change lets mergify consider a green `complete-push` task as
sufficient to queue a PR (in addition to all the other conditions, e.g.
wrt review), which will allow PRs created by the
update-nimbus-experiments workflow to be queued by mergify instead of
having to be merged by a repo admin.
2022-09-09 18:08:56 +02:00
Mugurell 48f7803918 For #26511: Temporarily suppress ktlint issues
Instead of modifying the affecting files. While we set on a strategy on how to
approach this situations.
2022-09-09 13:36:09 +00:00
Mugurell 4a88dbf1f1 For #26511: Avoid waiting to set no wallpaper
This should squeeze the most performance for users who haven't set a wallpaper.
2022-09-09 13:36:09 +00:00
Mugurell ce3a7152f9 For #26511: Parallelize work for setting the wallpaper
Split loading the bitmap from storage and actually setting it in two operations
with one that can run in parallel with onCreateView for HomeFragment and one
that can be used serially on the main thread to actually set the wallpaper.

This seems like the best compromise to ensure that everytime the homescreen is
shown it will have the wallpaper set but does affect the performance - there is
a delay in showing HomeFragment to account for waiting for the wallpaper to be
set.
In testing the new delay seems close to the one from the initial wallpapers
implementation. See more in https://github.com/mozilla-mobile/fenix/pull/26794.
2022-09-09 13:36:09 +00:00
Julien Cristau 32a4be11d0 Bug 1781051 - simplify setting ownerEmail in .taskcluster.yml
Remove special cases for bors and github-actions:
- bors is no longer used for this, as far as I know
- the github-actions special case breaks chain-of-trust's ability to
  rebuild the decision task definition: because we don't leave a
  breadcrumb to record event.sender.login, it has to guess, and if it
  gets it wrong, chain of trust verification fails
2022-09-09 12:05:15 +00:00
Mozilla L10n Automation Bot 72227cb6a3 Import l10n. 2022-09-08 21:19:59 -04:00
MickeyMoz dbae86ffd0 Update to Android-Components 106.0.20220908190311. 2022-09-09 01:03:35 +00:00
Charlie Humphreys 13808e4535 remove qa experiment 2022-09-08 18:13:58 +00:00
MickeyMoz 10eb949ca1 Update to Android-Components 106.0.20220908143131. 2022-09-08 17:36:58 +00:00
Roger Yang 30814884b5 For #26502: Add time group and private extras in history telemetry 2022-09-08 16:12:20 +00:00
Gregory Mierzwinski 9ed3e8e138 Bug 1788643 - Enable nightly-test cron on fenix. 2022-09-08 11:12:13 -04:00
Arturo Mejia fd96263345 Closes #26858: Remove unused nimbus engine-settings tabs-prioritization-enabled feature. 2022-09-08 10:41:18 -04:00
Arturo Mejia 5358e9b878 Closes #26858: Remove unused nimbus engine-settings tabs-prioritization-enabled feature. 2022-09-08 10:41:18 -04:00
Arturo Mejia 49bef5d309 Closes #26858: Remove unused nimbus engine-settings total-cookie-protection-enabled feature. 2022-09-08 10:41:18 -04:00
Mugurell de38ada14e For #26869 - Enable TCP by default starting with v. 106
This change should not be uplifted.
2022-09-08 13:52:10 +00:00
mcarare ca88c8c1bb For #26844: Ensure consistent usage of a newline at the end of each file.
This automatically adds a new line at EOF when there is none.
2022-09-08 12:15:01 +00:00
mcarare 481b3655ac For #26844: Add ktlint baseline. 2022-09-08 12:15:01 +00:00
mcarare 9490fdff71 For #26844: Rename CFRPopupFullscreenLayout class to conform to filename rule. 2022-09-08 12:15:01 +00:00
mcarare 0f908db985 For #26844: Enable trailing commas rules. 2022-09-08 12:15:01 +00:00
mcarare 6b4d6363db For #26844: Replace deprecated disabled_rules with ktlint_disabled_rules. 2022-09-08 12:15:01 +00:00
mcarare 231ef74ff1 For #26844: Update ktlint to 0.47.0. 2022-09-08 12:15:01 +00:00
Mozilla L10n Automation Bot 316e495f22 Import l10n. 2022-09-08 00:01:32 -04:00
mergify dedc7704e3 update initial_experiments.json based on the current first-run experiments in experimenter 2022-09-08 00:00:48 -04:00
Gabriel Luong 812f073e39 For #26777 - Part 2: Refactor the Jump Back In onboarding CFR to use the CFRPopup 2022-09-08 01:30:16 +00:00
Gabriel Luong 86b62af556 For #26777 - Part 1: Rename SyncCFRPresenter to HomeCFRPresenter 2022-09-08 01:30:16 +00:00
MickeyMoz b7317d75a3 Update to Android-Components 106.0.20220907220702. 2022-09-08 00:21:35 +00:00
MatthewTighe 1eba8059f2 Closes #26870: remove layer behind wallpaper thumbnails 2022-09-07 23:20:20 +00:00
sarah541 adb7f7d48a For #26731 - First run onboarding updates 2022-09-07 22:36:25 +00:00
sarah541 bd06b626bf For #26867 - Remove feature flag for first run onboarding updates 2022-09-07 21:44:33 +00:00
Noah Bond 0ed40f239a For #26796 - Fix PocketStoriesComposablesPreview 2022-09-07 21:10:50 +00:00
mozilla-l10n-automation-bot 7c1aa011a9
Import l10n. (#26849) 2022-09-07 00:46:52 +00:00
Noah Bond f9380ebaa1 For #26797 - Add optional parameter to customize the background color of ListItemTabLarge 2022-09-06 22:32:44 +00:00
MickeyMoz 509c86b019 Update to Android-Components 106.0.20220906143158. 2022-09-06 18:42:14 +00:00
Noah Bond b1369a5de8 For #26606 - Add backplating to Top Sites 2022-09-06 17:48:02 +00:00
mcarare d4b6babdb0 For #12725: Suppress UnusedMaterial3ScaffoldPaddingParameter warning.
Padding value is not used for placing content.
2022-09-06 16:23:52 +00:00
mcarare bd354385d7 For #12725: Replace removed static "set", "get" methods of ViewTreeSavedStateRegistryOwner.
ViewTreeSavedStateRegistryOwner is retrieved/set with new extension methods.
2022-09-06 16:23:52 +00:00
mcarare bcfd0eb125 For #12725: Upgrade compose to 1.2.1 version.
Split versioning of compose compiler.
Enable Xjvm-default to allow inheriting from interfaces with '@JvmDefault' members
like AbstractComposeView, NestedScrollConnection.
2022-09-06 16:23:52 +00:00
Mugurell e51ec147c5 For #26830 - Allow the Pocket stories to scroll to the edges of the screen
Restore using LazyRow's "contentPadding" property to add padding to just the
items while the entire section is allowed to extend to the edges of the screen
and so have enough room to draw items shadows without them being clipped.
2022-09-06 12:33:18 +00:00
mozilla-l10n-automation-bot 92f68301bb
Import l10n. (#26828) 2022-09-06 00:39:00 +00:00
MickeyMoz 602910b096 Update to Android-Components 106.0.20220905190143. 2022-09-05 20:41:03 +00:00
MickeyMoz 2399f22303 Update to Android-Components 106.0.20220905143151. 2022-09-05 16:14:02 +00:00
AndiAJ 26a8f02233 For #26286 new home screen UI tests 2022-09-05 10:10:27 +00:00
mozilla-l10n-automation-bot 3d1924eb93
Import l10n. (#26814) 2022-09-05 00:39:53 +00:00
MickeyMoz c7a856240a Update to Android-Components 106.0.20220904143128. 2022-09-04 17:57:11 +00:00
mozilla-l10n-automation-bot 1aa59661b3
Import l10n. (#26806) 2022-09-04 00:34:03 +00:00
MickeyMoz 395ebab7a6 Update to Android-Components 106.0.20220903143150. 2022-09-03 15:34:25 +00:00
MickeyMoz 12b4197b8f Update to Android-Components 106.0.20220903000045. 2022-09-03 01:46:24 +00:00
mozilla-l10n-automation-bot 25fb180af4
Import l10n. (#26799) 2022-09-03 00:58:22 +00:00
Ben Dean-Kawamura fb0ebe4eec Added secret debug menu to override the push server URL (#24170)
- Created a new "sync debug" pref screen to hold the Fxa, Sync, and Push
  server override prefs.  They were taking a lot of screen space on the
  top-level settings menu as individual items
- Added button on that screen to quit FF which is needed to apply the
  changes.
    - This is definitely not the nicest UI, but hopefully QA can just
      override the prefs once save them in an emulator and never have to
      go back to this screen.
    - I do think this is a nicer UI than before, where FF would quit
      after a change to any of the prefs.  That forces you to restart FF
      3 times if you wanted to override all 3 server URLs.
2022-09-02 18:46:58 +00:00
MickeyMoz 0611beab00 Update to Android-Components 106.0.20220902143238. 2022-09-02 16:21:09 +00:00
sv-ohorvath df9c60b392 Issue #26711: Disable verifyPageMainMenuItemsTest UI test 2022-09-02 11:08:59 +00:00
sv-ohorvath 0a2d1c63f1 Issue #26286: adds UI test for the Language menu 2022-09-02 11:08:59 +00:00
Gabriel Luong 67d8a2c749 For #26776 - Don't dim the window when the Jump back in CFR is shown 2022-09-02 06:55:05 +00:00
Alexandru2909 03bc209dfd For #26191 - Add telemetry for jump back in onboarding message 2022-09-02 06:23:22 +00:00
sarah541 b432436859 For #26759 - Crash fix for UnsupportedOperationException 2022-09-02 03:22:22 +00:00
Gabriel Luong 4dfec35b73 For #26774 - Attempt to show the Synced Tab CFR before the Jump Back In CFR 2022-09-02 02:44:27 +00:00
mozilla-l10n-automation-bot d8c881a9f7
Import l10n. (#26779) 2022-09-02 00:36:57 +00:00
Gabriel Luong 9c2d4722ef For #26738 - Update MR onboarding with the latest illustrations 2022-09-01 22:22:08 +00:00
Gabriel Luong c43271fc0d For #26739 - Display MR onboarding dialog to existing users as soon as the app is opened 2022-09-01 21:31:44 +00:00
Gregory Mierzwinski 3033b26f67
Bug 1788643 - Add a nightly cron task for performance tests. (#26761)
* Bug 1788643 - Add a nightly cron task for performance tests.

* Fix bad function name.

* Run nightly-test cron manually.
2022-09-01 20:27:12 +00:00
Noah Bond bc6ec7a64e For #26609 - Update favicon dark mode background color for recent bookmarks and recent tabs 2022-09-01 18:50:07 +00:00
MickeyMoz 7dbdde3473 Update to Android-Components 106.0.20220901143315. 2022-09-01 13:01:12 -04:00
Gabriel Luong ca0cfd79e8 For #26756 - Don't show Jump Back In CFR if the synced tab CFR is shown 2022-09-01 15:57:12 +00:00
Gabriel Luong df2780cd01 For #26754 - Avoid showing CFR if the MR onboarding is being displayed 2022-09-01 15:07:14 +00:00
mergify afa661507b update initial_experiments.json based on the current first-run experiments in experimenter 2022-09-01 10:10:26 -04:00
Mugurell 93859d8560 For #26723 - Fix WallpapersObserver leaking a view from HomeFragment
The observer initialized with a fragment View would outlive the fragment and in
that allow for leaking the entire fragment layout.
2022-09-01 06:49:31 +00:00
Mugurell b7f9457cc4 For #26723 - Ensure wallpapers are set on the main thread
Using Dispatchers.IO allowed the observer to react faster to wallpaper state
updates but caused issues with updating the wallpaper in fragment layout.

Using Dispatchers.Main.immediate gives us a bit slower reaction time but still
faster than Dispatchers.Main and allows us to still execute before the fragment
is visible.
2022-09-01 06:49:31 +00:00
mozilla-l10n-automation-bot a7b4134e26
Import l10n. (#26749) 2022-09-01 00:37:46 +00:00
Gabriel Luong 3507f12484 For #26717 - Only show the MR onboarding dialog for existing users 2022-08-31 22:38:48 +00:00
MatthewTighe 8a9c68c872 Closes #26211: Download wallpapers when thumbnails clicked 2022-08-31 22:09:39 +00:00
MatthewTighe 2cd8a41ea5 Closes #26213: Add wallpaper use case to load thumbnails. 2022-08-31 22:09:39 +00:00
MatthewTighe 0d51d2b0f9 Closes #26214: Download wallpaper thumbnails at app startup 2022-08-31 22:09:39 +00:00
Noah Bond 7eb3278776 For #26607 - Update back plating for recent Bookmarks 2022-08-31 21:18:01 +00:00
mergify 58a1ae34ab update initial_experiments.json based on the current first-run experiments in experimenter 2022-08-31 16:41:11 -04:00
MickeyMoz 1b54a732fa Update to Android-Components 106.0.20220831190128. 2022-08-31 20:35:14 +00:00
Julien Cristau 6bee719969 mergify: auto-merge relbot PRs that target the main branch 2022-08-31 14:50:07 -04:00
mcarare 7cbe730b8a For #26444: Adapt Pocket 'powered by' text to wallpaper. 2022-08-31 17:57:20 +00:00
mcarare 186dee7e77 For #26444: Adapt HomeSectionHeader text colors to wallpaper. 2022-08-31 17:57:20 +00:00
mcarare 02be7600e8 For #26444: Replace SectionHeader with HomeSectionHeader for home sections. 2022-08-31 17:57:20 +00:00
mcarare 8a599bbf4e For #26444: Refactor HomeSectionHeader to have optional show all text. 2022-08-31 17:57:20 +00:00
MickeyMoz 310a029c37 Update to Android-Components 106.0.20220831143219. 2022-08-31 12:44:12 -04:00
Mugurell de7cf91d8a For #26450: Remove the star icon from Pocket sponsored stories 2022-08-31 15:27:01 +00:00
Alexandru2909 cedb777655 For #26706 - Add sponsored urls filter in BlocklistHandler 2022-08-31 13:03:38 +00:00
Alexandru2909 070bf5ac24 For #26706 - Change TopSite.containsQueryParameters as Uri extension function 2022-08-31 13:03:38 +00:00
mergify 2f1f6f3213 update initial_experiments.json based on the current first-run experiments in experimenter 2022-08-30 21:54:33 -04:00
mozilla-l10n-automation-bot 58b228575d
Import l10n. (#26720) 2022-08-31 00:40:51 +00:00
Aaron Train a719d3f764 No issue: Add is Test Lab helper 2022-08-30 18:36:42 +00:00
MickeyMoz 38eec4f5c4 Update to Android-Components 106.0.20220830143055. 2022-08-30 12:15:24 -04:00
Perry McManis 2d8ea17f47 For #26700 - URI counts will now additionally be sent in baseline 2022-08-30 16:01:50 +00:00
Lucius d26642b680 For #26093: Use `ic_menu` instead of `ic_close`
An override for History already exists in `HistoryListItemViewHolder`, so no global override for this icon is needed.
2022-08-30 10:20:19 -04:00
Aki Sasaki 5a2f9fe149 update bot name 2022-08-30 07:39:58 +00:00
Alexandru2909 22b8b873e1 For #26551 - Add telemetry for MR Onboarding welcome and sync dialogs. 2022-08-30 06:18:31 +00:00
mozilla-l10n-automation-bot 6ad87373ff
Import l10n. (#26703) 2022-08-30 00:41:37 +00:00
Gabriel Luong 036b0f8a8c For #26696 - Enable showSynCFR for Nightly 2022-08-29 22:55:42 +00:00
Jonathan Almeida 40cd58132e Close #25919: Move UpdateFirstFrameDrawn to RecyclerView.onLayoutCompleted
As part of a preventitive measure for home page regression loading, we
fixed the UpdateFirstFrameDrawn call to happen after the first layout in
the main RecyclerView is completed. In addition, we also make pocket
aware of this flag so that it renders itself after the first layout.

This helps prioritize current & future features that are visible first
to render before those that are off screen.

Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
2022-08-29 19:32:22 +00:00
Mugurell ab3f6b5e4b For #26555 - Observe and update the wallpaper before HomeScreen is visible.
By using Store.observeManually in a standalone coroutine we can observe the
store and update the wallpapers even before onStart (in manual tests is right
around onStart, certainly before the other widgets shown on homescreen).

Created a new WallpapersObserver to have the functionality easier to reason
about and be easier to test.
2022-08-29 18:38:46 +00:00
Gabriel Luong d314c1102b For #26693 - Use a new ID for onboarding_home_sync_title 2022-08-29 18:08:05 +00:00
MatthewTighe 853778e29a For #26511: load homescreen wallpaper in blocking coroutine 2022-08-29 17:33:13 +00:00
MickeyMoz 9c1f48c982 Update to Android-Components 106.0.20220829143136. 2022-08-29 12:18:25 -04:00
sv-ohorvath cad6c64236 No issue: disable TCP CFR in screenshots tests 2022-08-29 15:58:26 +00:00
sarah541 890a950f66 For #26489 - Add synced tab pickup onboarding message 2022-08-29 15:20:07 +00:00
sv-ohorvath d49c87f66d Issue #26286: adds delete browsing data UI tests 2022-08-29 14:15:37 +00:00
mozilla-l10n-automation-bot 82e86a8c54
Import l10n. (#26681) 2022-08-29 09:52:17 +00:00
MickeyMoz 8bc9c9b64c Update to Android-Components 106.0.20220828143157. 2022-08-28 12:26:07 -04:00
MickeyMoz 81a95a58ac Update to Android-Components 106.0.20220827143345. 2022-08-27 13:30:45 -04:00
MickeyMoz 7fff3ee07f Update to Android-Components 106.0.20220826190145. 2022-08-26 20:26:48 -04:00
Charlie Humphreys 97a346f7c4 rename usage of action repo 2022-08-26 20:15:18 +00:00
Gabriel Luong f6550f0fed For #26668 - Use the correct string for onboarding_home_sync_title 2022-08-26 19:40:33 +00:00
Roger Yang 6933719877 For #26227: Clean up double exclamation operator in BrowserState 2022-08-26 18:48:53 +00:00
Roger Yang da06df4d99 Close #26666: Use correct content scale when displaying recent tab thumbnail and icon 2022-08-26 17:51:29 +00:00
Roger Yang f8f8b4f813 Close #21702: Update host name check in add login
Co-Authored-By: joaopmatos <89925580+joaopmatos@users.noreply.github.com>
2022-08-26 17:08:15 +00:00
MickeyMoz 75a148b882 Update to Android-Components 106.0.20220826143117. 2022-08-26 12:06:58 -04:00
Johan Lorenzo 886a6fa87a chore: Bump taskgraph to v3.0.0 2022-08-26 15:40:49 +00:00
Alexandru2909 21d3d0f8f0 For #26190 - Update jump back in cfr logic and message 2022-08-26 08:45:31 +00:00
Gabriel Luong 1c77d8a978
For #26656 - Use the correct string for onboarding_home_welcome_description (#26657)
* For #26656 - Use the correct string for onboarding_home_welcome_description

* Update app/src/main/res/values/strings.xml

Co-authored-by: Sarah541 <sarahkhan1107@hotmail.com>

Co-authored-by: Sarah541 <sarahkhan1107@hotmail.com>
2022-08-26 03:15:47 +00:00
mozilla-l10n-automation-bot 3048a05a56
Import l10n. (#26654) 2022-08-26 00:59:47 +00:00
MickeyMoz 0cd2c560b2 Update to Android-Components 106.0.20220825190307. 2022-08-25 16:56:21 -04:00
Noah Bond bd36b31e5c For #26608 - Update recent bookmarks homepage title 2022-08-25 20:55:50 +00:00
Mugurell 5b083f5edd For #26646 - Use unescaped typographic apostrophes instead of escaped quotes 2022-08-25 19:36:27 +00:00
Gabriel Luong 9a64acd4b6 For #26169 - MR Home Onboarding Dialog for upgrading users 2022-08-25 18:22:35 +00:00
MickeyMoz 2d99dbb1c5 Update to Android-Components 106.0.20220825143119. 2022-08-25 12:16:05 -04:00
gmierz 938067a365 Undo testing changes. 2022-08-25 13:22:34 +00:00
gmierz 981f3fd370 Set symbol properly. 2022-08-25 13:22:34 +00:00
gmierz d940a1704c Fix bad line 2. 2022-08-25 13:22:34 +00:00
gmierz f3be0ad09a Fix bad line. 2022-08-25 13:22:34 +00:00
gmierz b79e2684e7 Fix missing variable. 2022-08-25 13:22:34 +00:00
gmierz e6f0e1aa56 Test changes. 2022-08-25 13:22:34 +00:00
gmierz 37869ec321 Bug 1784122 - Add non-fission variant for Fenix perf tests. 2022-08-25 13:22:34 +00:00
Mugurell b16e69105c For #26224 - Disable the TCP CFR in failing UI tests 2022-08-25 12:30:10 +00:00
Mugurell 00d2a9d402 For #26224 - metrics.yaml cleanup of unneeded newlines 2022-08-25 12:30:10 +00:00
Mugurell 67a55fe089 For #26224 - TCP CFR telemetry 2022-08-25 12:30:10 +00:00
Mugurell f4b823b43b For #26224 - Use the mr2022.sectionsEnabled.tcp-cfr Nimbus feature to display the cfr 2022-08-25 12:30:10 +00:00
Mugurell 4286606d8f For #26224 - New TCP CFR popup
If Total Cookie Protection is enabled when first accessing a normal tab
(not a custom tab) a new Contextual Feature Recommendation popup will be shown
informing about the added protection and allowing the user to open a support
page with more data about the new option for privacy protection.
2022-08-25 12:30:10 +00:00
Mugurell fc6ee3e3d9 For #18175 - Add telemetry for cookies option in custom ETP. 2022-08-25 10:05:11 +00:00
Mugurell bf23a2a6b9 For #18175 - Add a new total protection ETP cookies policy
This should only add the new option in settings based on a Nimbus experiment.
2022-08-25 10:05:11 +00:00
mozilla-l10n-automation-bot faa30e9c0e
Import l10n. (#26636) 2022-08-25 00:50:25 +00:00
Ryan VanderMeulen e162fe7348 Set the Gradle max heap size to 7g
Github Actions workers only have 7GB available, so the 8GB limit is causing crashes in that environment.
2022-08-24 21:30:37 +00:00
mergify e1b055a0ec update initial_experiments.json based on the current first-run experiments in experimenter 2022-08-24 16:36:04 -04:00
Gabriel Luong da677dd650 For #26620 - Replace the onboarding nimbus feature with MR2022 nimbus feature 2022-08-24 19:46:18 +00:00
Noah Bond 9779a544a9 For #26604 - Add missing preview to RecentTabs 2022-08-24 19:10:41 +00:00
Bryan Olsson 7e6a1c7f9f For #26556 - Add skr and tok native/English display names 2022-08-24 18:28:47 +00:00
Mugurell 19831e5c79 For #26584 - Add vertical offset support to the CFR composable. 2022-08-24 17:57:34 +00:00
Mugurell 5854735891 For #26584 - Add support to align the CFR composable inside a wider anchor
Supported anchorings will now be:
- INDICATOR_CENTERED_IN_ANCHOR - previous functionality - allows to have the
indicator point to exactly the middle of a smaller anchor.
- BODY_TO_ANCHOR_CENTER - new default - allows to align the popup inside a
wider anchor
- BODY_TO_ANCHOR_START - new anchoring - allows to align the popup flushed to
it's anchor's start.
2022-08-24 17:57:34 +00:00
Noah Bond c37cfc5b01 For #26605 - Clean up RecentTabViewHolder 2022-08-24 17:05:45 +00:00
MickeyMoz 9a858688e3 Update to Android-Components 106.0.20220824133606. 2022-08-24 12:02:31 -04:00
AndiAJ c63150332e For #26144 new credit card autofill UI smoke tests 2022-08-24 15:00:23 +00:00
AndiAJ a4fbf4c1f1 For #26144 new address autofill UI smoke tests 2022-08-24 15:00:23 +00:00
Alexandru2909 b29b5049aa For #26400 - Add long-press option to remove tab pickup on homescreen 2022-08-24 12:42:44 +00:00
Jonathan Almeida 9fe10e8a2b Closes #26615 Add nimbus configuration feature flags for MR 2022 2022-08-24 10:18:56 +00:00
mcarare a0ebbe0c7b For #26401: Remove unused wallpaper metrics.
Remove wallpaper_switched and change_wallpaper_logo_toggled.
Add lint ignore for common prefix in wallpaper metrics.
2022-08-24 09:49:06 +00:00
mozilla-l10n-automation-bot 203d7b28bf
Import l10n. (#26619)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-24 03:12:56 +00:00
MickeyMoz 3f8fe42506 Update to Android-Components 106.0.20220823190131. 2022-08-23 21:07:37 -04:00
sv-ohorvath fd4ea5ae58 No issue: increase flaky tests attempts on Nightly tests 2022-08-23 21:01:20 +00:00
MickeyMoz e87cebc85f Update to Android-Components 106.0.20220823152515. 2022-08-23 13:28:15 -04:00
Ryan VanderMeulen 627447a387 Use parallel execution for Gradle 2022-08-23 16:40:48 +00:00
Alexandru2909 43e629b7fb For #26398 - Filter recent synced tabs using the homescreen blocklist 2022-08-23 13:00:44 +00:00
mozilla-l10n-automation-bot 7944e442a5
Import l10n. (#26592) 2022-08-23 00:39:56 +00:00
MatthewTighe 299f887953 Add updated wallpaper use cases and activate them with feature flag. 2022-08-22 23:07:14 +00:00
MatthewTighe 02dda42cb6 Add updated downloader and file manager 2022-08-22 23:07:14 +00:00
Roger Yang ad1fd57b8f Close #26072: Don't show sync menu item until account manager is available 2022-08-22 22:19:57 +00:00
Noah Bond a9b2f1c6a7 For #26587 - Replace the color in DefaultImagePlaceholder with FirefoxTheme layer2 2022-08-22 21:44:26 +00:00
Noah Bond 45f998ee95 For #26587 - Fix broken previews using Fenix Image composable 2022-08-22 21:44:26 +00:00
MickeyMoz 7a3a52e475 Update to Android-Components 106.0.20220822190107. 2022-08-22 17:08:51 -04:00
Charlie Humphreys fa3c83bcb0 add about block to nimbus.fml.yaml 2022-08-22 19:47:11 +00:00
Ryan VanderMeulen 213f76833c Update version.txt to 106.0b1 2022-08-22 14:11:39 -04:00
Gabriel Luong 620ced08c9 For #26579 - Remove all unused strings marked moz:removedIn <= 103 2022-08-22 18:10:38 +00:00
Julien Cristau 6d7ecb5dbb
Let relbot update A-C on trunk (#26553)
* Let relbot update A-C on trunk

We already use relbot for this on fenix release branches and on all
branches for focus-android, so might as well avoid the duplication.

* Update mergify rules to auto-merge AC bumps from relbot on the main branch
2022-08-22 18:18:49 +02:00
MickeyMoz 4ad4937ba4 Update Android Components version to 105.0.20220822142319. 2022-08-22 15:58:56 +00:00
Julien Cristau 1750240bc6 mergify: squash l10n PRs
One commit per locale is quite noisy; a single commit per update also
matches what happens on desktop.
2022-08-22 09:10:34 -04:00
Alexandru2909 e2f1c5fc9c For #26399 - Use a list of tabs for recent synced tabs success state 2022-08-22 07:21:36 +00:00
MickeyMoz 77b959ec97 Update Android Components version to 105.0.20220821161547. 2022-08-21 18:16:31 +00:00
Mozilla L10n Automation Bot c58634fa7c Import l10n. 2022-08-21 00:41:17 +00:00
MickeyMoz d475c707a6 Update Android Components version to 105.0.20220820143102. 2022-08-20 16:46:12 +00:00
Mozilla L10n Automation Bot 4777f03d9a Import l10n. 2022-08-20 00:36:37 +00:00
mike a cb3f620507 Closes #26530: add top spacing to header in history list 2022-08-19 19:41:43 +00:00
Gabriel Luong 6a7f9075ad For #26549 - Add Nimbus feature flag for first run onboarding page updates and Jump back in CFR 2022-08-19 19:06:34 +00:00
Julien Cristau 8c0945db3b update_android_components: don't create an empty PR if we couldn't push 2022-08-19 18:27:19 +00:00
Ryan VanderMeulen 5950157911 Add more Gradle JVM memory flags. 2022-08-19 13:27:43 -04:00
Mugurell c3c2a4f6af For #26545 - Update the indicator and the close button of the CFR composable. 2022-08-19 17:01:46 +00:00
Mugurell 1332d408da For #26380 - Wait in tests until telemetry is recorded. 2022-08-19 16:26:21 +00:00
MickeyMoz 862d74587c Update Android Components version to 105.0.20220819133109. 2022-08-19 15:07:17 +00:00
sv-ohorvath fb8d22e37b Issue #26127, #26092: Ads RetryTestRule to TopSitesTest class, other small refactors 2022-08-19 07:44:18 +00:00
mike a 8e4effe70a Revert "Closes #25967: add classes to support multiple viewHolders"
This reverts commit f910fcfe76.
2022-08-19 01:52:15 +00:00
Mozilla L10n Automation Bot 9d127817d0 Import l10n. 2022-08-19 00:47:36 +00:00
mike a c90debfe15 Revert "Closes #24307: add synced history empty fragment, feature flag and history screen showing only local files 2022-08-18 22:33:07 +00:00
Gabriel Luong 5f2ebf8125 For #26528 - Add a nimbus feature flag for MR Home Onboarding Dialog 2022-08-18 21:30:37 +00:00
mike a 3434c702de Closes #26502: add isLocal parameter for history openItem telemetry event 2022-08-18 20:36:04 +00:00
Ryan VanderMeulen 4bb0e68d29
Set the gradle memory limit to 8GB. 2022-08-18 16:00:24 -04:00
Ryan VanderMeulen 7466d4a234 Set the gradle memory limit to 12GB.
We're seeing intermittent crashes with 16GB, so let's try 12GB instead.
2022-08-18 18:59:48 +00:00
Noah Bond 9d4c975c68 For #26517 - Create wallpaper v2 feature flag 2022-08-18 18:18:34 +00:00
MickeyMoz f5695e8418 Update Android Components version to 105.0.20220818143133. 2022-08-18 12:45:09 -04:00
AndiAJ d7c21755f3 For #26074 fix failing settingsTest screen shot UI test 2022-08-18 16:22:52 +00:00
MatthewTighe 532156bed6 For #26423: add wallpaper metadata fetcher 2022-08-18 15:45:00 +00:00
Ryan VanderMeulen bb44bfb72c Bump the gradle memory limit to 16GB. 2022-08-18 11:10:00 -04:00
AndiAJ 96c8bde3fd For #26144 new verifySponsoredShortcutsListTest UI test 2022-08-18 15:07:16 +00:00
Noah Bond 81dae89969 No issue: Remove code to generate tab group size metrics 2022-08-18 14:12:02 +00:00
Mugurell edff593ee6 For #26335: Disable tests for the number of inflations.
These fail in Firebase with different values making the test intermittent.
2022-08-18 13:40:09 +00:00
Mugurell 1f562fe927 For #26335: Allow for more inflations in performance tests
The first patch for this enabled the contile feature by default which based on
the automated tests increased the number of inflations done in HomeActivity.
This patch comes to address that by allowing for up to 6 inflations as seen
reported as the actual count in tests.
2022-08-18 13:40:09 +00:00
mergify 765c3e0b99 update initial_experiments.json based on the current first-run experiments in experimenter 2022-08-17 22:06:32 -04:00
Mozilla L10n Automation Bot 6e18cb1043 Import l10n. 2022-08-17 21:07:46 -04:00
Alexandru2909 0c6cf5f6a8 For #26335: Enable sponsored shortcuts by default 2022-08-17 12:57:40 -04:00
MickeyMoz 395c404f07 Update Android Components version to 105.0.20220817134040. 2022-08-17 11:40:01 -04:00
Jonathan Almeida 94ff169a30 Close #26495: Move Huawei checks to ManufacturerCodes 2022-08-17 14:52:57 +00:00
Mozilla L10n Automation Bot 32b635d5c8 Import l10n. 2022-08-17 00:52:37 +00:00
MatthewTighe 7bfd6caa5b For #26423: simplify wallpaper types to single data class 2022-08-16 21:12:21 +00:00
MatthewTighe ab306f0ab9 Fixes #26124: recent synced tab will use preview image URLs from history 2022-08-16 20:30:22 +00:00
sunilk9211 db47f4182d For #25985: Remove ability to click the logo to change the wallpaper 2022-08-16 19:11:39 +00:00
mavduevskiy 40ef60ca87 Revert "Closes #25942: use HistoryFragment to show synced history"
This reverts commit 6483e1c647.
2022-08-16 18:42:34 +00:00
MickeyMoz 537ad92520 Update Android Components version to 105.0.20220816141652. 2022-08-16 13:12:45 -04:00
Mugurell f96f8465ad For #26414 - Have the Pocket spocs feature as part of the homescreen sections experiments 2022-08-16 14:35:35 +00:00
sarah541 0b0e31aae8 For #26421 - Extract synced tabs into it's own viewholder 2022-08-16 04:12:55 +00:00
indu 979862357d For #26037: Open shared FireFox tab from another device in Firefox browser
This fix will allow the tab that's being shared from a device to open in FireFox browser in the device  that receives the tab, even if another browser is set as default in the destination device.

Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
2022-08-15 21:16:10 -04:00
Mozilla L10n Automation Bot 7d0c09fb3e Import l10n. 2022-08-16 01:07:57 +00:00
Roger Yang 85f8a1f3ee Close #26150: Do not show sync tabs in home when sync open tabs setting is disabled 2022-08-16 00:15:11 +00:00
mike a 9baf0db8db Closes #26446: add wallpaper oboarding Nimbus flag 2022-08-15 23:21:25 +00:00
Gabriel Luong 8260702a3d No issue - Use the onboarding description in nimbus.fml.yaml 2022-08-15 17:17:23 -04:00
MickeyMoz ea4bdec8d2 Update Android Components version to 105.0.20220815143121. 2022-08-15 16:38:07 +00:00
Mozilla L10n Automation Bot c9c7e2f3b8 Import l10n. 2022-08-15 13:24:51 +00:00
MickeyMoz f6f21f98a8 Update Android Components version to 105.0.20220814143053. 2022-08-14 16:45:09 +00:00
Mozilla L10n Automation Bot e4ee87a614 Import l10n. 2022-08-14 00:40:15 +00:00
MickeyMoz f52f6b4e22 Update Android Components version to 105.0.20220813143108. 2022-08-13 12:44:46 -04:00
Mozilla L10n Automation Bot a28ffd76bd Import l10n. 2022-08-13 15:55:23 +00:00
MickeyMoz b4bc3918a8 Update Android Components version to 105.0.20220812143059. 2022-08-12 19:26:31 +00:00
Gabriel Luong a98868d791 For #26412 - Remove try catch for NimbusFeatureException from FxNimbus value() getter 2022-08-12 16:05:23 +00:00
sarah541 bbb602a2fd For #26308 - Add feature flag for MR onboarding 2022-08-12 15:01:33 +00:00
sv-ohorvath cffce104cf Issue ##26361: randomize shortcut titles to avoid data overlapping 2022-08-12 12:26:07 +00:00
AndiAJ 6bab84f565 For #26144 new cancelDeleteAllHistoryTest UI test 2022-08-12 08:15:35 +00:00
AndiAJ 323da3b459 For #26144 refactor deleteAllHistoryTest UI test 2022-08-12 08:15:35 +00:00
Mugurell e74742a3e6 For #25602: Lowercase search engine id when recording telemetry 2022-08-12 06:41:29 +00:00
Alexandru2909 c268161311 For #26115 - Change homescreen Show all button color according to wallpaper 2022-08-12 00:55:43 +00:00
Charlie Humphreys b33abbbec2 change name for isFirstRun to isFirstNimbusRun and move setter to after experiments are set 2022-08-12 00:24:28 +00:00
Charlie Humphreys 1ce99506ad update isFirstRun to be manually set and set experiments locally on first run 2022-08-12 00:24:28 +00:00
Charlie Humphreys 9b8ffbc8c1 Add workflow to download Nimbus early experiments 2022-08-11 21:35:14 +00:00
Mickey Moz 580ec1d7ff
Update Android Components version to 105.0.20220811143056. (#26440)
Co-authored-by: Donal Meehan <76789979+DonalMe@users.noreply.github.com>
2022-08-11 15:13:53 -04:00
isabelrios 33406ac245 use python 3.10 2022-08-11 15:31:37 +00:00
isabelrios ae21e63f8b For #26390 Upgrade to Python3 2022-08-11 15:31:37 +00:00
MatthewTighe 72959901d8 Fixes #26245: refactor the WallpaperManager as several WallpaperUseCases 2022-08-11 14:56:49 +00:00
Jonathan Almeida d0c21c06aa Close #26041: Remove un-needed Nimbus workaround
This workaround was temporary and is not needed with the Nimbus groovy
plugin updates in Android Components.
2022-08-11 10:13:19 -04:00
Roger Yang 4204c43236 Close #26198: Add debounce to account manager syncs 2022-08-10 21:06:29 +00:00
Mozilla L10n Automation Bot f356df785c Import l10n. 2022-08-10 07:26:01 +00:00
rxu 2a30213fc1 Add "manage account and devices" button to home menu in mozillaonline builds 2022-08-10 06:50:08 +00:00
Noah Bond a77375a363 For #22558 - Fix private theme bug in Tabs Tray 2022-08-09 21:08:38 +00:00
Jonathan Almeida f03ee91ecb Close #26041: Re-set TrackingProtectionPolicy after Nimbus SDK is initialized
There are three issues here that we have uncovered while investigating
this bug:

 1. Settings.kt has a lazy block around `enabledTotalCookieProtection`
    which ends up caching the first result it evaluates.
 3. The `FeatureHolder` within FxNimbus caches the incorrectly
    evaluated value and returns this value hence forth.
 4. Nimbus is not ready to return a result for an engine experiment
    when we need it early on in the dependency tree initialization.

There are multiple systems that require engine to be initialized for
 them to work (e.g. Glean, Profiler, concept-fetch). In our TCP,
 experiment, we need to apply these engine settings during the engine
 initialization. So when we try and evaluate Nimbus that early on, it
 has not had time to initialize itself correctly or even use the
 engine's concept-fetch client to return the correct experiment result.
 This bug is made worse because of the first two caching bugs where we
 are always holding onto a cached value of the wrong result.

Our temporary solution is to:

 1. Remove the `lazy` around `Settings.enabledTotalCookieProtection`.
 2. Set the `FxNimbus.api` value right after we are done initializing
    `FxNimbus` and `NimbusApi` so that all future queries to FxNimbus
    will be made against a real instance of `NimbusApi`. This is a
    short-term fix for the `FeatureHolder` caching bug.
 3. Set a new TrackingProtectionPolicy that will evaluate Nimbus now
    that it is in the correct state when receive the
    `NimbusInterface.Observer.onUpdatesApplied`.

Co-authored-by: jhugman <jhugman@users.noreply.github.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2022-08-09 19:33:00 +00:00
MatthewTighe 29a8c33ba5 Fixes #26377: re-open already opened recent synced tabs 2022-08-09 19:00:40 +00:00
MickeyMoz b3fa1b0e81 Update Android Components version to 105.0.20220809141528. 2022-08-09 16:43:27 +00:00
Mozilla L10n Automation Bot 37745eb83d Import l10n. 2022-08-09 10:12:58 +00:00
Noah Bond db0162465b For #26289 - Remove search term tab groups metrics and setting 2022-08-08 18:16:33 +00:00
MickeyMoz 8e3d64f71c Update Android Components version to 105.0.20220808143406. 2022-08-08 12:51:06 -04:00
rudmannn 8e8ea5e57a
Fix #26362: Use app:lineHeight to support API Level <= 27 (#26364)
* Fix android:lineHeight

Change android:lineHeight to app:lineHeight for incompatibilities at API Level <= 27

* Fix android:lineHeight (Part 2)

Change android:lineHeight to app:lineHeight for fixing incompatibilities in custom_search_engine

* Change android:lineHeight (Part 3)

Change android:lineHeight to app:lineHeight in settings_https_only for incompatibilities at API Level <= 27

* cleanup lint-baseline.xml

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-08 12:12:18 -04:00
Jan-Erik Rediger 06488cdabe Move startup perf measurements to a background thread
This is required to avoid loading the Glean core library (provided by libxul) early on.
Fenix needs to do the time measurement itself for now.
2022-08-08 14:10:36 +00:00
Alexandru2909 1a2b357119 For #26302 - Change header text height to wrap_content for autofill add/edit screens 2022-08-08 05:37:09 +00:00
Mozilla L10n Automation Bot 9255d351fd Import l10n. 2022-08-08 00:39:10 +00:00
MickeyMoz 25d2233e35 Update Android Components version to 105.0.20220807143114. 2022-08-07 16:34:25 +00:00
Mozilla L10n Automation Bot 4f77d2966b Import l10n. 2022-08-07 00:43:28 +00:00
MickeyMoz 0ed165d3f7 Update Android Components version to 105.0.20220806154436. 2022-08-06 17:18:04 +00:00
Mozilla L10n Automation Bot 4379b06288 Import l10n. 2022-08-06 00:39:20 +00:00
Mugurell 624ffa79e1 For #26236: Update Android Components version which introduces the api change 2022-08-05 15:25:39 +00:00
indu 1488e8e87b For #26236: Fix breaking change from AC regarding exitImmersiveModeIfNeeded
This will allow Fenix to use the refactored method name 'exitImmersiveMode' in Activity from Android Components library

Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
2022-08-05 15:25:39 +00:00
Mozilla L10n Automation Bot 926daabe1f Import l10n. 2022-08-05 00:40:01 +00:00
AndiAJ c356982a4d For #26144 new App-like experience in PWAs UI test 2022-08-04 19:28:09 +00:00
Mickey Moz 20911100d9
Update Android Components version to 105.0.20220804143845. (#26319) 2022-08-04 13:00:07 -04:00
AndiAJ 9a6d7f5bbd For #26286 new verifyRemoveTopSiteFromMainMenu UI test 2022-08-04 14:35:34 +00:00
AndiAJ 7e06d48bcb For #25926 disable failing mainMenuOpenInAppTest UI test 2022-08-04 11:54:48 +00:00
Mozilla L10n Automation Bot dd563b19f0 Import l10n. 2022-08-04 01:10:03 +00:00
Noah Bond 8656fd48eb For #26227 - Remove search term tab groups from Jump Back In 2022-08-04 00:10:47 +00:00
Mugurell aa992263d6 For #26172 - New CFR popup composable
This will allow for pinpoint accuracy when anchoring and resolve any color
disparities between the popup body and the indicator arrow by having everything
drawn programmatically as one shape.

Because of the async nature of the values for insets and screen rotation
immediately after an orientation change the popup will automatically get
dismissed to prevent any anchoring issues.
While not ideal the effect of this is better than accepting layout issues after
orientation changes and is the same approach used for other of our popups.
2022-08-03 19:04:31 +00:00
MickeyMoz 577ec0b659 Update Android Components version to 105.0.20220803135114. 2022-08-03 15:55:32 +00:00
KNS f96c77a5a0
Bug 1780858 - Run a51 browsertime tests on Fenix branch (#26152)
* Add a51 platform and worker

* Run on pull request

* Remove on-pull-request

* Add correct matching platform for A51

* Remove github-pull-request

Co-authored-by: KS <kshampur@MacBook-Pro.local>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-03 12:33:45 +00:00
Alexandru2909 ec4ad984c2 For #26239 - Avoid displaying multiple download items for the same file 2022-08-03 11:49:42 +00:00
AndiAJ f239a24d48 For #26286 new undoDeleteHistoryItemTest UI test 2022-08-03 05:51:31 +00:00
Christian Sadilek 7ddc50017e Revert "For #26227 - Remove search term tab groups from Jump Back In"
This reverts commit fa00527dc6.
2022-08-03 02:39:42 +00:00
Christian Sadilek b24650c449 Revert "For #26227 - Remove search term tab groups from Recently Visited"
This reverts commit c45e4b4ac5.
2022-08-03 02:39:42 +00:00
Arturo Mejia bddac731d5 For #26283: Use message buttonLabel in MessageCard. 2022-08-03 01:54:13 +00:00
Mozilla L10n Automation Bot 4ee1b6da9e Import l10n. 2022-08-03 00:36:46 +00:00
Noah Bond c45e4b4ac5 For #26227 - Remove search term tab groups from Recently Visited 2022-08-02 22:46:10 +00:00
Noah Bond fa00527dc6 For #26227 - Remove search term tab groups from Jump Back In 2022-08-02 22:46:10 +00:00
MatthewTighe 9fb6eeb8cf Fixes: #26052 remove WallpaperManager::updateWallpaper 2022-08-02 21:33:54 +00:00
MickeyMoz cedb040e84 Update Android Components version to 105.0.20220802143107. 2022-08-02 17:00:22 +00:00
Alexandru2909 acf9206fe1 For #25837 - Invalidate cached nimbusValidation values when changing locale settings 2022-08-02 07:45:13 +00:00
Mozilla L10n Automation Bot 1cf34a5ac4 Import l10n. 2022-08-02 01:35:29 +00:00
MickeyMoz 4982f7ccef Update Android Components version to 105.0.20220801222259. 2022-08-02 00:05:41 +00:00
MickeyMoz 01a0399190 Update Android Components version to 105.0.20220801143302. 2022-08-01 13:27:10 -04:00
Johan Lorenzo fcb5acb53a Bug 1781248 - part 5: Fix title of release promotion task 2022-08-01 17:20:58 +00:00
Johan Lorenzo b5ec15b0ab Bug 1781248 - part 4: Add another email notification when the ship phase is over 2022-08-01 17:20:58 +00:00
Johan Lorenzo 4334e982bf Bug 1781248 - part 3: Add email notification when the promote phase is over 2022-08-01 17:20:58 +00:00
Johan Lorenzo 417ece7d4d Bug 1781248 - part 2: Remove `version` and `next_version` from extended parameters
now that they are part of standalone taskgraph
2022-08-01 17:20:58 +00:00
Johan Lorenzo e0b748d8ac Bug 1781248 - part 1: Bump taskgraph to version 2.0.0 2022-08-01 17:20:58 +00:00
AndiAJ 39a4a7c275 For #25926 disable failing testDownloadPrompt UI test 2022-08-01 10:07:14 +00:00
Mozilla L10n Automation Bot c80195064f Import l10n. 2022-08-01 00:39:20 +00:00
MickeyMoz 7ea63280a8 Update Android Components version to 105.0.20220731143130. 2022-07-31 16:49:45 +00:00
Mozilla L10n Automation Bot b57ff63707 Import l10n. 2022-07-31 00:45:15 +00:00
MickeyMoz 1deecaae7b Update Android Components version to 105.0.20220730143045. 2022-07-30 16:40:23 +00:00
Mozilla L10n Automation Bot 77a6381520 Import l10n. 2022-07-30 00:42:27 +00:00
MatthewTighe 767d604315 Fixes #26029: Add wallpaper state to AppStore 2022-07-29 22:18:19 +00:00
MickeyMoz a167194697 Update Android Components version to 105.0.20220729143111. 2022-07-29 16:48:11 +00:00
Alexandru2909 7d85a9d274 For #26221 - Use favicon instead of ic_globe for composed tab grid item 2022-07-29 13:06:48 +00:00
Mozilla L10n Automation Bot 5e58ace753 Import l10n. 2022-07-29 00:42:02 +00:00
mike a 6483e1c647 Closes #25942: use HistoryFragment to show synced history 2022-07-28 20:53:36 +00:00
MickeyMoz 586aca8924 Update Android Components version to 105.0.20220728143105. 2022-07-28 16:40:46 +00:00
Mozilla L10n Automation Bot cf21e02182 Import l10n. 2022-07-28 00:38:34 +00:00
MickeyMoz 4128ec5fef Update Android Components version to 105.0.20220727204709. 2022-07-27 18:53:38 -04:00
Roger Yang 015b79f833 For #26061: Make sure favicons are cropped correctly 2022-07-27 22:11:13 +00:00
mcarare 11a7085e46 For #26197: Cancel history list update on fragment destroyed. 2022-07-27 18:06:56 +00:00
MickeyMoz b605ee0a8e Update Android Components version to 105.0.20220727143123. 2022-07-27 16:39:14 +00:00
Mozilla L10n Automation Bot d48bb493e7 Import l10n. 2022-07-27 00:48:42 +00:00
mike a 063a09782a Issue #26101: add telementry for deleting history time range 2022-07-26 20:59:16 +00:00
MickeyMoz b0acb01f6e Update Android Components version to 105.0.20220726143051. 2022-07-26 12:58:16 -04:00
mcarare 4f18bcd488 For #22692: Remove Metropolis font file issues from baseline lint. 2022-07-26 16:39:29 +00:00
mcarare 4b5b15aa53 For #22692: Remove Metropolis font. 2022-07-26 16:39:29 +00:00
Gabriel Luong db38b722a2 For #26180 - Renew telemetry expiring in 106 2022-07-26 15:58:27 +00:00
Alexandru2909 335159cef5 For #25891 - Move GridViewHolder to compose 2022-07-26 09:17:09 +00:00
sv-ohorvath 263e4d819b Issue #25970: wait for homescreen to exist before scrolling 2022-07-26 08:28:08 +00:00
Gabriel Luong 8f51a9968a For #26026 - Refactor the FenixTabCounterMenu creation from HomeFragment to TabCounterBuilder 2022-07-26 05:41:42 +00:00
Gabriel Luong ac51c345e7 For #26182 - Remove all unused strings marked moz:removedIn <= 102 2022-07-26 02:29:54 +00:00
Mozilla L10n Automation Bot 74d143721c Import l10n. 2022-07-26 01:52:49 +00:00
Gabriel Luong 352591805e Update version.txt to 105.0b1 2022-07-26 01:16:03 +00:00
MickeyMoz 84ca7a1f53 Update Android Components version to 105.0.20220725212705. 2022-07-25 23:35:03 +00:00
mike a ed152a31c1 Closes #26174: remove escapes from the typographic quotes 2022-07-25 19:30:19 +00:00
mike a a475541be2 Closes #26174: fix delete time range prompt text punctuation 2022-07-25 19:30:19 +00:00
Gabriel Luong 4ab1832e57 For #26167 - Check the QA Needed checkbox by default 2022-07-25 17:54:59 +00:00
MickeyMoz 5ea119ad1f Update Android Components version to 104.0.20220725143152. 2022-07-25 16:05:23 +00:00
Johan Lorenzo 8722993e79 Bug 1780740 - part 4: Make the MickeyMoz rule handle A-C updates for both main and release branches 2022-07-25 13:22:54 +02:00
Johan Lorenzo 615735877e Bug 1780740 - part 3: Remove Mergify release automation rules because they will be combined with the MickeyMoz one 2022-07-25 13:22:54 +02:00
Johan Lorenzo e6a99f19d2 Bug 1780740 - part 2: Don't automatically approve a bump if any other files than AndroidComponents.kt are changed 2022-07-25 13:22:54 +02:00
Johan Lorenzo 04691431bd Bug 1780740 - part 1: Don't automerge if Gecko.kt changes since this file was removed in https://github.com/mozilla-mobile/fenix/pull/4297 2022-07-25 13:22:54 +02:00
Mozilla L10n Automation Bot 4ec71c3aba Import l10n. 2022-07-25 00:43:30 +00:00
MickeyMoz f0f06eb9a9 Update Android Components version to 104.0.20220724143140. 2022-07-24 16:48:55 +00:00
Mozilla L10n Automation Bot 7c4e087749 Import l10n. 2022-07-24 00:39:21 +00:00
MickeyMoz c9365e9d95 Update Android Components version to 104.0.20220723143127. 2022-07-23 21:15:19 +00:00
Mozilla L10n Automation Bot 75864cca82 Import l10n. 2022-07-23 00:41:38 +00:00
MickeyMoz 8f06aad310 Update Android Components version to 104.0.20220722143220. 2022-07-22 18:21:46 +00:00
Gabriel Luong 1e43c4474c For #26146 - Use the correct moz:removedIn version in @string/delete_browsing_data_prompt_message 2022-07-22 16:28:53 +00:00
Gabriel Luong 540d39619f Update app/metrics.yaml 2022-07-22 14:54:02 +00:00
Alexandru2909 2345eb22a8 For #26089 - Record metrics for save credit card prompt shown 2022-07-22 14:54:02 +00:00
Gabriel Luong b4cf80a86d No issue - commit experimenter.yaml 2022-07-22 14:07:52 +00:00
Mozilla L10n Automation Bot fa8e4a7cc6 Import l10n. 2022-07-22 00:48:41 +00:00
MickeyMoz ea94b6c8e2 Update Android Components version to 104.0.20220721182501. 2022-07-21 20:07:58 +00:00
MickeyMoz ce92a0ab3b Update Android Components version to 104.0.20220721143105. 2022-07-21 17:18:31 +00:00
Gabriel Luong 7603d6db66 For #26134 - Add parameter description for @string/delete_all_history_group_prompt_message 2022-07-21 15:58:22 +00:00
Johan Lorenzo 6a14c89e7f Bug 1777255 - part 3: Bump fenix-beta-version Github Action to support new version numbers 2022-07-21 09:05:18 +00:00
Gabriel Luong ff15d4fcd0 For #26121 - Renew telemetry expiring in 105 2022-07-21 05:05:19 +00:00
Mozilla L10n Automation Bot 15a870c356 Import l10n. 2022-07-21 00:43:17 +00:00
mike a 7982c6b79f Close #25954: add a new delete time range confirmation dialog for history screen 2022-07-20 21:01:14 +00:00
Gabriel Luong bfd0eb7306 For #26113 ⁃ Enable address autofill in all channels 2022-07-20 20:31:51 +00:00
MickeyMoz 730f66fa97 Update Android Components version to 104.0.20220720144326. 2022-07-20 18:48:28 +00:00
Mickey Moz de99405830
Update Android Components version to 104.0.20220719143125. (#26112)
Co-authored-by: Ryan VanderMeulen <rvandermeulen@mozilla.com>
2022-07-20 12:50:09 -04:00
Johan Lorenzo 8f01fb0473 Bug 1779797 - part 6: Do automatically approve a merge request if any other files than L10n ones are changed 2022-07-20 16:44:24 +02:00
Johan Lorenzo 35abbc56a3 Bug 1779797 - part 5: Only auto-approve l10n bumps if they come from the right branches 2022-07-20 16:44:24 +02:00
Johan Lorenzo 8acdaf94da Bug 1779797 - part 4: Fix l10n bumps branch name 2022-07-20 16:44:24 +02:00
Johan Lorenzo 96692de82c Bug 1779797 - part 3: Create complete-push taskcluster task 2022-07-20 16:44:24 +02:00
Johan Lorenzo d2416d39ec Bug 1779797 - part 2: Provide email address for github-actions[bot] on Taskcluster decision task 2022-07-20 16:44:24 +02:00
sv-ohorvath 3111c8bf8b Issue #26097: use mock location in UI tests 2022-07-20 09:39:16 +00:00
sv-ohorvath f3ef15800c Issue #25972, #25971: reduce test failures with more retries on legacy-api-tests 2022-07-20 07:27:48 +00:00
Mozilla L10n Automation Bot 52a2cb6a4d Import l10n. 2022-07-20 00:42:36 +00:00
MatthewTighe f58f1541ce Fixes #26050: show jump back in when only synced tab available 2022-07-19 18:40:34 +00:00
MickeyMoz b454684090 Update Android Components version to 104.0.20220719143125. 2022-07-19 13:03:22 -04:00
Noah Bond 7e59a644d5 For #21898 - Remove search term tab groups from the Tabs Tray 2022-07-19 16:59:57 +00:00
sarah541 da4328e53f For #22186 - Scroll to collection after creating one 2022-07-19 16:07:18 +00:00
Mugurell 5c7921b448 For #26069 - Update steps for downloading APKs from open PRs. 2022-07-19 12:51:54 +00:00
Mozilla L10n Automation Bot 96472c9d72 Import l10n. 2022-07-19 00:44:36 +00:00
MickeyMoz e9de331b00 Update Android Components version to 104.0.20220718174753. 2022-07-18 15:45:56 -04:00
sarah541 4419e99b48 For #25894 - Add firefox suggest header for lib suggestions 2022-07-18 18:47:10 +00:00
MickeyMoz 221e3441f4 Update Android Components version to 104.0.20220718143145. 2022-07-18 16:42:30 +00:00
Mozilla L10n Automation Bot 9f36956291 Import l10n. 2022-07-18 00:42:19 +00:00
MickeyMoz 5151ab4c06 Update Android Components version to 104.0.20220717143135. 2022-07-17 16:47:48 +00:00
Mozilla L10n Automation Bot f3e0848533 Import l10n. 2022-07-17 00:46:06 +00:00
Mozilla L10n Automation Bot 51715c27b9 Import l10n. 2022-07-16 01:46:12 +00:00
mike a f910fcfe76 Closes #25967: add classes to support multiple viewHolders 2022-07-16 01:03:53 +00:00
MatthewTighe 5e15e9a6b3 Fixes #25955: refactor RecentSyncedTabsFeature to use SyncStore 2022-07-16 00:29:16 +00:00
mike a bbc835ad02 Closes #25952: update close icon, start using close_20 on smaller ui elements 2022-07-15 23:24:27 +00:00
Johan Lorenzo 46f69bc35a Bug 1779797 - Let mergify automatically approve l10n bumps on release branches 2022-07-15 18:43:09 -04:00
MickeyMoz 0bcaa92669 Update Android Components version to 104.0.20220715193302. 2022-07-15 17:49:37 -04:00
Roger Yang ee3fd03313 No issue: remove unused inactive tab auto close dialog controller 2022-07-15 19:07:25 +00:00
MickeyMoz 4de5ba42e7 Update Android Components version to 104.0.20220715143105. 2022-07-15 16:49:14 +00:00
1403 changed files with 59722 additions and 27602 deletions

View File

@ -12,18 +12,19 @@ jobs:
when:
- {hour: 5, minute: 0}
- {hour: 17, minute: 0}
- name: nightly-test
job:
type: decision-task
treeherder-symbol: Nt
target-tasks-method: nightly-test
when:
- {hour: 5, minute: 0}
- name: fennec-production
job:
type: decision-task
treeherder-symbol: fennec-production
target-tasks-method: fennec-production
when: [] # Force hook only
- name: bump-android-components
job:
type: decision-task
treeherder-symbol: bump-ac
target-tasks-method: bump_android_components
when: [{hour: 15, minute: 30}]
- name: screenshots
job:
type: decision-task
@ -35,4 +36,4 @@ jobs:
type: decision-task
treeherder-symbol: legacy-api-ui
target-tasks-method: legacy_api_ui_tests
when: [{hour: 10, minute: 30}]
when: [] # temporarily unscheduled

View File

@ -1,4 +1,6 @@
[*.{kt,kts}]
# Disabling rules that were added in the latest versions of ktlint
# tracking here: https://github.com/mozilla-mobile/fenix/issues/4861
disabled_rules=import-ordering
ij_kotlin_allow_trailing_comma_on_call_site=true
ij_kotlin_allow_trailing_comma=true
[*]
insert_final_newline = true

View File

@ -1,15 +1,20 @@
---
engine-settings:
description: Contains a set of settings for controlling the web engine configurations.
cookie-banners:
description: Features for cookie banner handling.
hasExposure: true
exposureDescription: ""
variables:
tabs-prioritization-enabled:
sections-enabled:
type: json
description: This property provides a lookup table of whether or not the given section should be enabled.
growth-data:
description: A feature measuring campaign growth data
hasExposure: true
exposureDescription: ""
variables:
enabled:
type: boolean
description: "If true, enables tabs prioritization feature."
total-cookie-protection-enabled:
type: boolean
description: "If true, enables the total cookie protection in all browsing modes."
description: "If true, the feature is active"
homescreen:
description: The homescreen that the user goes to when they press home or new tab.
hasExposure: true
@ -32,6 +37,9 @@ messaging:
messages:
type: json
description: A growable collection of messages
notification-config:
type: json
description: Configuration of the notification worker for all notification messages.
on-control:
type: string
description: What should be displayed when a control message is selected.
@ -44,6 +52,14 @@ messaging:
triggers:
type: json
description: "A collection of out the box trigger expressions. Each entry maps to a valid JEXL expression.\n"
mr2022:
description: Features for MR 2022.
hasExposure: true
exposureDescription: ""
variables:
sections-enabled:
type: json
description: This property provides a lookup table of whether or not the given section should be enabled.
nimbus-validation:
description: A feature that does not correspond to an application feature suitable for showing that Nimbus is working. This should never be used in production.
hasExposure: true
@ -58,14 +74,22 @@ nimbus-validation:
settings-title:
type: string
description: The title of displayed in the Settings screen and app menu.
pocket-sponsored-stories:
description: A feature showing sponsored stories in between the other Pocket recommended stories on homescreen.
pre-permission-notification-prompt:
description: A feature that shows the pre-permission notification prompt.
hasExposure: true
exposureDescription: ""
variables:
enabled:
type: boolean
description: "If true, the Pocket stories shown on homescreen should contain sponsored stories also."
description: "if true, the pre-permission notification prompt is shown to the user."
re-engagement-notification:
description: A feature that shows the re-enagement notification if the user is inactive.
hasExposure: true
exposureDescription: ""
variables:
enabled:
type: boolean
description: "If true, the re-engagement notification is shown to the inactive user."
search-term-groups:
description: A feature allowing the grouping of URLs around the search term that it came from.
hasExposure: true

5
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,5 @@
# .git-blame-ignore-revs
# For #27667 - Remove import-ordering from the list of disabled ktlint rules (#27680)
9654b4dfb122b54b04369fe80a2f9c95811478e8
# For #26844: Fix ktlint issues and remove them from baseline. (#26901)
ffcef5ff2e3f78b6972dd16551f3f653b7035ccc

View File

@ -8,13 +8,14 @@
### QA
<!-- Before submitting the PR, please address each item -->
- [ ] **QA Needed**
- [x] **QA Needed**
### To download an APK when reviewing a PR:
1. click on Show All Checks,
2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
3. click on the "Fenix - assemble" task, then click "Run Artifacts".
4. the APK links should be on the left side of the screen, named for each CPU architecture
### To download an APK when reviewing a PR (after all CI tasks finished running):
1. Click on `Checks` at the top of the PR page.
2. Click on the `firefoxci-taskcluster` group on the left to expand all tasks.
3. Click on the `build-debug` task.
4. Click on `View task in Taskcluster` in the new `DETAILS` section.
5. The APK links should be on the right side of the screen, named for each CPU architecture.
### GitHub Automation
<!-- Do not add anything below this line -->

View File

@ -3,7 +3,7 @@ on: [pull_request]
jobs:
run-build:
runs-on: ubuntu-20.04
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
if: ${{ false }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
@ -108,7 +108,6 @@ jobs:
run-ui:
runs-on: macos-11
if: ${{ false }}
timeout-minutes: 60
strategy:
matrix:

View File

@ -2,7 +2,7 @@
# 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/
name: "Sync Strings"
name: "Fenix - Sync Strings"
on:
schedule:
@ -15,10 +15,10 @@ jobs:
steps:
- name: "Discover Fenix Beta Version"
id: fenix-beta-version
uses: mozilla-mobile/fenix-beta-version@2.0.0
uses: mozilla-mobile/fenix-beta-version@4.1.0
- name: "Skip non-beta versions"
uses: andymckay/cancel-action@0.2
if: ${{ steps.fenix-beta-version.outputs.fenix-beta-version == '' }}
if: ${{ steps.fenix-beta-version.outputs.beta_version == '' }}
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v2
with:
path: beta
ref: "releases_v${{ steps.fenix-beta-version.outputs.fenix-beta-version }}.0.0"
ref: "releases_v${{ steps.fenix-beta-version.outputs.beta_version }}.0.0"
- name: "Sync Strings"
uses: mozilla-mobile/sync-strings-action@1.0.1
with:
@ -39,7 +39,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: beta
branch: automation/sync-strings-${{ steps.fenix-beta-version.outputs.major-beta-version }}
title: "Sync Strings from main to releases_${{steps.fenix-beta-version.outputs.fenix-beta-version}}.0"
body: "This (automated) PR syncs strings from `main` to `releases_${{steps.fenix-beta-version.outputs.fenix-beta-version}}.0.0`"
labels: needs:review
branch: automation/sync-strings-${{ steps.fenix-beta-version.outputs.beta_version }}
title: "Sync Strings from main to releases_${{steps.fenix-beta-version.outputs.beta_version}}.0"
body: "This (automated) PR syncs strings from `main` to `releases_${{steps.fenix-beta-version.outputs.beta_version}}.0.0`"

View File

@ -2,7 +2,7 @@
# 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/
name: "Update Android-Components"
name: "Fenix - Update Android-Components"
on:
schedule:
@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: "Update Android-Components"
uses: mozilla-mobile/relbot@master
uses: mozilla-mobile/relbot@5.0.2
if: github.repository == 'mozilla-mobile/fenix'
with:
project: fenix

View File

@ -0,0 +1,42 @@
# 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/
name: "Fenix - Update Nimbus Experiments"
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch: {}
jobs:
update-nimbus-experiments:
name: "Update Nimbus Experiments"
runs-on: ubuntu-latest
steps:
- name: "Checkout Main Branch"
uses: actions/checkout@v2
with:
path: fenix
ref: main
fetch-depth: 0
- name: "Update Experiments JSON"
id: update-experiments-json
uses: mozilla-mobile/update-experiments@v2
with:
repo-path: fenix
output-path: app/src/main/res/raw/initial_experiments.json
experimenter-url: https://experimenter.services.mozilla.com/api/v6/experiments-first-run/
app-name: fenix
branch: automation/update-nimbus-experiments
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
if: steps.update-experiments-json.outputs.changed == 1 && steps.update-experiments-json.outputs.changed-branch == 1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: fenix
branch: automation/update-nimbus-experiments
commit-message: "update initial_experiments.json based on the current first-run experiments in experimenter"
title: "Update initial experiments JSON for Nimbus"
body: "This (automated) PR updates the initial_experiments.json on the `main` branch"
delete-branch: true

View File

@ -1,7 +1,9 @@
queue_rules:
- name: default
conditions:
- status-success=pr-complete
- or:
- status-success=complete-pr
- status-success=complete-push
pull_request_rules:
- name: Resolve conflict
conditions:
@ -9,93 +11,64 @@ pull_request_rules:
actions:
comment:
message: This pull request has conflicts when rebasing. Could you fix it @{{author}}? 🙏
- name: MickeyMoz - Auto Merge
- name: Android-Components bump - Auto Merge
conditions:
- author=MickeyMoz
- status-success=pr-complete
- files~=(Gecko.kt|AndroidComponents.kt)
- and:
- files=buildSrc/src/main/java/AndroidComponents.kt
- -files~=^(?!buildSrc/src/main/java/AndroidComponents.kt).+$
- author=github-actions[bot]
- status-success=complete-push
- or:
- and:
- base=main
- head~=^relbot/AC-Nightly-.+
- and:
- base~=^releases[_/].*
- head~=^relbot/fenix-\d+
actions:
review:
type: APPROVE
message: MickeyMoz 💪
message: 🚢
queue:
method: rebase
name: default
rebase_fallback: none
- name: L10N - Auto Merge
conditions:
- author=mozilla-l10n-automation-bot
- status-success=pr-complete
- files~=(strings.xml|l10n.toml)
- and:
- files~=^(l10n.toml|app/src/main/res/values[A-Za-z-]*/strings\.xml)$
# /!\ The line above doesn't prevent random files to be changed alongside
# l10n ones. That's why the additional condition exists below. For more
# information: https://docs.mergify.com/conditions/#how-to-match-lists
- -files~=^(?!(l10n.toml|app/src/main/res/values[A-Za-z-]*/strings\.xml)).+$
- or:
- and:
- author=mozilla-l10n-automation-bot
- base=main
- head=import-l10n
- status-success=complete-pr
- and:
- author=github-actions[bot]
- base~=^releases[_/].*
- head~=^automation/sync-strings-\d+
- status-success=complete-push
# Taskcluster only runs on git-push events because github-actions[bot] is not considered
# a collaborator, so pull request events are triggered. That said, github-actions[bot]
# doesn't create the PR on a separate fork (unlike mozilla-l10n-automation-bot). That's
# why git-push events are taken into account
actions:
review:
type: APPROVE
message: LGTM 😎
queue:
method: rebase
method: squash
name: default
rebase_fallback: none
- name: Release automation (Old)
conditions:
- base~=releases[_/].*
- author=github-actions[bot]
# Listing checks manually beause we do not have a "push complete" check yet.
- check-success=build-android-test-debug
- check-success=build-debug
- check-success=build-nightly-simulation
- check-success=lint-compare-locales
- check-success=lint-detekt
- check-success=lint-ktlint
- check-success=lint-lint
- check-success=signing-android-test-debug
- check-success=signing-debug
- check-success=signing-nightly-simulation
- check-success=test-debug
- check-success=ui-test-x86-debug
- files~=(AndroidComponents.kt)
actions:
review:
type: APPROVE
message: 🚢
queue:
method: rebase
name: default
rebase_fallback: none
delete_head_branch:
force: false
- name: Release automation (New)
conditions:
- base~=releases[_/].*
- author=github-actions[bot]
# Listing checks manually beause we do not have a "push complete" check yet.
- check-success=build-android-test-beta
- check-success=build-android-test-debug
- check-success=build-beta-firebase
- check-success=build-debug
- check-success=build-nightly-simulation
- check-success=lint-compare-locales
- check-success=lint-detekt
- check-success=lint-ktlint
- check-success=lint-lint
- check-success=signing-android-test-beta
- check-success=signing-beta-firebase
- check-success=signing-nightly-simulation
- check-success=test-debug
- check-success=ui-test-x86-beta
- files~=(AndroidComponents.kt)
actions:
review:
type: APPROVE
message: 🚢
queue:
method: rebase
name: default
rebase_fallback: none
delete_head_branch:
force: false
- name: Needs landing - Rebase
conditions:
- check-success=pr-complete
- or:
- check-success=complete-pr
- check-success=complete-push
- label=pr:needs-landing
- "#approved-reviews-by>=1"
- -draft
@ -108,8 +81,10 @@ pull_request_rules:
rebase_fallback: none
- name: Needs landing - Squash
conditions:
- check-success=pr-complete
- label=pr:needs-landing-squashed
- or:
- check-success=complete-pr
- check-success=complete-push
- label=pr:needs-landing-squashed
- "#approved-reviews-by>=1"
- -draft
- label!=pr:work-in-progress

View File

@ -13,14 +13,14 @@ tasks:
$if: 'tasks_for in ["cron", "action"]'
then: '${tasks_for}@noreply.mozilla.org'
else:
$if: 'event.sender.login == "bors[bot]"'
then: 'skaspari+mozlando@mozilla.com' # It must match what's in bors.toml
else:
$if: 'tasks_for == "github-push"'
$if: 'tasks_for == "github-push"'
then:
$if: 'event.pusher.email'
then: '${event.pusher.email}'
else:
$if: 'tasks_for == "github-pull-request"'
then: '${event.pull_request.user.login}@users.noreply.github.com'
else: '${event.pusher.name}@users.noreply.github.com'
else:
$if: 'tasks_for == "github-pull-request"'
then: '${event.pull_request.user.login}@users.noreply.github.com'
baseRepoUrl:
$if: 'tasks_for == "github-push"'
then: '${event.repository.html_url}'
@ -122,7 +122,7 @@ tasks:
name: "Decision Task for cron job ${cron.job_name}"
description: 'Created by a [cron task](https://firefox-ci-tc.services.mozilla.com/tasks/${cron.task_id})'
provisionerId: "${trustDomain}-${level}"
workerType: "decision"
workerType: "decision-gcp"
tags:
$if: 'tasks_for in ["github-push", "github-pull-request"]'
then:
@ -203,7 +203,7 @@ tasks:
chainOfTrust: true
# Note: This task is built server side without the context or tooling that
# exist in tree so we must hard code the hash
image: mozillareleases/taskgraph:decision-mobile-7e11b0cc3966ad9729e08b19551399b3343d3b385eac067b6335d4c34431a899@sha256:b309fa59efd59991ba286a326cb43b724c38e6f3872c52d0f85e96428899c2fc
image: mozillareleases/taskgraph:decision-mobile-625975b642c148be4c6f1d8ee5cedf7399f5d0dd33d275ff69d5934e3082d4a9@sha256:bfb26700182486e1c6c52701baea6f386fa39e5e25417423c27845933605ad43
maxRunTime: 1800
@ -215,7 +215,7 @@ tasks:
- bash
- -cx
- $let:
extraArgs:
extraArgs:
$if: 'tasks_for == "cron"'
then: '${cron.quoted_args}'
else: ''
@ -247,7 +247,7 @@ tasks:
'public':
type: 'directory'
path: '/builds/worker/artifacts'
expires:
expires:
$fromNow: '1 year'
'public/docker-contexts':
type: 'directory'
@ -256,7 +256,7 @@ tasks:
# decision task + the docker-image task deadlines.
# It is set to a week to allow for some time for
# debugging, but they are not useful long-term.
expires:
expires:
$fromNow: '7 day'
extra:

View File

@ -199,10 +199,12 @@ raptorEnabled
If you're making changes to these projects and want to test them in Fenix, auto-publication workflow is the fastest, most reliable
way to do that.
In `local.properties`, specify a relative path to your local `android-components` and/or `application-services` checkouts. E.g.:
- `autoPublish.android-components.dir=../android-components`
In `local.properties`, specify a relative path to your local `android-components` and/or `application-services` projects. E.g.:
- `autoPublish.android-components.dir=../firefox-android/android-components`
- `autoPublish.application-services.dir=../application-services`
*Note that the Android Components project was already migrated to the new [firefox-android](https://github.com/mozilla-mobile/firefox-android) repository. Therefore, this auto publication workflow won't be neccessary for Android Components once Fenix is integrated in the new repository as well.*
Once these flags are set, your Fenix builds will include any local modifications present in these projects.
See a [demo of auto-publication workflow in action](https://www.youtube.com/watch?v=qZKlBzVvQGc).
@ -222,6 +224,11 @@ If you wish to use a Nimbus server during local development, you can add a `http
Testing experimental branches should be possible without a server.
### Using custom Glean servers during local development
If you wish to use a custom Glean server during local development, you can add a `https://` endpoint to the `local.properties` file.
- `glean.custom.server.url`
### GeckoView
Specify a relative path to your local `mozilla-central` checkout via `dependencySubstitutions.geckoviewTopsrcdir`,
and optional a path to m-c object directory via `dependencySubstitutions.geckoviewTopobjdir`.

View File

@ -2,7 +2,7 @@ import org.mozilla.fenix.gradle.tasks.ApkSizeTask
plugins {
id "com.jetbrains.python.envs" version "0.0.26"
id "com.google.protobuf" version "0.8.17"
id "com.google.protobuf" version "0.8.19"
}
apply plugin: 'com.android.application'
@ -47,7 +47,7 @@ android {
buildConfigField "String", "GIT_HASH", "\"\"" // see override in release builds for why it's blank.
// This should be the "public" base URL of AMO.
buildConfigField "String", "AMO_BASE_URL", "\"https://addons.mozilla.org\""
buildConfigField "String", "AMO_COLLECTION_NAME", "\"7dfae8669acc4312a65e8ba5553036\""
buildConfigField "String", "AMO_COLLECTION_NAME", "\"Extensions-for-Android\""
buildConfigField "String", "AMO_COLLECTION_USER", "\"mozilla\""
// These add-ons should be excluded for Mozilla Online builds.
buildConfigField "String[]", "MOZILLA_ONLINE_ADDON_EXCLUSIONS",
@ -59,7 +59,8 @@ android {
"\"foxyproxy@eric.h.jung\"," +
"\"{73a6fe31-595d-460b-a920-fcc0f8843232}\"," +
"\"jid1-BoFifL9Vbdl2zQ@jetpack\"," +
"\"woop-NoopscooPsnSXQ@jetpack\"" +
"\"woop-NoopscooPsnSXQ@jetpack\"," +
"\"adnauseam@rednoise.org\"" +
"}"
// This should be the base URL used to call the AMO API.
buildConfigField "String", "AMO_SERVER_URL", "\"https://services.addons.mozilla.org\""
@ -224,7 +225,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.androidx_compose
kotlinCompilerExtensionVersion = FenixVersions.androidx_compose_compiler
}
}
@ -235,7 +236,7 @@ android.applicationVariants.all { variant ->
// Generate version codes for builds
// -------------------------------------------------------------------------------------------------
def isDebug = variant.buildType.resValues['IS_DEBUG']?.value ?: false
def isDebug = variant.buildType.resValues['bool/IS_DEBUG']?.value ?: false
def useReleaseVersioning = variant.buildType.buildConfigFields['USE_RELEASE_VERSIONING']?.value ?: false
println("----------------------------------------------")
@ -365,6 +366,21 @@ android.applicationVariants.all { variant ->
println("--")
}
// -------------------------------------------------------------------------------------------------
// Glean: Read custom server URL from local.properties of a local file if it exists
// -------------------------------------------------------------------------------------------------
print("Glean custom server URL: ")
if (gradle.hasProperty("localProperties.glean.custom.server.url")) {
def url=gradle.getProperty("localProperties.glean.custom.server.url")
buildConfigField 'String', 'GLEAN_CUSTOM_URL', url
println "(Added from local.properties file)"
} else {
buildConfigField 'String', 'GLEAN_CUSTOM_URL', 'null'
println("--")
}
// -------------------------------------------------------------------------------------------------
// BuildConfig: Set flag for official builds; similar to MOZILLA_OFFICIAL in mozilla-central.
// -------------------------------------------------------------------------------------------------
@ -449,160 +465,164 @@ configurations {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}
}
dependencies {
jnaForTest Deps.jna
jnaForTest FenixDependencies.jna
testImplementation files(configurations.jnaForTest.copyRecursive().files)
implementation Deps.mozilla_browser_engine_gecko
implementation FenixDependencies.mozilla_browser_engine_gecko
implementation Deps.kotlin_stdlib
implementation Deps.kotlin_coroutines
implementation Deps.kotlin_coroutines_android
testImplementation Deps.kotlin_coroutines_test
implementation Deps.androidx_appcompat
implementation Deps.androidx_constraintlayout
implementation Deps.androidx_coordinatorlayout
implementation Deps.google_accompanist_drawablepainter
implementation FenixDependencies.kotlin_stdlib
implementation FenixDependencies.kotlin_coroutines
implementation FenixDependencies.kotlin_coroutines_android
testImplementation FenixDependencies.kotlin_coroutines_test
implementation FenixDependencies.androidx_appcompat
implementation FenixDependencies.androidx_constraintlayout
implementation FenixDependencies.androidx_coordinatorlayout
implementation FenixDependencies.google_accompanist_drawablepainter
implementation FenixDependencies.google_accompanist_insets
implementation Deps.sentry
implementation FenixDependencies.sentry
implementation Deps.mozilla_compose_awesomebar
implementation FenixDependencies.mozilla_compose_awesomebar
implementation Deps.mozilla_concept_awesomebar
implementation Deps.mozilla_concept_base
implementation Deps.mozilla_concept_engine
implementation Deps.mozilla_concept_menu
implementation Deps.mozilla_concept_push
implementation Deps.mozilla_concept_storage
implementation Deps.mozilla_concept_sync
implementation Deps.mozilla_concept_toolbar
implementation Deps.mozilla_concept_tabstray
implementation FenixDependencies.mozilla_concept_awesomebar
implementation FenixDependencies.mozilla_concept_base
implementation FenixDependencies.mozilla_concept_engine
implementation FenixDependencies.mozilla_concept_menu
implementation FenixDependencies.mozilla_concept_push
implementation FenixDependencies.mozilla_concept_storage
implementation FenixDependencies.mozilla_concept_sync
implementation FenixDependencies.mozilla_concept_toolbar
implementation FenixDependencies.mozilla_concept_tabstray
implementation Deps.mozilla_browser_domains
implementation Deps.mozilla_browser_icons
implementation Deps.mozilla_browser_menu
implementation Deps.mozilla_browser_menu2
implementation Deps.mozilla_browser_session_storage
implementation Deps.mozilla_browser_state
implementation Deps.mozilla_browser_storage_sync
implementation Deps.mozilla_browser_tabstray
implementation Deps.mozilla_browser_thumbnails
implementation Deps.mozilla_browser_toolbar
implementation FenixDependencies.mozilla_browser_domains
implementation FenixDependencies.mozilla_browser_icons
implementation FenixDependencies.mozilla_browser_menu
implementation FenixDependencies.mozilla_browser_menu2
implementation FenixDependencies.mozilla_browser_session_storage
implementation FenixDependencies.mozilla_browser_state
implementation FenixDependencies.mozilla_browser_storage_sync
implementation FenixDependencies.mozilla_browser_tabstray
implementation FenixDependencies.mozilla_browser_thumbnails
implementation FenixDependencies.mozilla_browser_toolbar
implementation Deps.mozilla_feature_addons
implementation Deps.mozilla_feature_accounts
implementation Deps.mozilla_feature_app_links
implementation Deps.mozilla_feature_autofill
implementation Deps.mozilla_feature_awesomebar
implementation Deps.mozilla_feature_contextmenu
implementation Deps.mozilla_feature_customtabs
implementation Deps.mozilla_feature_downloads
implementation Deps.mozilla_feature_intent
implementation Deps.mozilla_feature_media
implementation Deps.mozilla_feature_prompts
implementation Deps.mozilla_feature_push
implementation Deps.mozilla_feature_privatemode
implementation Deps.mozilla_feature_pwa
implementation Deps.mozilla_feature_qr
implementation Deps.mozilla_feature_search
implementation Deps.mozilla_feature_session
implementation Deps.mozilla_feature_syncedtabs
implementation Deps.mozilla_feature_toolbar
implementation Deps.mozilla_feature_tabs
implementation Deps.mozilla_feature_findinpage
implementation Deps.mozilla_feature_logins
implementation Deps.mozilla_feature_site_permissions
implementation Deps.mozilla_feature_readerview
implementation Deps.mozilla_feature_tab_collections
implementation Deps.mozilla_feature_recentlyclosed
implementation Deps.mozilla_feature_top_sites
implementation Deps.mozilla_feature_share
implementation Deps.mozilla_feature_accounts_push
implementation Deps.mozilla_feature_webauthn
implementation Deps.mozilla_feature_webcompat
implementation Deps.mozilla_feature_webnotifications
implementation Deps.mozilla_feature_webcompat_reporter
implementation FenixDependencies.mozilla_feature_addons
implementation FenixDependencies.mozilla_feature_accounts
implementation FenixDependencies.mozilla_feature_app_links
implementation FenixDependencies.mozilla_feature_autofill
implementation FenixDependencies.mozilla_feature_awesomebar
implementation FenixDependencies.mozilla_feature_contextmenu
implementation FenixDependencies.mozilla_feature_customtabs
implementation FenixDependencies.mozilla_feature_downloads
implementation FenixDependencies.mozilla_feature_intent
implementation FenixDependencies.mozilla_feature_media
implementation FenixDependencies.mozilla_feature_prompts
implementation FenixDependencies.mozilla_feature_push
implementation FenixDependencies.mozilla_feature_privatemode
implementation FenixDependencies.mozilla_feature_pwa
implementation FenixDependencies.mozilla_feature_qr
implementation FenixDependencies.mozilla_feature_search
implementation FenixDependencies.mozilla_feature_session
implementation FenixDependencies.mozilla_feature_syncedtabs
implementation FenixDependencies.mozilla_feature_toolbar
implementation FenixDependencies.mozilla_feature_tabs
implementation FenixDependencies.mozilla_feature_findinpage
implementation FenixDependencies.mozilla_feature_logins
implementation FenixDependencies.mozilla_feature_site_permissions
implementation FenixDependencies.mozilla_feature_readerview
implementation FenixDependencies.mozilla_feature_tab_collections
implementation FenixDependencies.mozilla_feature_recentlyclosed
implementation FenixDependencies.mozilla_feature_top_sites
implementation FenixDependencies.mozilla_feature_share
implementation FenixDependencies.mozilla_feature_accounts_push
implementation FenixDependencies.mozilla_feature_webauthn
implementation FenixDependencies.mozilla_feature_webcompat
implementation FenixDependencies.mozilla_feature_webnotifications
implementation FenixDependencies.mozilla_feature_webcompat_reporter
implementation Deps.mozilla_service_pocket
implementation Deps.mozilla_service_contile
implementation Deps.mozilla_service_digitalassetlinks
implementation Deps.mozilla_service_sync_autofill
implementation Deps.mozilla_service_sync_logins
implementation Deps.mozilla_service_firefox_accounts
implementation(Deps.mozilla_service_glean)
implementation Deps.mozilla_service_location
implementation Deps.mozilla_service_nimbus
implementation FenixDependencies.mozilla_service_pocket
implementation FenixDependencies.mozilla_service_contile
implementation FenixDependencies.mozilla_service_digitalassetlinks
implementation FenixDependencies.mozilla_service_sync_autofill
implementation FenixDependencies.mozilla_service_sync_logins
implementation FenixDependencies.mozilla_service_firefox_accounts
implementation(FenixDependencies.mozilla_service_glean)
implementation FenixDependencies.mozilla_service_location
implementation FenixDependencies.mozilla_service_nimbus
implementation Deps.mozilla_support_extensions
implementation Deps.mozilla_support_base
implementation Deps.mozilla_support_rusterrors
implementation Deps.mozilla_support_images
implementation Deps.mozilla_support_ktx
implementation Deps.mozilla_support_rustlog
implementation Deps.mozilla_support_utils
implementation Deps.mozilla_support_locale
implementation FenixDependencies.mozilla_support_extensions
implementation FenixDependencies.mozilla_support_base
implementation FenixDependencies.mozilla_support_rusterrors
implementation FenixDependencies.mozilla_support_images
implementation FenixDependencies.mozilla_support_ktx
implementation FenixDependencies.mozilla_support_rustlog
implementation FenixDependencies.mozilla_support_utils
implementation FenixDependencies.mozilla_support_locale
implementation Deps.mozilla_ui_colors
implementation Deps.mozilla_ui_icons
implementation Deps.mozilla_lib_publicsuffixlist
implementation Deps.mozilla_ui_widgets
implementation Deps.mozilla_ui_tabcounter
implementation FenixDependencies.mozilla_ui_colors
implementation FenixDependencies.mozilla_ui_icons
implementation FenixDependencies.mozilla_lib_publicsuffixlist
implementation FenixDependencies.mozilla_ui_widgets
implementation FenixDependencies.mozilla_ui_tabcounter
implementation Deps.mozilla_lib_crash
implementation Deps.lib_crash_sentry
implementation Deps.mozilla_lib_push_firebase
implementation Deps.mozilla_lib_state
implementation Deps.mozilla_lib_dataprotect
debugImplementation Deps.leakcanary
implementation FenixDependencies.mozilla_lib_crash
implementation FenixDependencies.lib_crash_sentry
implementation FenixDependencies.mozilla_lib_push_firebase
implementation FenixDependencies.mozilla_lib_state
implementation FenixDependencies.mozilla_lib_dataprotect
debugImplementation FenixDependencies.leakcanary
implementation Deps.androidx_compose_ui
implementation Deps.androidx_compose_ui_tooling
implementation Deps.androidx_compose_foundation
implementation Deps.androidx_compose_material
implementation Deps.androidx_legacy
implementation Deps.androidx_biometric
implementation Deps.androidx_paging
implementation Deps.androidx_preference
implementation Deps.androidx_fragment
implementation Deps.androidx_navigation_fragment
implementation Deps.androidx_navigation_ui
implementation Deps.androidx_recyclerview
implementation Deps.androidx_lifecycle_common
implementation Deps.androidx_lifecycle_livedata
implementation Deps.androidx_lifecycle_process
implementation Deps.androidx_lifecycle_runtime
implementation Deps.androidx_lifecycle_viewmodel
implementation Deps.androidx_core
implementation Deps.androidx_core_ktx
implementation Deps.androidx_transition
implementation Deps.androidx_work_ktx
implementation Deps.androidx_datastore
implementation Deps.protobuf_javalite
implementation Deps.google_material
implementation FenixDependencies.androidx_annotation
implementation FenixDependencies.androidx_compose_ui
implementation FenixDependencies.androidx_compose_ui_tooling
implementation FenixDependencies.androidx_compose_foundation
implementation FenixDependencies.androidx_compose_material
implementation FenixDependencies.androidx_legacy
implementation FenixDependencies.androidx_biometric
implementation FenixDependencies.androidx_paging
implementation FenixDependencies.androidx_preference
implementation FenixDependencies.androidx_fragment
implementation FenixDependencies.androidx_navigation_fragment
implementation FenixDependencies.androidx_navigation_ui
implementation FenixDependencies.androidx_recyclerview
implementation FenixDependencies.androidx_lifecycle_common
implementation FenixDependencies.androidx_lifecycle_livedata
implementation FenixDependencies.androidx_lifecycle_process
implementation FenixDependencies.androidx_lifecycle_runtime
implementation FenixDependencies.androidx_lifecycle_viewmodel
implementation FenixDependencies.androidx_core
implementation FenixDependencies.androidx_core_ktx
implementation FenixDependencies.androidx_transition
implementation FenixDependencies.androidx_work_ktx
implementation FenixDependencies.androidx_datastore
implementation FenixDependencies.protobuf_javalite
implementation FenixDependencies.google_material
implementation Deps.adjust
implementation Deps.installreferrer // Required by Adjust
implementation FenixDependencies.adjust
implementation FenixDependencies.installreferrer // Required by Adjust
implementation Deps.google_ads_id // Required for the Google Advertising ID
implementation FenixDependencies.google_ads_id // Required for the Google Advertising ID
implementation Deps.google_play_store // Required for in-app reviews
// Required for in-app reviews
implementation FenixDependencies.google_play_review
implementation FenixDependencies.google_play_review_ktx
androidTestImplementation Deps.uiautomator
androidTestImplementation FenixDependencies.uiautomator
androidTestImplementation "tools.fastlane:screengrab:2.0.0"
// This Falcon version is added to maven central now required for Screengrab
implementation 'com.jraska:falcon:2.2.0'
androidTestImplementation Deps.androidx_compose_ui_test
androidTestImplementation FenixDependencies.androidx_compose_ui_test
androidTestImplementation Deps.espresso_core, {
androidTestImplementation FenixDependencies.espresso_core, {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation(Deps.espresso_contrib) {
androidTestImplementation(FenixDependencies.espresso_contrib) {
exclude module: 'appcompat-v7'
exclude module: 'support-v4'
exclude module: 'support-annotations'
@ -612,35 +632,36 @@ dependencies {
exclude module: 'protobuf-lite'
}
androidTestImplementation Deps.androidx_test_core
androidTestImplementation Deps.espresso_idling_resources
androidTestImplementation Deps.espresso_intents
androidTestImplementation FenixDependencies.androidx_test_core
androidTestImplementation FenixDependencies.espresso_idling_resources
androidTestImplementation FenixDependencies.espresso_intents
androidTestImplementation Deps.tools_test_runner
androidTestImplementation Deps.tools_test_rules
androidTestUtil Deps.orchestrator
androidTestImplementation Deps.espresso_core, {
androidTestImplementation FenixDependencies.tools_test_runner
androidTestImplementation FenixDependencies.tools_test_rules
androidTestUtil FenixDependencies.orchestrator
androidTestImplementation FenixDependencies.espresso_core, {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation Deps.androidx_junit
androidTestImplementation Deps.androidx_test_extensions
androidTestImplementation Deps.androidx_work_testing
androidTestImplementation Deps.androidx_benchmark_junit4
androidTestImplementation Deps.mockwebserver
testImplementation Deps.mozilla_support_test
testImplementation Deps.mozilla_support_test_libstate
testImplementation Deps.androidx_junit
testImplementation Deps.androidx_test_extensions
testImplementation Deps.androidx_work_testing
testImplementation (Deps.robolectric) {
androidTestImplementation FenixDependencies.androidx_junit
androidTestImplementation FenixDependencies.androidx_test_extensions
androidTestImplementation FenixDependencies.androidx_work_testing
androidTestImplementation FenixDependencies.androidx_benchmark_junit4
androidTestImplementation FenixDependencies.mockwebserver
testImplementation FenixDependencies.mozilla_support_test
testImplementation FenixDependencies.mozilla_support_test_libstate
testImplementation FenixDependencies.androidx_junit
testImplementation FenixDependencies.androidx_test_extensions
testImplementation FenixDependencies.androidx_work_testing
testImplementation (FenixDependencies.robolectric) {
exclude group: 'org.apache.maven'
}
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
implementation Deps.mozilla_support_rusthttp
implementation FenixDependencies.mozilla_support_rusthttp
testImplementation Deps.mockk
androidTestImplementation FenixDependencies.mockk_android
testImplementation FenixDependencies.mockk
// For the initial release of Glean 19, we require consumer applications to
// depend on a separate library for unit tests. This will be removed in future releases.
@ -654,9 +675,9 @@ protobuf {
// See https://github.com/mozilla-mobile/fenix/issues/22321
protoc {
if (osdetector.os == "osx") {
artifact = "${Deps.protobuf_compiler}:osx-x86_64"
artifact = "${FenixDependencies.protobuf_compiler}:osx-x86_64"
} else {
artifact = Deps.protobuf_compiler
artifact = FenixDependencies.protobuf_compiler
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -43,3 +43,22 @@ topsites-impression:
- https://github.com/mozilla-mobile/fenix/pull/23945
notification_emails:
- android-probes@mozilla.com
spoc:
description: |
Contains data identifying with which Pocket sponsored story the user
interacted with and the type of interaction: story impression or click.
include_client_id: false
reasons:
impression: |
A sponsored story had more than 50% of it's content visible
on the screen.
click: |
A sponsored story was clicked by the user.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/27549
- https://mozilla-hub.atlassian.net/browse/FNXV2-21791
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/27550#issuecomment-1295027631
notification_emails:
- android-probes@mozilla.com

View File

@ -0,0 +1,16 @@
<html>
<head>
<meta name="viewport" content="width=device-width">
<title>Address_Form</title>
</head>
<body>
<form>
<p>Street Address: <input id="streetAddress" type="text"></p>
<p>City: <input id="city" type="text"></p>
<p>Zip Code: <input id="zipCode" type="text"></p>
<p>Country: <input id="country" type="text"></p>
<p>Telephone: <input id="telephone" type="text"></p>
<p>Email: <input id="email" type="text"></p>
</form>
</body>
</html>

View File

@ -0,0 +1,13 @@
<html>
<head>
<meta name="viewport" content="width=device-width">
<title>Credit_Card_Form</title>
</head>
<body>
<form>
<p>Card information</p>
<p>Card Number: <input id="cardNumber" type="text" placeholder="1234 1234 1234 1234"></p>
<p>Name on card: <input id="nameOnCard"type="text" placeholder="Name on card"></p>
</form>
</body>
</html>

View File

@ -0,0 +1,8 @@
<html>
<body>
<h2>Cross-site cookies storage access test</h2>
<h3>anti-tracker-test.com</h3>
<h4>different site, cross-origin iframe</h4>
<iframe width=500 height=1000 src="https://mozilla-mobile.github.io/testapp/anti-tracker-test_set_storage_with_sa_api.html"></iframe>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Html_Control_Form</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
</head>
<p>Misc Link Types</p>
<section>
<a href="https://duckduckgo.com/">External link</a>
</section>
<section>
<a href="mailto://example@example.com">Email link</a>
</section>
<section>
<a href="tel://1234567890">Telephone link</a>
</section>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<title>Html_Control_Form</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
</head>
<p>Calendar Form</p>
<section>
<input type="date" id="calendar">
<button onclick="printDate()" id="submitDate"> Submit date </button>
<div id="displayDate"></div>
</section>
<p>Clock Form</p>
<section>
<input type="time" id="clock">
<button onclick="printTime()" id="submitTime"> Submit time </button>
<div id="displayTime"></div>
</section>
<p>Color Form</p>
<section>
<input type="color" id="colorPicker">
<button onclick="printColor()" id="submitColor"> Submit color </button>
<div id="displayColor"></div>
</section>
<p>Drop-down Form</p>
<select id="dropDown">
<option type="text" text="The Only Ones">The Only Ones</option>
<option type="text" text="The National">The National</option>
</select>
<button onclick="printOption()" id="submitOption"> Submit drop down option </button>
<div id="displayOption"></div>
<script>
function printOption() {
let dropDown = document.querySelector("#dropDown");
let displayOption = document.querySelector("#displayOption");
displayOption.innerHTML = "Selected option is: " + dropDown.value;
}
</script>
<script>
function printDate() {
let calendar = document.querySelector("#calendar");
let displayDate = document.querySelector("#displayDate");
displayDate.innerHTML = "Selected date is: " + calendar.value;
}
</script>
<script>
function printTime() {
let time = document.querySelector("#clock");
let displayTime = document.querySelector("#displayTime");
displayTime.innerHTML = "Selected time is: " + time.value;
}
</script>
<script>
function printColor() {
let colorPicker = document.querySelector("#colorPicker");
let displayColor = document.querySelector("#displayColor");
displayColor.innerHTML = "Selected color is: " + colorPicker.value;
}
</script>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width">
<body>
<h1>Storage check</h1>
<script type="text/javascript">
if (sessionStorage.getItem('sessionTest') == 'session storage') {
document.write('<p>Session storage has value</p>');
} else {
document.write('<p>Session storage empty</p>');
}
if (localStorage.getItem('localTest') == 'local storage') {
document.write('<p>Local storage has value</p>');
} else {
document.write('<p>Local storage empty</p>');
}
</script>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width">
<body>
<h1>Storage Write</h1>
<p id="cookies"></p>
<button id="setCookies">Set cookies</button>
<script type="text/javascript">
(function() {
document.getElementById("cookies").textContent = document.cookie?document.cookie:"No cookies set";
})();
document.getElementById("setCookies").addEventListener("click", function() {
document.cookie = "user=android";
document.getElementById("cookies").textContent = document.cookie;
});
sessionStorage.setItem('sessionTest', 'session storage');
localStorage.setItem('localTest', 'local storage');
document.write('<p>Values written to storage</p>');
</script>
</body>
</html>

View File

@ -13,31 +13,31 @@
<h3>Level 1 (Basic) List</h3>
<p>social-track-digest256:</p>
<img
src="https://social-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
src="https://social-track-digest256.dummytracker.org/test_not_blocked.png" alt="social not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='social blocked'">
<br/>
<p>ads-track-digest256:</p>
<img
src="https://ads-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='ads blocked'">
<br/>
<p>analytics-track-digest256:</p>
<img
src="https://analytics-track-digest256.dummytracker.org/test_not_blocked.png"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png'">
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='analytics blocked'">
<br/>
<p>Fingerprinting:
<pre id="result">test not run</pre>
<script src="https://base-fingerprinting-track-digest256.dummytracker.org/tracker.js"
onerror="this.onerror=null;var result=document.getElementById('result');result.innerHTML='blocked';"
onload="this.onload=null;var result=document.getElementById('result');result.innerHTML='NOT blocked';"
onerror="this.onerror=null;var result=document.getElementById('result');result.innerHTML='Fingerprinting blocked';"
onload="this.onload=null;var result=document.getElementById('result');result.innerHTML='Fingerprinting NOT blocked';"
></script>
</p>
<br/>
<p>Cryptomining:
<img
src="https://base-cryptomining-track-digest256.dummytracker.org/test_not_blocked.png" alt="not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='blocked'">
src="https://base-cryptomining-track-digest256.dummytracker.org/test_not_blocked.png" alt="Cryptomining not blocked"
onerror="this.onerror=null;this.src='https://not-a-tracker.dummytracker.org/test_blocked.png';this.alt='Cryptomining blocked'">
</p>
<p><b>Cookie blocking</b>

View File

@ -39,9 +39,8 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
isSameDomain: Boolean,
isRedirect: Boolean,
isDirectNavigation: Boolean,
isSubframeRequest: Boolean
isSubframeRequest: Boolean,
): RequestInterceptor.InterceptionResponse? {
interceptFxaRequest(
engineSession,
uri,
@ -50,7 +49,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
isSameDomain,
isRedirect,
isDirectNavigation,
isSubframeRequest
isSubframeRequest,
)?.let { response ->
return response
}
@ -68,14 +67,14 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
isSameDomain,
isRedirect,
isDirectNavigation,
isSubframeRequest
isSubframeRequest,
)
}
override fun onErrorRequest(
session: EngineSession,
errorType: ErrorType,
uri: String?
uri: String?,
): RequestInterceptor.ErrorResponse? {
val improvedErrorType = improveErrorType(errorType)
val riskLevel = getRiskLevel(improvedErrorType)
@ -86,7 +85,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
context = context,
errorType = improvedErrorType,
uri = uri,
htmlResource = riskLevel.htmlRes
htmlResource = riskLevel.htmlRes,
)
return RequestInterceptor.ErrorResponse(errorPageUri)
@ -102,20 +101,18 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
private fun interceptAmoRequest(
uri: String,
isSameDomain: Boolean,
hasUserGesture: Boolean
hasUserGesture: Boolean,
): RequestInterceptor.InterceptionResponse? {
// First we execute a quick check to see if this is a request we're interested in i.e. a
// request triggered by the user and coming from AMO.
if (hasUserGesture && isSameDomain && uri.startsWith(AMO_BASE_URL)) {
// Check if this is a request to install an add-on.
val matchResult = AMO_INSTALL_URL_REGEX.toRegex().matchEntire(uri)
if (matchResult != null) {
// Navigate and trigger add-on installation.
matchResult.groupValues.getOrNull(1)?.let { addonId ->
navController?.get()?.navigate(
NavGraphDirections.actionGlobalAddonsManagementFragment(addonId)
NavGraphDirections.actionGlobalAddonsManagementFragment(addonId),
)
// We've redirected to the add-ons management fragment, skip original request.
@ -137,7 +134,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
isSameDomain: Boolean,
isRedirect: Boolean,
isDirectNavigation: Boolean,
isSubframeRequest: Boolean
isSubframeRequest: Boolean,
): RequestInterceptor.InterceptionResponse? {
return appContext.components.services.accountsAuthFeature.interceptor.onLoadRequest(
engineSession,
@ -147,7 +144,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
isSameDomain,
isRedirect,
isDirectNavigation,
isSubframeRequest
isSubframeRequest,
)
}
@ -189,16 +186,19 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
ErrorType.ERROR_NO_INTERNET,
ErrorType.ERROR_HTTPS_ONLY,
ErrorType.ERROR_BAD_HSTS_CERT,
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
ErrorType.ERROR_UNKNOWN_PROTOCOL,
-> RiskLevel.Low
ErrorType.ERROR_SECURITY_BAD_CERT,
ErrorType.ERROR_SECURITY_SSL,
ErrorType.ERROR_PORT_BLOCKED -> RiskLevel.Medium
ErrorType.ERROR_PORT_BLOCKED,
-> RiskLevel.Medium
ErrorType.ERROR_SAFEBROWSING_HARMFUL_URI,
ErrorType.ERROR_SAFEBROWSING_MALWARE_URI,
ErrorType.ERROR_SAFEBROWSING_PHISHING_URI,
ErrorType.ERROR_SAFEBROWSING_UNWANTED_URI -> RiskLevel.High
ErrorType.ERROR_SAFEBROWSING_UNWANTED_URI,
-> RiskLevel.High
}
internal enum class RiskLevel(val htmlRes: String) {

View File

@ -5,8 +5,8 @@
package org.mozilla.fenix.components
import android.content.Context
import mozilla.components.service.fxa.ServerConfig.Server
import mozilla.components.service.fxa.ServerConfig
import mozilla.components.service.fxa.ServerConfig.Server
/**
* Utility to configure Firefox Account stage servers.

View File

@ -24,10 +24,11 @@ import mozilla.components.service.glean.net.ConceptFetchHttpUploader
import mozilla.components.service.glean.testing.GleanTestLocalServer
import okhttp3.mockwebserver.RecordedRequest
import org.json.JSONObject
import org.junit.Assert.assertTrue
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@ -36,9 +37,9 @@ import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.MockWebServerHelper
import java.util.concurrent.TimeUnit
import java.io.BufferedReader
import java.io.ByteArrayInputStream
import java.util.concurrent.TimeUnit
import java.util.zip.GZIPInputStream
/**
@ -91,7 +92,7 @@ class BaselinePingTest {
val httpClient = ConceptFetchHttpUploader(
lazy {
GeckoViewFetchClient(ApplicationProvider.getApplicationContext())
}
},
)
// Fenix does not initialize the Glean SDK in tests/debug builds, but this test
@ -102,7 +103,7 @@ class BaselinePingTest {
applicationContext = ApplicationProvider.getApplicationContext(),
uploadEnabled = true,
configuration = Configuration(httpClient = httpClient),
buildInfo = GleanBuildInfo.buildInfo
buildInfo = GleanBuildInfo.buildInfo,
)
}
}
@ -119,7 +120,7 @@ class BaselinePingTest {
private fun waitForPingContent(
pingName: String,
pingReason: String?,
maxAttempts: Int = 3
maxAttempts: Int = 3,
): JSONObject? {
var attempts = 0
do {
@ -143,6 +144,7 @@ class BaselinePingTest {
return null
}
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807288")
@Test
fun validateBaselinePing() {
// Wait for the app to be idle/ready.
@ -163,8 +165,8 @@ class BaselinePingTest {
mDevice.pressRecentApps()
mDevice.findObject(
UiSelector().descriptionContains(
ApplicationProvider.getApplicationContext<Context>().getString(R.string.app_name)
)
ApplicationProvider.getApplicationContext<Context>().getString(R.string.app_name),
),
)
.click()

View File

@ -5,11 +5,6 @@
package org.mozilla.fenix.helpers
import android.graphics.Bitmap
/* 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/. */
import android.graphics.Color
import org.junit.Assert.assertEquals

View File

@ -4,6 +4,8 @@
package org.mozilla.fenix.helpers
import org.mozilla.fenix.helpers.TestHelper.getSponsoredShortcutTitle
object Constants {
// Device or AVD requires a Google Services Android OS installation
@ -18,7 +20,28 @@ object Constants {
}
const val SPEECH_RECOGNITION = "android.speech.action.RECOGNIZE_SPEECH"
const val POCKET_RECOMMENDED_STORIES_UTM_PARAM = "utm_source=pocket-newtab-android"
const val LONG_CLICK_DURATION: Long = 5000
const val LISTS_MAXSWIPES: Int = 3
const val RETRY_COUNT = 3
val searchEngineCodes = mapOf(
"Google" to "client=firefox-b-m",
"Bing" to "firefox&pc=MOZB&form=MOZMBA",
"DuckDuckGo" to "t=fpas",
)
val firstSponsoredShortcutTitle by lazy { getSponsoredShortcutTitle(2) }
val secondSponsoredShortcutTitle by lazy { getSponsoredShortcutTitle(3) }
// Expected for en-us defaults
val defaultTopSitesList by lazy {
mapOf(
"Google" to "Google",
"First sponsored shortcut" to firstSponsoredShortcutTitle,
"Second sponsored shortcut" to secondSponsoredShortcutTitle,
"Top Articles" to "Top Articles",
"Wikipedia" to "Wikipedia",
)
}
}

View File

@ -0,0 +1,19 @@
/* 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.helpers
import org.mozilla.experiments.nimbus.GleanPlumbMessageHelper
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.TestHelper.appContext
object Experimentation {
val experiments =
appContext.components.analytics.experiments
fun withHelper(block: GleanPlumbMessageHelper.() -> Unit) {
val helper = experiments.createMessageHelper()
block(helper)
}
}

View File

@ -4,57 +4,84 @@
package org.mozilla.fenix.helpers
import android.content.Context
import androidx.test.platform.app.InstrumentationRegistry
import org.mozilla.fenix.ext.settings
class FeatureSettingsHelper {
private val context: Context = InstrumentationRegistry.getInstrumentation().targetContext
private val settings = context.settings()
/**
* Helper for querying the status and modifying various features and settings in the application.
*/
interface FeatureSettingsHelper {
/**
* Whether the onboarding for existing users should be shown or not.
* It should appear only once on the first visit to homescreen.
*/
var isHomeOnboardingDialogEnabled: Boolean
// saving default values of feature flags
private var isPocketEnabled: Boolean = settings.showPocketRecommendationsFeature
private var isJumpBackInCFREnabled: Boolean = settings.shouldShowJumpBackInCFR
private var isRecentTabsFeatureEnabled: Boolean = settings.showRecentTabsFeature
private var isRecentlyVisitedFeatureEnabled: Boolean = settings.historyMetadataUIFeature
private var isUserKnowsAboutPwasTrue: Boolean = settings.userKnowsAboutPwas
/**
* Whether the Pocket stories feature is enabled or not.
*/
var isPocketEnabled: Boolean
fun setPocketEnabled(enabled: Boolean) {
settings.showPocketRecommendationsFeature = enabled
}
/**
* Whether the "Jump back in" CFR should be shown or not.
* It should appear on the first visit to homescreen given that there is a tab opened.
*/
var isJumpBackInCFREnabled: Boolean
fun setJumpBackCFREnabled(enabled: Boolean) {
settings.shouldShowJumpBackInCFR = enabled
}
/**
* Whether the onboarding dialog for choosing wallpapers should be shown or not.
*/
var isWallpaperOnboardingEnabled: Boolean
fun setRecentTabsFeatureEnabled(enabled: Boolean) {
settings.showRecentTabsFeature = enabled
}
/**
* Whether the "Jump back in" homescreen section is enabled or not.
* It shows the last visited tab on this device and on other synced devices.
*/
var isRecentTabsFeatureEnabled: Boolean
fun setRecentlyVisitedFeatureEnabled(enabled: Boolean) {
settings.historyMetadataUIFeature = enabled
}
/**
* Whether the "Recently visited" homescreen section is enabled or not.
* It can show up to 9 history highlights and history groups.
*/
var isRecentlyVisitedFeatureEnabled: Boolean
fun setStrictETPEnabled() {
settings.setStrictETP()
}
/**
* Whether the onboarding dialog for PWAs should be shown or not.
* It can show the first time a website that can be installed as a PWA is accessed.
*/
var isPWAsPromptEnabled: Boolean
fun disablePwaCFR(disable: Boolean) {
settings.userKnowsAboutPwas = disable
}
/**
* Whether the "Site permissions" option is checked in the "Delete browsing data" screen or not.
*/
var isDeleteSitePermissionsEnabled: Boolean
fun deleteSitePermissions(delete: Boolean) {
settings.deleteSitePermissions = delete
}
/**
* Enable or disable showing the TCP CFR when accessing a webpage for the first time.
*/
var isTCPCFREnabled: Boolean
// Important:
// Use this after each test if you have modified these feature settings
// to make sure the app goes back to the default state
fun resetAllFeatureFlags() {
settings.showPocketRecommendationsFeature = isPocketEnabled
settings.shouldShowJumpBackInCFR = isJumpBackInCFREnabled
settings.showRecentTabsFeature = isRecentTabsFeatureEnabled
settings.historyMetadataUIFeature = isRecentlyVisitedFeatureEnabled
settings.userKnowsAboutPwas = isUserKnowsAboutPwasTrue
/**
* The current "Enhanced Tracking Protection" policy.
* @see ETPPolicy
*/
var etpPolicy: ETPPolicy
fun applyFlagUpdates()
fun resetAllFeatureFlags()
companion object {
val settings = InstrumentationRegistry.getInstrumentation().targetContext.settings()
}
}
/**
* All "Enhanced Tracking Protection" modes.
*/
enum class ETPPolicy {
STANDARD,
STRICT,
CUSTOM,
;
}

View File

@ -0,0 +1,159 @@
/* 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.helpers
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.helpers.ETPPolicy.CUSTOM
import org.mozilla.fenix.helpers.ETPPolicy.STANDARD
import org.mozilla.fenix.helpers.ETPPolicy.STRICT
import org.mozilla.fenix.helpers.FeatureSettingsHelper.Companion.settings
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.onboarding.FenixOnboarding
import org.mozilla.fenix.utils.Settings
/**
* Helper for querying the status and modifying various features and settings in the application.
*/
class FeatureSettingsHelperDelegate : FeatureSettingsHelper {
/**
* The current feature flags used inside the app before the tests start.
* These will be restored when the tests end.
*/
private val initialFeatureFlags = FeatureFlags(
isHomeOnboardingDialogEnabled = settings.showHomeOnboardingDialog,
homeOnboardingDialogVersion = getHomeOnboardingVersion(),
isPocketEnabled = settings.showPocketRecommendationsFeature,
isJumpBackInCFREnabled = settings.shouldShowJumpBackInCFR,
isRecentTabsFeatureEnabled = settings.showRecentTabsFeature,
isRecentlyVisitedFeatureEnabled = settings.historyMetadataUIFeature,
isPWAsPromptEnabled = !settings.userKnowsAboutPwas,
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR,
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding,
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions,
etpPolicy = getETPPolicy(settings),
)
/**
* The current feature flags updated in tests.
*/
private var updatedFeatureFlags = initialFeatureFlags.copy()
override var isHomeOnboardingDialogEnabled: Boolean
get() = updatedFeatureFlags.isHomeOnboardingDialogEnabled &&
FenixOnboarding(appContext).userHasBeenOnboarded()
set(value) {
updatedFeatureFlags.isHomeOnboardingDialogEnabled = value
updatedFeatureFlags.homeOnboardingDialogVersion = when (value) {
true -> FenixOnboarding.CURRENT_ONBOARDING_VERSION
false -> 0
}
}
override var isPocketEnabled: Boolean by updatedFeatureFlags::isPocketEnabled
override var isJumpBackInCFREnabled: Boolean by updatedFeatureFlags::isJumpBackInCFREnabled
override var isWallpaperOnboardingEnabled: Boolean by updatedFeatureFlags::isWallpaperOnboardingEnabled
override var isRecentTabsFeatureEnabled: Boolean by updatedFeatureFlags::isRecentTabsFeatureEnabled
override var isRecentlyVisitedFeatureEnabled: Boolean by updatedFeatureFlags::isRecentlyVisitedFeatureEnabled
override var isPWAsPromptEnabled: Boolean by updatedFeatureFlags::isPWAsPromptEnabled
override var isTCPCFREnabled: Boolean by updatedFeatureFlags::isTCPCFREnabled
override var etpPolicy: ETPPolicy by updatedFeatureFlags::etpPolicy
override fun applyFlagUpdates() {
applyFeatureFlags(updatedFeatureFlags)
}
override fun resetAllFeatureFlags() {
applyFeatureFlags(initialFeatureFlags)
}
override var isDeleteSitePermissionsEnabled: Boolean by updatedFeatureFlags::isDeleteSitePermissionsEnabled
private fun applyFeatureFlags(featureFlags: FeatureFlags) {
settings.showHomeOnboardingDialog = featureFlags.isHomeOnboardingDialogEnabled
setHomeOnboardingVersion(featureFlags.homeOnboardingDialogVersion)
settings.showPocketRecommendationsFeature = featureFlags.isPocketEnabled
settings.shouldShowJumpBackInCFR = featureFlags.isJumpBackInCFREnabled
settings.showRecentTabsFeature = featureFlags.isRecentTabsFeatureEnabled
settings.historyMetadataUIFeature = featureFlags.isRecentlyVisitedFeatureEnabled
settings.userKnowsAboutPwas = !featureFlags.isPWAsPromptEnabled
settings.shouldShowTotalCookieProtectionCFR = featureFlags.isTCPCFREnabled
settings.showWallpaperOnboarding = featureFlags.isWallpaperOnboardingEnabled
settings.deleteSitePermissions = featureFlags.isDeleteSitePermissionsEnabled
setETPPolicy(featureFlags.etpPolicy)
}
}
private data class FeatureFlags(
var isHomeOnboardingDialogEnabled: Boolean,
var homeOnboardingDialogVersion: Int,
var isPocketEnabled: Boolean,
var isJumpBackInCFREnabled: Boolean,
var isRecentTabsFeatureEnabled: Boolean,
var isRecentlyVisitedFeatureEnabled: Boolean,
var isPWAsPromptEnabled: Boolean,
var isTCPCFREnabled: Boolean,
var isWallpaperOnboardingEnabled: Boolean,
var isDeleteSitePermissionsEnabled: Boolean,
var etpPolicy: ETPPolicy,
)
internal fun getETPPolicy(settings: Settings): ETPPolicy {
return when {
settings.useStrictTrackingProtection -> STRICT
settings.useCustomTrackingProtection -> CUSTOM
else -> STANDARD
}
}
private fun setETPPolicy(policy: ETPPolicy) {
when (policy) {
STRICT -> settings.setStrictETP()
// The following two cases update ETP in the same way "setStrictETP" does.
STANDARD -> {
settings.preferences.edit()
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
false,
)
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_option),
false,
)
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_standard_option),
true,
)
.commit()
}
CUSTOM -> {
settings.preferences.edit()
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
false,
)
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_standard_option),
true,
)
.putBoolean(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_option),
true,
)
.commit()
}
}
}
private fun getHomeOnboardingVersion(): Int {
return FenixOnboarding(appContext)
.preferences
.getInt(FenixOnboarding.LAST_VERSION_ONBOARDING_KEY, 0)
}
private fun setHomeOnboardingVersion(version: Int) {
FenixOnboarding(appContext)
.preferences.edit()
.putInt(FenixOnboarding.LAST_VERSION_ONBOARDING_KEY, version)
.commit()
}

View File

@ -6,11 +6,13 @@
package org.mozilla.fenix.helpers
import android.content.Intent
import android.view.ViewConfiguration.getLongPressTimeout
import androidx.test.espresso.intent.rule.IntentsTestRule
import androidx.test.rule.ActivityTestRule
import androidx.test.uiautomator.UiSelector
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.helpers.FeatureSettingsHelper.Companion.settings
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.onboarding.FenixOnboarding
@ -25,22 +27,92 @@ import org.mozilla.fenix.onboarding.FenixOnboarding
class HomeActivityTestRule(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
private val skipOnboarding: Boolean = false
) :
ActivityTestRule<HomeActivity>(HomeActivity::class.java, initialTouchMode, launchActivity) {
private val skipOnboarding: Boolean = false,
) : ActivityTestRule<HomeActivity>(HomeActivity::class.java, initialTouchMode, launchActivity),
FeatureSettingsHelper by FeatureSettingsHelperDelegate() {
// Using a secondary constructor allows us to easily delegate the settings to FeatureSettingsHelperDelegate.
// Otherwise if wanting to use the same names we would have to override these settings in the primary
// constructor and in that elide the FeatureSettingsHelperDelegate.
constructor(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
skipOnboarding: Boolean = false,
isHomeOnboardingDialogEnabled: Boolean = settings.showHomeOnboardingDialog &&
FenixOnboarding(appContext).userHasBeenOnboarded(),
isPocketEnabled: Boolean = settings.showPocketRecommendationsFeature,
isJumpBackInCFREnabled: Boolean = settings.shouldShowJumpBackInCFR,
isRecentTabsFeatureEnabled: Boolean = settings.showRecentTabsFeature,
isRecentlyVisitedFeatureEnabled: Boolean = settings.historyMetadataUIFeature,
isPWAsPromptEnabled: Boolean = !settings.userKnowsAboutPwas,
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
etpPolicy: ETPPolicy = getETPPolicy(settings),
) : this(initialTouchMode, launchActivity, skipOnboarding) {
this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled
this.isPocketEnabled = isPocketEnabled
this.isJumpBackInCFREnabled = isJumpBackInCFREnabled
this.isRecentTabsFeatureEnabled = isRecentTabsFeatureEnabled
this.isRecentlyVisitedFeatureEnabled = isRecentlyVisitedFeatureEnabled
this.isPWAsPromptEnabled = isPWAsPromptEnabled
this.isTCPCFREnabled = isTCPCFREnabled
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
this.etpPolicy = etpPolicy
}
/**
* Update settings after the activity was created.
*/
fun applySettingsExceptions(settings: (FeatureSettingsHelper) -> Unit) {
FeatureSettingsHelperDelegate().also {
settings(it)
applyFlagUpdates()
}
}
private val longTapUserPreference = getLongPressTimeout()
override fun beforeActivityLaunched() {
super.beforeActivityLaunched()
setLongTapTimeout(3000)
applyFlagUpdates()
if (skipOnboarding) { skipOnboardingBeforeLaunch() }
}
override fun afterActivityFinished() {
super.afterActivityFinished()
setLongTapTimeout(longTapUserPreference)
resetAllFeatureFlags()
closeNotificationShade()
}
companion object {
/**
* Create a new instance of [HomeActivityTestRule] which by default will disable specific
* app features that would otherwise negatively impact most tests.
*
* The disabled features are:
* - the Jump back in CFR,
* - the Total Cookie Protection CFR,
* - the PWA prompt dialog,
* - the wallpaper onboarding.
*/
fun withDefaultSettingsOverrides(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
skipOnboarding: Boolean = false,
) = HomeActivityTestRule(
initialTouchMode = initialTouchMode,
launchActivity = launchActivity,
skipOnboarding = skipOnboarding,
isJumpBackInCFREnabled = false,
isPWAsPromptEnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
)
}
}
/**
@ -51,17 +123,74 @@ class HomeActivityTestRule(
* @param launchActivity See [IntentsTestRule]
*/
class HomeActivityIntentTestRule(
class HomeActivityIntentTestRule internal constructor(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
private val skipOnboarding: Boolean = false
) :
IntentsTestRule<HomeActivity>(HomeActivity::class.java, initialTouchMode, launchActivity) {
private val skipOnboarding: Boolean = false,
) : IntentsTestRule<HomeActivity>(HomeActivity::class.java, initialTouchMode, launchActivity),
FeatureSettingsHelper by FeatureSettingsHelperDelegate() {
// Using a secondary constructor allows us to easily delegate the settings to FeatureSettingsHelperDelegate.
// Otherwise if wanting to use the same names we would have to override these settings in the primary
// constructor and in that elide the FeatureSettingsHelperDelegate.
constructor(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
skipOnboarding: Boolean = false,
isHomeOnboardingDialogEnabled: Boolean = settings.showHomeOnboardingDialog &&
FenixOnboarding(appContext).userHasBeenOnboarded(),
isPocketEnabled: Boolean = settings.showPocketRecommendationsFeature,
isJumpBackInCFREnabled: Boolean = settings.shouldShowJumpBackInCFR,
isRecentTabsFeatureEnabled: Boolean = settings.showRecentTabsFeature,
isRecentlyVisitedFeatureEnabled: Boolean = settings.historyMetadataUIFeature,
isPWAsPromptEnabled: Boolean = !settings.userKnowsAboutPwas,
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
etpPolicy: ETPPolicy = getETPPolicy(settings),
) : this(initialTouchMode, launchActivity, skipOnboarding) {
this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled
this.isPocketEnabled = isPocketEnabled
this.isJumpBackInCFREnabled = isJumpBackInCFREnabled
this.isRecentTabsFeatureEnabled = isRecentTabsFeatureEnabled
this.isRecentlyVisitedFeatureEnabled = isRecentlyVisitedFeatureEnabled
this.isPWAsPromptEnabled = isPWAsPromptEnabled
this.isTCPCFREnabled = isTCPCFREnabled
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
this.etpPolicy = etpPolicy
}
private val longTapUserPreference = getLongPressTimeout()
private lateinit var intent: Intent
/**
* Update settings after the activity was created.
*/
fun applySettingsExceptions(settings: (FeatureSettingsHelper) -> Unit) {
FeatureSettingsHelperDelegate().apply {
settings(this)
applyFlagUpdates()
}
}
override fun getActivityIntent(): Intent? {
return if (this::intent.isInitialized) {
this.intent
} else {
super.getActivityIntent()
}
}
fun withIntent(intent: Intent): HomeActivityIntentTestRule {
this.intent = intent
return this
}
override fun beforeActivityLaunched() {
super.beforeActivityLaunched()
setLongTapTimeout(3000)
applyFlagUpdates()
if (skipOnboarding) { skipOnboardingBeforeLaunch() }
}
@ -69,6 +198,53 @@ class HomeActivityIntentTestRule(
super.afterActivityFinished()
setLongTapTimeout(longTapUserPreference)
closeNotificationShade()
resetAllFeatureFlags()
}
/**
* Update the settings values from when this rule was first instantiated to account for any changes
* done while running the tests.
* Useful in the scenario about the activity being restarted which would otherwise set the initial
* settings and override any changes made in the meantime.
*/
fun updateCachedSettings() {
isHomeOnboardingDialogEnabled =
settings.showHomeOnboardingDialog && FenixOnboarding(appContext).userHasBeenOnboarded()
isPocketEnabled = settings.showPocketRecommendationsFeature
isJumpBackInCFREnabled = settings.shouldShowJumpBackInCFR
isRecentTabsFeatureEnabled = settings.showRecentTabsFeature
isRecentlyVisitedFeatureEnabled = settings.historyMetadataUIFeature
isPWAsPromptEnabled = !settings.userKnowsAboutPwas
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions
etpPolicy = getETPPolicy(settings)
}
companion object {
/**
* Create a new instance of [HomeActivityIntentTestRule] which by default will disable specific
* app features that would otherwise negatively impact most tests.
*
* The disabled features are:
* - the Jump back in CFR,
* - the Total Cookie Protection CFR,
* - the PWA prompt dialog,
* - the wallpaper onboarding.
*/
fun withDefaultSettingsOverrides(
initialTouchMode: Boolean = false,
launchActivity: Boolean = true,
skipOnboarding: Boolean = false,
) = HomeActivityIntentTestRule(
initialTouchMode = initialTouchMode,
launchActivity = launchActivity,
skipOnboarding = skipOnboarding,
isJumpBackInCFREnabled = false,
isPWAsPromptEnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
)
}
}
@ -94,7 +270,7 @@ private fun skipOnboardingBeforeLaunch() {
private fun closeNotificationShade() {
if (mDevice.findObject(
UiSelector().resourceId("com.android.systemui:id/notification_stack_scroller")
UiSelector().resourceId("com.android.systemui:id/notification_stack_scroller"),
).exists()
) {
mDevice.pressHome()

View File

@ -17,16 +17,16 @@ object IdlingResourceHelper {
fun registerAddonInstallingIdlingResource(activityTestRule: ActivityTestRule<HomeActivity>) {
IdlingRegistry.getInstance().register(
AddonsInstallingIdlingResource(
activityTestRule.activity.supportFragmentManager
)
activityTestRule.activity.supportFragmentManager,
),
)
}
fun unregisterAddonInstallingIdlingResource(activityTestRule: ActivityTestRule<HomeActivity>) {
IdlingRegistry.getInstance().unregister(
AddonsInstallingIdlingResource(
activityTestRule.activity.supportFragmentManager
)
activityTestRule.activity.supportFragmentManager,
),
)
}

View File

@ -0,0 +1,85 @@
/* 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.helpers
import androidx.test.uiautomator.UiObject
import androidx.test.uiautomator.UiSelector
import org.junit.Assert.assertTrue
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestHelper.mDevice
/**
* Helper for querying and interacting with items based on their matchers.
*/
object MatcherHelper {
fun itemWithResId(resourceId: String) =
mDevice.findObject(UiSelector().resourceId(resourceId))
fun itemContainingText(itemText: String) =
mDevice.findObject(UiSelector().textContains(itemText))
fun itemWithDescription(description: String) =
mDevice.findObject(UiSelector().descriptionContains(description))
fun checkedItemWithResId(resourceId: String, isChecked: Boolean) =
mDevice.findObject(UiSelector().resourceId(resourceId).checked(isChecked))
fun checkedItemWithResIdAndText(resourceId: String, text: String, isChecked: Boolean) =
mDevice.findObject(
UiSelector()
.resourceId(resourceId)
.textContains(text)
.checked(isChecked),
)
fun itemWithResIdAndDescription(resourceId: String, description: String) =
mDevice.findObject(UiSelector().resourceId(resourceId).descriptionContains(description))
fun itemWithResIdAndText(resourceId: String, text: String) =
mDevice.findObject(UiSelector().resourceId(resourceId).text(text))
fun assertItemWithResIdExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertItemContainingTextExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertItemWithDescriptionExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertCheckedItemWithResIdExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertCheckedItemWithResIdAndTextExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertItemWithResIdAndDescriptionExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
fun assertItemWithResIdAndTextExists(vararg appItems: UiObject) {
for (appItem in appItems) {
assertTrue(appItem.waitForExists(waitingTime))
}
}
}

View File

@ -44,7 +44,7 @@ fun withBitmapDrawable(bitmap: Bitmap, name: String): Matcher<View>? = BitmapDra
fun nthChildOf(
parentMatcher: Matcher<View>,
childPosition: Int
childPosition: Int,
): Matcher<View> {
return object : TypeSafeMatcher<View>() {
override fun describeTo(description: Description) {

View File

@ -0,0 +1,111 @@
/* 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.helpers
import android.content.Context
import android.location.Location
import android.location.LocationManager
import android.os.Build
import android.os.SystemClock
import android.util.Log
import androidx.test.core.app.ApplicationProvider
import org.junit.rules.ExternalResource
import org.mozilla.fenix.helpers.TestHelper.mDevice
import java.util.Date
import kotlin.random.Random
private const val mockProviderName = LocationManager.GPS_PROVIDER
/**
* Rule that sets up a mock location provider that can inject location samples
* straight to the device that the test is running on.
*
* Credit to the mapbox team
* https://github.com/mapbox/mapbox-navigation-android/blob/87fab7ea1152b29533ee121eaf6c05bc202adf02/libtesting-ui/src/main/java/com/mapbox/navigation/testing/ui/MockLocationUpdatesRule.kt
*
*/
class MockLocationUpdatesRule : ExternalResource() {
private val appContext = (ApplicationProvider.getApplicationContext() as Context)
val latitude = Random.nextDouble(-90.0, 90.0)
val longitude = Random.nextDouble(-180.0, 180.0)
private val locationManager: LocationManager by lazy {
(appContext.getSystemService(Context.LOCATION_SERVICE) as LocationManager)
}
override fun before() {
/* ADB command to enable the mock location setting on the device.
* Will not be turned back off due to limitations on knowing its initial state.
*/
mDevice.executeShellCommand(
"appops set " +
appContext.packageName +
" android:mock_location allow",
)
// To mock locations we need a location provider, so we generate and set it here.
try {
locationManager.addTestProvider(
mockProviderName,
false,
false,
false,
false,
true,
true,
true,
3,
2,
)
} catch (ex: Exception) {
// unstable
Log.w("MockLocationUpdatesRule", "addTestProvider failed")
}
locationManager.setTestProviderEnabled(mockProviderName, true)
}
// Cleaning up the location provider after the test.
override fun after() {
locationManager.setTestProviderEnabled(mockProviderName, false)
locationManager.removeTestProvider(mockProviderName)
}
/**
* Generate a valid mock location data and set with the help of a test provider.
*
* @param modifyLocation optional callback for modifying the constructed location before setting it.
*/
fun setMockLocation(modifyLocation: (Location.() -> Unit)? = null) {
check(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
"MockLocationUpdatesRule is supported only on Android devices " +
"running version >= Build.VERSION_CODES.M"
}
val location = Location(mockProviderName)
location.time = Date().time
location.elapsedRealtimeNanos = SystemClock.elapsedRealtimeNanos()
location.accuracy = 5f
location.altitude = 0.0
location.bearing = 0f
location.speed = 5f
location.latitude = latitude
location.longitude = longitude
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
location.verticalAccuracyMeters = 5f
location.bearingAccuracyDegrees = 5f
location.speedAccuracyMetersPerSecond = 5f
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
location.elapsedRealtimeUncertaintyNanos = 0.0
}
modifyLocation?.let {
location.apply(it)
}
locationManager.setTestProviderLocation(mockProviderName, location)
}
}

View File

@ -8,12 +8,23 @@ import androidx.test.espresso.IdlingResourceTimeoutException
import androidx.test.espresso.NoMatchingViewException
import androidx.test.uiautomator.UiObjectNotFoundException
import junit.framework.AssertionFailedError
import kotlinx.coroutines.runBlocking
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
import org.mozilla.fenix.components.PermissionStorage
import org.mozilla.fenix.helpers.IdlingResourceHelper.unregisterAllIdlingResources
import org.mozilla.fenix.helpers.TestHelper.appContext
/**
* Rule to retry flaky tests for a given number of times, catching some of the more common exceptions.
* The Rule doesn't clear the app state in between retries, so we are doing some cleanup here.
* The @Before and @After methods are not called between retries.
*
*/
class RetryTestRule(private val retryCount: Int = 5) : TestRule {
// Used for clearing all permission data after each test try
private val permissionStorage = PermissionStorage(appContext.applicationContext)
@Suppress("TooGenericExceptionCaught", "ComplexMethod")
override fun apply(base: Statement, description: Description): Statement {
@ -24,36 +35,57 @@ class RetryTestRule(private val retryCount: Int = 5) : TestRule {
break
} catch (t: AssertionError) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: AssertionFailedError) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: UiObjectNotFoundException) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: NoMatchingViewException) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: IdlingResourceTimeoutException) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: RuntimeException) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}
} catch (t: NullPointerException) {
unregisterAllIdlingResources()
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
if (i == retryCount) {
throw t
}

View File

@ -7,14 +7,14 @@ package org.mozilla.fenix.helpers
import android.os.Handler
import android.os.Looper
import androidx.test.platform.app.InstrumentationRegistry
import java.io.IOException
import java.io.InputStream
import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.RecordedRequest
import okio.Buffer
import okio.source
import java.io.IOException
import java.io.InputStream
/**
* A [MockWebServer] [Dispatcher] that will return a generic search results page in the body of

View File

@ -34,7 +34,7 @@ object TestAssetHelper {
TestAsset(
server.url("pages/generic$it.html").toString().toUri()!!,
"Page content: $it",
""
"",
)
}
}
@ -87,6 +87,30 @@ object TestAssetHelper {
return TestAsset(url, "", "")
}
fun getAddressFormAsset(server: MockWebServer): TestAsset {
val url = server.url("pages/addressForm.html").toString().toUri()!!
return TestAsset(url, "", "")
}
fun getCreditCardFormAsset(server: MockWebServer): TestAsset {
val url = server.url("pages/creditCardForm.html").toString().toUri()!!
return TestAsset(url, "", "")
}
fun getHTMLControlsFormAsset(server: MockWebServer): TestAsset {
val url = server.url("pages/htmlControls.html").toString().toUri()!!
return TestAsset(url, "", "")
}
fun getExternalLinksAsset(server: MockWebServer): TestAsset {
val url = server.url("pages/externalLinks.html").toString().toUri()!!
return TestAsset(url, "", "")
}
fun getAudioPageAsset(server: MockWebServer): TestAsset {
val url = server.url("pages/audioMediaPage.html").toString().toUri()!!
val title = "Audio_Test_Page"
@ -102,4 +126,10 @@ object TestAssetHelper {
return TestAsset(url, content, title)
}
fun getStorageTestAsset(server: MockWebServer, pageAsset: String): TestAsset {
val url = server.url("pages/$pageAsset").toString().toUri()!!
return TestAsset(url, "", "")
}
}

View File

@ -2,23 +2,36 @@
* 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/. */
@file:Suppress("DEPRECATION")
package org.mozilla.fenix.helpers
import android.Manifest
import android.app.ActivityManager
import android.app.PendingIntent
import android.content.ActivityNotFoundException
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Color
import android.net.Uri
import android.os.Build
import android.os.storage.StorageManager
import android.os.storage.StorageVolume
import android.provider.Settings
import android.util.Log
import android.view.View
import androidx.annotation.RequiresApi
import androidx.browser.customtabs.CustomTabsIntent
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.IdlingResource
import androidx.test.espresso.action.ViewActions.longClick
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.intent.Intents.intended
@ -29,10 +42,11 @@ import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withParent
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.ActivityTestRule
import androidx.test.runner.permission.PermissionRequester
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiObject
import androidx.test.uiautomator.UiObjectNotFoundException
import androidx.test.uiautomator.UiScrollable
import androidx.test.uiautomator.UiSelector
import androidx.test.uiautomator.Until
@ -43,16 +57,22 @@ import org.hamcrest.CoreMatchers
import org.hamcrest.CoreMatchers.allOf
import org.hamcrest.Matcher
import org.junit.Assert
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.mozilla.fenix.Config
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.customtabs.ExternalAppBrowserActivity
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_APPS_PHOTOS
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
import org.mozilla.fenix.helpers.ext.waitNotNull
import org.mozilla.fenix.helpers.idlingresource.NetworkConnectionIdlingResource
import org.mozilla.fenix.ui.robots.BrowserRobot
import org.mozilla.fenix.utils.IntentUtils
import org.mozilla.gecko.util.ThreadUtils
import java.io.File
import java.util.Locale
import java.util.regex.Pattern
object TestHelper {
@ -72,18 +92,19 @@ object TestHelper {
fun longTapSelectItem(url: Uri) {
mDevice.waitNotNull(
Until.findObject(By.text(url.toString())),
waitingTime
waitingTime,
)
onView(
allOf(
withId(R.id.url),
withText(url.toString())
)
withText(url.toString()),
),
).perform(longClick())
}
fun restartApp(activity: HomeActivityIntentTestRule) {
with(activity) {
updateCachedSettings()
finishActivity()
mDevice.waitForIdle()
launchActivity(null)
@ -101,10 +122,16 @@ object TestHelper {
fun waitUntilObjectIsFound(resourceName: String) {
mDevice.waitNotNull(
Until.findObjects(By.res(resourceName)),
waitingTime
waitingTime,
)
}
fun waitUntilSnackbarGone() {
mDevice.findObject(
UiSelector().resourceId("$packageName:id/snackbar_layout"),
).waitUntilGone(waitingTime)
}
fun verifyUrl(urlSubstring: String, resourceName: String, resId: Int) {
waitUntilObjectIsFound(resourceName)
mDevice.findObject(UiSelector().text(urlSubstring)).waitForExists(waitingTime)
@ -127,24 +154,21 @@ object TestHelper {
}
}
// Remove test file from Google Photos (AOSP) on Firebase
fun deleteDownloadFromStorage() {
val deleteButton = mDevice.findObject(UiSelector().resourceId("$GOOGLE_APPS_PHOTOS:id/trash"))
deleteButton.waitForExists(waitingTime)
deleteButton.click()
// Sometimes there's a secondary confirmation
@RequiresApi(Build.VERSION_CODES.R)
fun deleteDownloadedFileOnStorage(fileName: String) {
val storageManager: StorageManager? = appContext.getSystemService(Context.STORAGE_SERVICE) as StorageManager?
val storageVolumes = storageManager!!.storageVolumes
val storageVolume: StorageVolume = storageVolumes[0]
val file = File(storageVolume.directory!!.path + "/Download/" + fileName)
try {
val deleteConfirm = mDevice.findObject(UiSelector().text("Got it"))
deleteConfirm.waitForExists(waitingTime)
deleteConfirm.click()
} catch (e: UiObjectNotFoundException) {
// Do nothing
file.delete()
Log.d("TestLog", "File delete try 1")
assertFalse("The file was not deleted", file.exists())
} catch (e: AssertionError) {
file.delete()
Log.d("TestLog", "File delete retried")
assertFalse("The file was not deleted", file.exists())
}
val trashIt = mDevice.findObject(UiSelector().resourceId("$GOOGLE_APPS_PHOTOS:id/move_to_trash"))
trashIt.waitForExists(waitingTime)
trashIt.click()
}
fun setNetworkEnabled(enabled: Boolean) {
@ -179,7 +203,7 @@ object TestHelper {
fun createCustomTabIntent(
pageUrl: String,
customMenuItemLabel: String = "",
customActionButtonDescription: String = ""
customActionButtonDescription: String = "",
): Intent {
val appContext = InstrumentationRegistry.getInstrumentation()
.targetContext
@ -190,7 +214,9 @@ object TestHelper {
.setShareState(CustomTabsIntent.SHARE_STATE_ON)
.setActionButton(
createTestBitmap(),
customActionButtonDescription, pendingIntent, true
customActionButtonDescription,
pendingIntent,
true,
)
.build()
customTabsIntent.intent.data = Uri.parse(pageUrl)
@ -223,7 +249,7 @@ object TestHelper {
} else {
mDevice.waitNotNull(
Until.findObject(By.text("Could not open file")),
waitingTime
waitingTime,
)
}
}
@ -233,13 +259,61 @@ object TestHelper {
mDevice.waitForIdle(waitingTimeShort)
assertTrue(
mDevice.findObject(UiSelector().packageName(appPackageName))
.waitForExists(waitingTime)
.waitForExists(waitingTime),
)
} else {
BrowserRobot().verifyUrl(url)
}
}
fun assertPlayStoreOpens() {
if (isPackageInstalled(Constants.PackageName.GOOGLE_PLAY_SERVICES)) {
try {
intended(toPackage(Constants.PackageName.GOOGLE_PLAY_SERVICES))
} catch (e: AssertionFailedError) {
BrowserRobot().verifyRateOnGooglePlayURL()
}
} else {
BrowserRobot().verifyRateOnGooglePlayURL()
}
}
/**
* Checks whether the latest activity of the application is used for custom tabs or PWAs.
*
* @return Boolean value that helps us know if the current activity supports custom tabs or PWAs.
*/
fun isExternalAppBrowserActivityInCurrentTask(): Boolean {
val activityManager = appContext.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
mDevice.waitForIdle(waitingTimeShort)
return activityManager.appTasks[0].taskInfo.topActivity!!.className == ExternalAppBrowserActivity::class.java.name
}
/**
* Run test with automatically registering idling resources and cleanup.
*
* @param idlingResources zero or more [IdlingResource] to be used when running [testBlock].
* @param testBlock test code to execute.
*/
fun registerAndCleanupIdlingResources(
vararg idlingResources: IdlingResource,
testBlock: () -> Unit,
) {
idlingResources.forEach {
IdlingRegistry.getInstance().register(it)
}
try {
testBlock()
} finally {
idlingResources.forEach {
IdlingRegistry.getInstance().unregister(it)
}
}
}
// exit from Menus to home screen or browser
fun exitMenu() {
val toolbar =
@ -258,9 +332,9 @@ object TestHelper {
return withParent(
hasSibling(
withChild(
matcher
)
)
matcher,
),
),
)
}
@ -279,11 +353,12 @@ object TestHelper {
By.text(
when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.R -> Pattern.compile(
"WHILE USING THE APP", Pattern.CASE_INSENSITIVE
"WHILE USING THE APP",
Pattern.CASE_INSENSITIVE,
)
else -> Pattern.compile("Allow", Pattern.CASE_INSENSITIVE)
}
)
},
),
).click()
}
}
@ -294,12 +369,96 @@ object TestHelper {
By.text(
when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.R -> Pattern.compile(
"DENY", Pattern.CASE_INSENSITIVE
"DENY",
Pattern.CASE_INSENSITIVE,
)
else -> Pattern.compile("Deny", Pattern.CASE_INSENSITIVE)
}
)
},
),
).click()
}
}
fun isTestLab(): Boolean {
return Settings.System.getString(appContext.contentResolver, "firebase.test.lab").toBoolean()
}
private val charPool: List<Char> = ('a'..'z') + ('A'..'Z') + ('0'..'9')
fun generateRandomString(stringLength: Int) =
(1..stringLength)
.map { kotlin.random.Random.nextInt(0, charPool.size) }
.map(charPool::get)
.joinToString("")
/**
* Changes the default language of the entire device, not just the app.
* Runs on Debug variant as we don't want to adjust Release permission manifests
* Runs the test in its testBlock.
* Cleans up and sets the default locale after it's done.
*/
fun runWithSystemLocaleChanged(locale: Locale, testRule: ActivityTestRule<HomeActivity>, testBlock: () -> Unit) {
if (Config.channel.isDebug) {
/* Sets permission to change device language */
PermissionRequester().apply {
addPermissions(
Manifest.permission.CHANGE_CONFIGURATION,
)
requestPermissions()
}
val defaultLocale = Locale.getDefault()
try {
setSystemLocale(locale)
testBlock()
ThreadUtils.runOnUiThread { testRule.activity.recreate() }
} catch (e: Exception) {
e.printStackTrace()
} finally {
setSystemLocale(defaultLocale)
}
}
}
/**
* Changes the default language of the entire device, not just the app.
*/
private fun setSystemLocale(locale: Locale) {
val activityManagerNative = Class.forName("android.app.ActivityManagerNative")
val am = activityManagerNative.getMethod("getDefault", *arrayOfNulls(0))
.invoke(activityManagerNative, *arrayOfNulls(0))
val config = InstrumentationRegistry.getInstrumentation().context.resources.configuration
config.javaClass.getDeclaredField("locale")[config] = locale
config.javaClass.getDeclaredField("userSetLocale").setBoolean(config, true)
am.javaClass.getMethod(
"updateConfiguration",
Configuration::class.java,
).invoke(am, config)
}
/**
* Creates clipboard data.
*/
fun setTextToClipBoard(context: Context, message: String) {
val clipBoard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clipData = ClipData.newPlainText("label", message)
clipBoard.setPrimaryClip(clipData)
}
/**
* Returns sponsored shortcut title based on the index.
*/
fun getSponsoredShortcutTitle(position: Int): String {
val sponsoredShortcut = mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/top_site_item")
.index(position - 1),
).getChild(
UiSelector()
.resourceId("$packageName:id/top_site_title"),
).text
return sponsoredShortcut
}
}

View File

@ -9,7 +9,7 @@ import androidx.test.espresso.IdlingResource
class ViewVisibilityIdlingResource(
private val view: View,
private val expectedVisibility: Int
private val expectedVisibility: Int,
) : IdlingResource {
private var resourceCallback: IdlingResource.ResourceCallback? = null
private var isIdle: Boolean = false

View File

@ -43,6 +43,6 @@ fun ViewInteraction.clickAtLocationInView(locationInView: GeneralLocation): View
locationInView,
Press.FINGER,
InputDevice.SOURCE_UNKNOWN,
MotionEvent.BUTTON_PRIMARY
)
MotionEvent.BUTTON_PRIMARY,
),
)

View File

@ -16,5 +16,5 @@ import org.mozilla.fenix.helpers.TestAssetHelper
*/
fun UiDevice.waitNotNull(
searchCondition: SearchCondition<*>,
waitTime: Long = TestAssetHelper.waitingTime
waitTime: Long = TestAssetHelper.waitingTime,
) = assertNotNull(wait(searchCondition, waitTime))

View File

@ -10,7 +10,7 @@ import androidx.test.espresso.IdlingResource
import mozilla.components.feature.addons.ui.AddonInstallationDialogFragment
class AddonsInstallingIdlingResource(
private val fragmentManager: FragmentManager
private val fragmentManager: FragmentManager,
) :
IdlingResource {
private var resourceCallback: IdlingResource.ResourceCallback? = null
@ -25,8 +25,9 @@ class AddonsInstallingIdlingResource(
}
override fun registerIdleTransitionCallback(callback: IdlingResource.ResourceCallback?) {
if (callback != null)
if (callback != null) {
resourceCallback = callback
}
}
private fun isInstalledAddonDialogShown(): Boolean {

View File

@ -20,14 +20,16 @@ class AddonsLoadingIdlingResource(val fragmentManager: FragmentManager) : Idling
override fun isIdleNow(): Boolean {
val idle = addonsFinishedLoading()
if (idle)
if (idle) {
resourceCallback?.onTransitionToIdle()
}
return idle
}
override fun registerIdleTransitionCallback(callback: IdlingResource.ResourceCallback?) {
if (callback != null)
if (callback != null) {
resourceCallback = callback
}
}
private fun addonsFinishedLoading(): Boolean {
@ -37,8 +39,9 @@ class AddonsLoadingIdlingResource(val fragmentManager: FragmentManager) : Idling
addonsManagementFragment.view?.findViewById<View>(R.id.add_ons_progress_bar)
} ?: return true
if (progressbar.visibility == VISIBLE)
if (progressbar.visibility == VISIBLE) {
return false
}
return true
}

View File

@ -32,14 +32,16 @@ class NetworkConnectionIdlingResource(private val networkConnected: Boolean) : I
} else {
!isOnline()
}
if (idle)
if (idle) {
resourceCallback?.onTransitionToIdle()
}
return idle
}
override fun registerIdleTransitionCallback(callback: IdlingResource.ResourceCallback?) {
if (callback != null)
if (callback != null) {
resourceCallback = callback
}
}
private fun isOnline(): Boolean {

View File

@ -5,13 +5,13 @@
package org.mozilla.fenix.helpers.matchers
import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.graphics.drawable.StateListDrawable
import android.view.View
import android.widget.ImageView
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.StateListDrawable
import android.graphics.drawable.Drawable
class BitmapDrawableMatcher(private val bitmap: Bitmap, private val name: String) :
BoundedMatcher<View, ImageView>(ImageView::class.java) {

View File

@ -28,7 +28,7 @@ class BottomSheetBehaviorHalfExpandedMaxRatioMatcher(private val maxHalfExpanded
override fun describeTo(description: Description?) {
description?.appendText(
"BottomSheetBehavior with an at max halfExpandedRation: " +
"$maxHalfExpandedRatio"
"$maxHalfExpandedRatio",
)
}

View File

@ -6,7 +6,6 @@ package org.mozilla.fenix.perf
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.children
import androidx.recyclerview.widget.RecyclerView
@ -16,7 +15,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -35,7 +33,7 @@ import org.mozilla.fenix.helpers.HomeActivityTestRule
*
* Say no to main thread IO! 🙅
*/
private const val EXPECTED_SUPPRESSION_COUNT = 19
private const val EXPECTED_SUPPRESSION_COUNT = 18
/**
* The number of times we call the `runBlocking` coroutine method on the main thread during this
@ -48,7 +46,7 @@ private const val EXPECTED_SUPPRESSION_COUNT = 19
* generally be replaced with a slow operation on a background thread launching onto the main thread
* when completed. However, in a very small number of cases, blocking may be impossible to avoid.
*/
private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to local runs: increment these together
private val EXPECTED_RUNBLOCKING_RANGE = 0..2 // CI has +1 counts compared to local runs: increment these together
/**
* The number of `ConstraintLayout`s we inflate that are children of a `RecyclerView` during this
@ -63,7 +61,7 @@ private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to lo
* If the view hierarchy uses Jetpack Compose, switching to that is also an option.
*/
private val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN =
3..4 // The messaging framework is not deterministic and could add a +1 to the count
4..6 // The messaging framework is not deterministic and could add to the count.
/**
* The number of layouts we inflate during this start up scenario. Incrementing the expected value
@ -81,7 +79,7 @@ private val EXPECTED_NUMBER_OF_INFLATION =
private val failureMsgStrictMode = getErrorMessage("StrictMode suppression")
private val failureMsgRunBlocking = getErrorMessage("runBlockingIncrement")
private val failureMsgRecyclerViewConstraintLayoutChildren = getErrorMessage(
"ConstraintLayout being a common direct descendant of a RecyclerView"
"ConstraintLayout being a common direct descendant of a RecyclerView",
)
private val failureMsgNumberOfInflation = getErrorMessage("start up inflation")
@ -116,21 +114,24 @@ class StartupExcessiveResourceUseTest {
val actualSuppresionCount = activityTestRule.activity.components.strictMode.suppressionCount.get().toInt()
val actualRunBlocking = RunBlockingCounter.count.get()
val rootView = activityTestRule.activity.findViewById<LinearLayout>(R.id.rootContainer)
val actualRecyclerViewConstraintLayoutChildren = countRecyclerViewConstraintLayoutChildren(rootView, null)
val actualNumberOfInflations = InflationCounter.inflationCount.get()
assertEquals(failureMsgStrictMode, EXPECTED_SUPPRESSION_COUNT, actualSuppresionCount)
assertTrue(failureMsgRunBlocking + "actual: $actualRunBlocking", actualRunBlocking in EXPECTED_RUNBLOCKING_RANGE)
assertTrue(
failureMsgRecyclerViewConstraintLayoutChildren + "actual: $actualRecyclerViewConstraintLayoutChildren",
actualRecyclerViewConstraintLayoutChildren in EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
)
assertTrue(
failureMsgNumberOfInflation + "actual: $actualNumberOfInflations",
actualNumberOfInflations in EXPECTED_NUMBER_OF_INFLATION,
)
// This below asserts fail in Firebase with different values for
// "actualRecyclerViewConstraintLayoutChildren" or "actualNumberOfInflations"
// See https://github.com/mozilla-mobile/fenix/pull/26512 and https://github.com/mozilla-mobile/fenix/issues/25142
//
// val rootView = activityTestRule.activity.findViewById<LinearLayout>(R.id.rootContainer)
// val actualRecyclerViewConstraintLayoutChildren = countRecyclerViewConstraintLayoutChildren(rootView, null)
// assertTrue(
// failureMsgRecyclerViewConstraintLayoutChildren + "actual: $actualRecyclerViewConstraintLayoutChildren",
// actualRecyclerViewConstraintLayoutChildren in EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
// )
// val actualNumberOfInflations = InflationCounter.inflationCount.get()
// assertTrue(
// failureMsgNumberOfInflation + "actual: $actualNumberOfInflations",
// actualNumberOfInflations in EXPECTED_NUMBER_OF_INFLATION,
// )
}
}

View File

@ -14,8 +14,8 @@ import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.ui.robots.homeScreen
import tools.fastlane.screengrab.Screengrab
@ -26,6 +26,7 @@ class DefaultHomeScreenTest : ScreenshotTest() {
@Rule @JvmField
val localeTestRule = LocaleTestRule()
@get:Rule
var mActivityTestRule: ActivityTestRule<HomeActivity> = HomeActivityTestRule()
@ -42,7 +43,6 @@ class DefaultHomeScreenTest : ScreenshotTest() {
@Test
fun showDefaultHomeScreen() {
homeScreen {
swipeToBottom()
verifyAccountsSignInButton()
Screengrab.screenshot("HomeScreenRobot_home-screen-scroll")
TestAssetHelper.waitingTime

View File

@ -11,7 +11,6 @@ import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.ActivityTestRule
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.Until
@ -20,7 +19,6 @@ import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -44,7 +42,7 @@ class MenuScreenShotTest : ScreenshotTest() {
val localeTestRule = LocaleTestRule()
@get:Rule
var mActivityTestRule: ActivityTestRule<HomeActivity> = HomeActivityTestRule()
var mActivityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {

View File

@ -19,4 +19,4 @@ requests = "*"
[dev-packages]
[requires]
python_version = "2.7"
python_version = "3.10"

View File

@ -1,11 +1,11 @@
{
"_meta": {
"hash": {
"sha256": "112a12fa2e9e8117b399b60a49b4c8799a614ef655992640c95149bf95f33e8b"
"sha256": "cf743d605ee37525af06865c7961ee99f1720fa9d6352eedc4bbfa5fa78f75ef"
},
"pipfile-spec": 6,
"requires": {
"python_version": "2.7"
"python_version": "3.10"
},
"sources": [
{
@ -16,27 +16,21 @@
]
},
"default": {
"atomicwrites": {
"async-generator": {
"hashes": [
"sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197",
"sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"
"sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b",
"sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"
],
"version": "==1.4.0"
"markers": "python_version >= '3.5'",
"version": "==1.10"
},
"attrs": {
"hashes": [
"sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6",
"sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"
"sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6",
"sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"
],
"version": "==20.3.0"
},
"backports.functools-lru-cache": {
"hashes": [
"sha256:0bada4c2f8a43d533e4ecb7a12214d9420e66eb206d54bf2d682581ca4b80848",
"sha256:8fde5f188da2d593bd5bc0be98d9abc46c95bb8a9dde93429570192ee6cc2d4a"
],
"markers": "python_version < '3.2'",
"version": "==1.6.1"
"markers": "python_version >= '3.5'",
"version": "==22.1.0"
},
"blessings": {
"hashes": [
@ -44,130 +38,127 @@
"sha256:b1fdd7e7a675295630f9ae71527a8ebc10bfefa236b3d6aa4932ee4462c17ba3",
"sha256:caad5211e7ba5afe04367cdd4cfc68fa886e2e08f6f35e76b7387d2109ccea6e"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.7"
},
"certifi": {
"hashes": [
"sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c",
"sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"
"sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d",
"sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"
],
"version": "==2020.12.5"
"version": "==2022.6.15"
},
"cffi": {
"hashes": [
"sha256:00a1ba5e2e95684448de9b89888ccd02c98d512064b4cb987d48f4b40aa0421e",
"sha256:00e28066507bfc3fe865a31f325c8391a1ac2916219340f87dfad602c3e48e5d",
"sha256:045d792900a75e8b1e1b0ab6787dd733a8190ffcf80e8c8ceb2fb10a29ff238a",
"sha256:0638c3ae1a0edfb77c6765d487fee624d2b1ee1bdfeffc1f0b58c64d149e7eec",
"sha256:105abaf8a6075dc96c1fe5ae7aae073f4696f2905fde6aeada4c9d2926752362",
"sha256:155136b51fd733fa94e1c2ea5211dcd4c8879869008fc811648f16541bf99668",
"sha256:1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c",
"sha256:1d2c4994f515e5b485fd6d3a73d05526aa0fcf248eb135996b088d25dfa1865b",
"sha256:2c24d61263f511551f740d1a065eb0212db1dbbbbd241db758f5244281590c06",
"sha256:51a8b381b16ddd370178a65360ebe15fbc1c71cf6f584613a7ea08bfad946698",
"sha256:594234691ac0e9b770aee9fcdb8fa02c22e43e5c619456efd0d6c2bf276f3eb2",
"sha256:5cf4be6c304ad0b6602f5c4e90e2f59b47653ac1ed9c662ed379fe48a8f26b0c",
"sha256:64081b3f8f6f3c3de6191ec89d7dc6c86a8a43911f7ecb422c60e90c70be41c7",
"sha256:6bc25fc545a6b3d57b5f8618e59fc13d3a3a68431e8ca5fd4c13241cd70d0009",
"sha256:798caa2a2384b1cbe8a2a139d80734c9db54f9cc155c99d7cc92441a23871c03",
"sha256:7c6b1dece89874d9541fc974917b631406233ea0440d0bdfbb8e03bf39a49b3b",
"sha256:840793c68105fe031f34d6a086eaea153a0cd5c491cde82a74b420edd0a2b909",
"sha256:8d6603078baf4e11edc4168a514c5ce5b3ba6e3e9c374298cb88437957960a53",
"sha256:9cc46bc107224ff5b6d04369e7c595acb700c3613ad7bcf2e2012f62ece80c35",
"sha256:9f7a31251289b2ab6d4012f6e83e58bc3b96bd151f5b5262467f4bb6b34a7c26",
"sha256:9ffb888f19d54a4d4dfd4b3f29bc2c16aa4972f1c2ab9c4ab09b8ab8685b9c2b",
"sha256:a5ed8c05548b54b998b9498753fb9cadbfd92ee88e884641377d8a8b291bcc01",
"sha256:a7711edca4dcef1a75257b50a2fbfe92a65187c47dab5a0f1b9b332c5919a3fb",
"sha256:af5c59122a011049aad5dd87424b8e65a80e4a6477419c0c1015f73fb5ea0293",
"sha256:b18e0a9ef57d2b41f5c68beefa32317d286c3d6ac0484efd10d6e07491bb95dd",
"sha256:b4e248d1087abf9f4c10f3c398896c87ce82a9856494a7155823eb45a892395d",
"sha256:ba4e9e0ae13fc41c6b23299545e5ef73055213e466bd107953e4a013a5ddd7e3",
"sha256:c6332685306b6417a91b1ff9fae889b3ba65c2292d64bd9245c093b1b284809d",
"sha256:d5ff0621c88ce83a28a10d2ce719b2ee85635e85c515f12bac99a95306da4b2e",
"sha256:d9efd8b7a3ef378dd61a1e77367f1924375befc2eba06168b6ebfa903a5e59ca",
"sha256:df5169c4396adc04f9b0a05f13c074df878b6052430e03f50e68adf3a57aa28d",
"sha256:ebb253464a5d0482b191274f1c8bf00e33f7e0b9c66405fbffc61ed2c839c775",
"sha256:ec80dc47f54e6e9a78181ce05feb71a0353854cc26999db963695f950b5fb375",
"sha256:f032b34669220030f905152045dfa27741ce1a6db3324a5bc0b96b6c7420c87b",
"sha256:f60567825f791c6f8a592f3c6e3bd93dd2934e3f9dac189308426bd76b00ef3b",
"sha256:f803eaa94c2fcda012c047e62bc7a51b0bdabda1cad7a92a522694ea2d76e49f"
"sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5",
"sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef",
"sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104",
"sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426",
"sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405",
"sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375",
"sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a",
"sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e",
"sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc",
"sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf",
"sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185",
"sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497",
"sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3",
"sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35",
"sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c",
"sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83",
"sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21",
"sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca",
"sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984",
"sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac",
"sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd",
"sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee",
"sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a",
"sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2",
"sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192",
"sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7",
"sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585",
"sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f",
"sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e",
"sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27",
"sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b",
"sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e",
"sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e",
"sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d",
"sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c",
"sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415",
"sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82",
"sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02",
"sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314",
"sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325",
"sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c",
"sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3",
"sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914",
"sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045",
"sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d",
"sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9",
"sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5",
"sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2",
"sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c",
"sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3",
"sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2",
"sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8",
"sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d",
"sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d",
"sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9",
"sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162",
"sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76",
"sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4",
"sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e",
"sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9",
"sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6",
"sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b",
"sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01",
"sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"
],
"version": "==1.14.4"
"version": "==1.15.1"
},
"chardet": {
"charset-normalizer": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
"sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5",
"sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"
],
"version": "==3.0.4"
},
"configparser": {
"hashes": [
"sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c",
"sha256:c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df"
],
"markers": "python_version < '3'",
"version": "==4.0.2"
},
"contextlib2": {
"hashes": [
"sha256:01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e",
"sha256:3355078a159fbb44ee60ea80abd0d87b80b78c248643b49aa6d94673b413609b"
],
"markers": "python_version < '3.4'",
"version": "==0.6.0.post1"
"markers": "python_version >= '3.6'",
"version": "==2.1.0"
},
"cryptography": {
"hashes": [
"sha256:22f8251f68953553af4f9c11ec5f191198bc96cff9f0ac5dd5ff94daede0ee6d",
"sha256:284e275e3c099a80831f9898fb5c9559120d27675c3521278faba54e584a7832",
"sha256:3e17d02941c0f169c5b877597ca8be895fca0e5e3eb882526a74aa4804380a98",
"sha256:52a47e60953679eea0b4d490ca3c241fb1b166a7b161847ef4667dfd49e7699d",
"sha256:57b8c1ed13b8aa386cabbfde3be175d7b155682470b0e259fecfe53850967f8a",
"sha256:6a8f64ed096d13f92d1f601a92d9fd1f1025dc73a2ca1ced46dcf5e0d4930943",
"sha256:6e8a3c7c45101a7eeee93102500e1b08f2307c717ff553fcb3c1127efc9b6917",
"sha256:7ef41304bf978f33cfb6f43ca13bb0faac0c99cda33693aa20ad4f5e34e8cb8f",
"sha256:87c2fffd61e934bc0e2c927c3764c20b22d7f5f7f812ee1a477de4c89b044ca6",
"sha256:88069392cd9a1e68d2cfd5c3a2b0d72a44ef3b24b8977a4f7956e9e3c4c9477a",
"sha256:8a0866891326d3badb17c5fd3e02c926b635e8923fa271b4813cd4d972a57ff3",
"sha256:8f0fd8b0751d75c4483c534b209e39e918f0d14232c0d8a2a76e687f64ced831",
"sha256:9a07e6d255053674506091d63ab4270a119e9fc83462c7ab1dbcb495b76307af",
"sha256:9a8580c9afcdcddabbd064c0a74f337af74ff4529cdf3a12fa2e9782d677a2e5",
"sha256:bd80bc156d3729b38cb227a5a76532aef693b7ac9e395eea8063ee50ceed46a5",
"sha256:d1cbc3426e6150583b22b517ef3720036d7e3152d428c864ff0f3fcad2b97591",
"sha256:e15ac84dcdb89f92424cbaca4b0b34e211e7ce3ee7b0ec0e4f3c55cee65fae5a",
"sha256:e4789b84f8dedf190148441f7c5bfe7244782d9cbb194a36e17b91e7d3e1cca9",
"sha256:f01c9116bfb3ad2831e125a73dcd957d173d6ddca7701528eff1e7d97972872c",
"sha256:f0e3986f6cce007216b23c490f093f35ce2068f3c244051e559f647f6731b7ae",
"sha256:f2aa3f8ba9e2e3fd49bd3de743b976ab192fbf0eb0348cebde5d2a9de0090a9f",
"sha256:fb70a4cedd69dc52396ee114416a3656e011fb0311fca55eb55c7be6ed9c8aef"
"sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59",
"sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596",
"sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3",
"sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5",
"sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab",
"sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884",
"sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82",
"sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b",
"sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441",
"sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa",
"sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d",
"sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b",
"sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a",
"sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6",
"sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157",
"sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280",
"sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282",
"sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67",
"sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8",
"sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046",
"sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327",
"sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"
],
"index": "pypi",
"version": "==3.2"
"version": "==37.0.4"
},
"distro": {
"hashes": [
"sha256:0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92",
"sha256:df74eed763e18d10d0da624258524ae80486432cd17392d9c3d96f5e83cd2799"
"sha256:151aeccf60c216402932b52e40ee477a939f8d58898927378a02abbe852c1c39",
"sha256:d596311d707e692c2160c37807f83e3820c5d539d5a83e87cfb6babd8ba3a06b"
],
"version": "==1.5.0"
},
"enum34": {
"hashes": [
"sha256:a98a201d6de3f2ab3db284e70a33b0f896fbf35f8086594e8c9e74b909058d53",
"sha256:c3858660960c984d6ab0ebad691265180da2b43f07e061c0f8dca9ef3cffd328",
"sha256:cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248"
],
"markers": "python_version < '3'",
"version": "==1.1.10"
},
"funcsigs": {
"hashes": [
"sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca",
"sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"
],
"markers": "python_version < '3.0'",
"version": "==1.0.2"
"markers": "python_version >= '3.6'",
"version": "==1.7.0"
},
"fxapom": {
"hashes": [
@ -177,6 +168,14 @@
"index": "pypi",
"version": "==1.10.2"
},
"h11": {
"hashes": [
"sha256:70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06",
"sha256:8ddd78563b633ca55346c8cd41ec0af27d3c79931828beffb46ce70a379e7442"
],
"markers": "python_version >= '3.6'",
"version": "==0.13.0"
},
"hawkauthlib": {
"hashes": [
"sha256:935878d3a75832aa76f78ddee13491f1466cbd69a8e7e4248902763cf9953ba9",
@ -186,35 +185,17 @@
},
"idna": {
"hashes": [
"sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6",
"sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"
"sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff",
"sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
],
"version": "==2.10"
"version": "==3.3"
},
"importlib-metadata": {
"iniconfig": {
"hashes": [
"sha256:b8de9eff2b35fb037368f28a7df1df4e6436f578fa74423505b6c6a778d5b5dd",
"sha256:c2d6341ff566f609e89a2acb2db190e5e1d23d5409d6cc8d2fe34d72443876d4"
"sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3",
"sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"
],
"markers": "python_version < '3.8'",
"version": "==2.1.1"
},
"ipaddress": {
"hashes": [
"sha256:6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc",
"sha256:b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2"
],
"markers": "python_version < '3'",
"version": "==1.0.23"
},
"more-itertools": {
"hashes": [
"sha256:38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4",
"sha256:c0a5785b1109a6bd7fac76d6837fd1feca158e54e521ccd2ae8bfe393cc9d4fc",
"sha256:fe7a7cae1ccb57d33952113ff4fa1bc5f879963600ed74918f1236e212ee50b9"
],
"markers": "python_version <= '2.7'",
"version": "==5.0.0"
"version": "==1.1.1"
},
"mozdevice": {
"hashes": [
@ -245,25 +226,24 @@
},
"mozinstall": {
"hashes": [
"sha256:219ba7c51308433487b4f30a2615cb9b3ecd40a76b9faf41cf1b1b005bb5dda7",
"sha256:bbc31a18ee8a1fbec74b67b99c6c0289ffc7daf39eb5b5ff7dc99f1be687eb08"
"sha256:0b14000a88d6a45c37b877eedf897655f665e89410ca629dd500415406ed465e",
"sha256:ec364cfefd3435fb155edd48be9e71819834e4dcacc6c3294c7f2452e200095b"
],
"index": "pypi",
"version": "==2.0.0"
"version": "==2.0.1"
},
"mozlog": {
"hashes": [
"sha256:4719d3d00bf1a0b77285d306eb3180f9c1311fffae9640a423fad9d80170e43d",
"sha256:d035f722c15d700e4a7b48b90bdda0a6ad83e25482760949d1abd73468bad07f"
"sha256:54b9a1e781ce31fc10079dc8aec509fff7feca83714edeae6c981e279ceb796f"
],
"version": "==7.0.1"
"version": "==7.1.0"
},
"mozprocess": {
"hashes": [
"sha256:08e1036b53819fd144331f6dfbbb17fc8ca782bbed2e28b4aa771b8b91f7dffb",
"sha256:54dc59e7f5a9c2c2930bffb7935f36dddd1d94c9fc6ed179e893d2dff353995a"
"sha256:e64591d02899f6fd50fe391f5635236c5c604d8faae08ab4aafed9c3a66e3966",
"sha256:e8093fe990bafd4ff3e2e49641b182c8085ea9cee2a28c7bdf9fabc2ff9f618f"
],
"version": "==1.2.1"
"version": "==1.3.0"
},
"mozprofile": {
"hashes": [
@ -275,11 +255,11 @@
},
"mozrunner": {
"hashes": [
"sha256:5e1bdf1709b4b8cb86b3daf3dbc9352d2abfc8428e26cc75a68ce87a565f4f25",
"sha256:f223e9ca7f0acd3f93d4c30760f8d976d41da81edf686cd5063d2973ebbebcfb"
"sha256:35a7d2cf3abee1d8651e92f870f75159605810ba8ea442defae41a5eec462c29",
"sha256:4ee4d44123c1daa7f3648e8b3b0e3a8c1712b3e1ea254d9a4bf80295ea795d41"
],
"index": "pypi",
"version": "==7.8.0"
"version": "==8.2.1"
},
"mozterm": {
"hashes": [
@ -296,41 +276,45 @@
"index": "pypi",
"version": "==2.3.0"
},
"outcome": {
"hashes": [
"sha256:6f82bd3de45da303cf1f771ecafa1633750a358436a8bb60e06a1ceb745d2672",
"sha256:c4ab89a56575d6d38a05aa16daeaa333109c1f96167aba8901ab18b6b5e0f7f5"
],
"markers": "python_version >= '3.7'",
"version": "==1.2.0"
},
"packaging": {
"hashes": [
"sha256:05af3bb85d320377db281cf254ab050e1a7ebcbf5410685a9a407e18a1f81236",
"sha256:eb41423378682dadb7166144a4926e443093863024de508ca5c9737d6bc08376"
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb",
"sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"
],
"version": "==20.7"
},
"pathlib2": {
"hashes": [
"sha256:0ec8205a157c80d7acc301c0b18fbd5d44fe655968f5d947b6ecef5290fc35db",
"sha256:6cd9a47b597b37cc57de1c05e56fb1a1c9cc9fab04fe78c29acd090418529868"
],
"markers": "python_version < '3.6'",
"version": "==2.3.5"
"markers": "python_version >= '3.6'",
"version": "==21.3"
},
"pluggy": {
"hashes": [
"sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0",
"sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"
"sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159",
"sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"
],
"version": "==0.13.1"
"markers": "python_version >= '3.6'",
"version": "==1.0.0"
},
"progressbar2": {
"hashes": [
"sha256:ef72be284e7f2b61ac0894b44165926f13f5d995b2bf3cd8a8dedc6224b255a7",
"sha256:fe2738e7ecb7df52ad76307fe610c460c52b50f5335fd26c3ab80ff7655ba1e0"
"sha256:14d3165a1781d053ffaa117daf27cc706128d2ec1d2977fdb05b6bb079888013",
"sha256:2562ba3e554433f08e81fb7b786208b19de135f3ca1c5da1787d9b05558e6247"
],
"version": "==3.53.1"
"markers": "python_version >= '3.7'",
"version": "==4.0.0"
},
"py": {
"hashes": [
"sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2",
"sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"
"sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719",
"sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"
],
"version": "==1.9.0"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==1.11.0"
},
"pybrowserid": {
"hashes": [
@ -341,10 +325,10 @@
},
"pycparser": {
"hashes": [
"sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0",
"sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"
"sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9",
"sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"
],
"version": "==2.20"
"version": "==2.21"
},
"pyfxa": {
"hashes": [
@ -354,32 +338,49 @@
},
"pyjwt": {
"hashes": [
"sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e",
"sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"
"sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf",
"sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba"
],
"version": "==1.7.1"
"markers": "python_version >= '3.6'",
"version": "==2.4.0"
},
"pyopenssl": {
"hashes": [
"sha256:660b1b1425aac4a1bea1d94168a85d99f0b3144c869dd4390d27629d0087f1bf",
"sha256:ea252b38c87425b64116f808355e8da644ef9b07e429398bfece610f893ee2e0"
],
"version": "==22.0.0"
},
"pyparsing": {
"hashes": [
"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1",
"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"
"sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb",
"sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"
],
"version": "==2.4.7"
"markers": "python_full_version >= '3.6.8'",
"version": "==3.0.9"
},
"pypom": {
"hashes": [
"sha256:4bdd57fceb72d7e6a3645cf6c9322f490d9cfb5d777eac2c851a3b658b813939",
"sha256:6772ec99f0a21a5bdc8c092007a8c813ed18359e67ed70258bbb233df5e28829"
"sha256:6f56888d25c1faf8fa0d53ef8a4ba1d7dc828e57212f7fe04e8cd21b5eaa924e",
"sha256:a65297125c498c4e9cee99de9b2ddf5b908d0041ee1fc1e90956d3750483fa3d"
],
"version": "==2.2.0"
"version": "==2.2.3"
},
"pysocks": {
"hashes": [
"sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299",
"sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5",
"sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"
],
"version": "==1.7.1"
},
"pytest": {
"hashes": [
"sha256:19e8f75eac01dd3f211edd465b39efbcbdc8fc5f7866d7dd49fedb30d8adf339",
"sha256:c77a5f30a90e0ce24db9eaa14ddfd38d4afb5ea159309bdd2dae55b931bc9324"
"sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c",
"sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"
],
"index": "pypi",
"version": "==4.6.9"
"version": "==7.1.2"
},
"pytest-fxa": {
"hashes": [
@ -391,26 +392,27 @@
},
"pytest-html": {
"hashes": [
"sha256:06e7e13131649b4fe522cf04054efb7b4749ff2c7160755e4acfd8e89a7e5955",
"sha256:f0fae6de71f02f62f9460f628d0c5f70b0cdc86bb393239860c7dec70fd2973d"
"sha256:3ee1cf319c913d19fe53aeb0bc400e7b0bc2dbeb477553733db1dad12eb75ee3",
"sha256:b7f82f123936a3f4d2950bc993c2c1ca09ce262c9ae12f9ac763a2401380b455"
],
"index": "pypi",
"version": "==1.22.1"
"version": "==3.1.1"
},
"pytest-metadata": {
"hashes": [
"sha256:2071a59285de40d7541fde1eb9f1ddea1c9db165882df82781367471238b66ba",
"sha256:c29a1fb470424926c63154c1b632c02585f2ba4282932058a71d35295ff8c96d"
"sha256:39261ee0086f17649b180baf2a8633e1922a4c4b6fcc28a2de7d8127a82541bf",
"sha256:fcd2f416f15be295943527b3c8ba16a44ae5a7141939c90c3dc5ce9d167cf2a5"
],
"index": "pypi",
"version": "==1.8.0"
"version": "==2.0.2"
},
"python-utils": {
"hashes": [
"sha256:ebaadab29d0cb9dca0a82eab9c405f5be5125dbbff35b8f32cc433fa498dbaa7",
"sha256:f21fc09ff58ea5ebd1fd2e8ef7f63e39d456336900f26bdc9334a03a3f7d8089"
"sha256:3b1c8b706e40e91280eec5fa72ea730880a166cee99afa5555b863d55664478d",
"sha256:5cb9cf295018202fb4d6abdd694a33a7f08bc0ce1bf1eab8cce80ab2cde35c07"
],
"version": "==2.4.0"
"markers": "python_version >= '3.7'",
"version": "==3.3.3"
},
"redo": {
"hashes": [
@ -421,42 +423,49 @@
},
"requests": {
"hashes": [
"sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee",
"sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6"
"sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983",
"sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
],
"index": "pypi",
"version": "==2.23.0"
},
"scandir": {
"hashes": [
"sha256:2586c94e907d99617887daed6c1d102b5ca28f1085f90446554abf1faf73123e",
"sha256:2ae41f43797ca0c11591c0c35f2f5875fa99f8797cb1a1fd440497ec0ae4b022",
"sha256:2b8e3888b11abb2217a32af0766bc06b65cc4a928d8727828ee68af5a967fa6f",
"sha256:2c712840c2e2ee8dfaf36034080108d30060d759c7b73a01a52251cc8989f11f",
"sha256:4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae",
"sha256:67f15b6f83e6507fdc6fca22fedf6ef8b334b399ca27c6b568cbfaa82a364173",
"sha256:7d2d7a06a252764061a020407b997dd036f7bd6a175a5ba2b345f0a357f0b3f4",
"sha256:8c5922863e44ffc00c5c693190648daa6d15e7c1207ed02d6f46a8dcc2869d32",
"sha256:92c85ac42f41ffdc35b6da57ed991575bdbe69db895507af88b9f499b701c188",
"sha256:b24086f2375c4a094a6b51e78b4cf7ca16c721dcee2eddd7aa6494b42d6d519d",
"sha256:cb925555f43060a1745d0a321cca94bcea927c50114b623d73179189a4e100ac"
],
"markers": "python_version < '3.5'",
"version": "==1.10.0"
"version": "==2.28.1"
},
"selenium": {
"hashes": [
"sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c",
"sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d"
"sha256:61c8b02788b66f08f2e61d5295afc956991e394815e33573072e68402ed4e8d5"
],
"version": "==3.141.0"
"markers": "python_version ~= '3.7'",
"version": "==4.4.0"
},
"six": {
"hashes": [
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
],
"version": "==1.15.0"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.16.0"
},
"sniffio": {
"hashes": [
"sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663",
"sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"
],
"markers": "python_version >= '3.5'",
"version": "==1.2.0"
},
"sortedcontainers": {
"hashes": [
"sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88",
"sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"
],
"version": "==2.4.0"
},
"tomli": {
"hashes": [
"sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
"sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
],
"markers": "python_version >= '3.7'",
"version": "==2.0.1"
},
"treeherder-client": {
"hashes": [
@ -465,54 +474,57 @@
],
"version": "==5.0.0"
},
"urllib3": {
"trio": {
"hashes": [
"sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2",
"sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"
"sha256:4dc0bf9d5cc78767fc4516325b6d80cc0968705a31d0eec2ecd7cdda466265b0",
"sha256:523f39b7b69eef73501cebfe1aafd400a9aad5b03543a0eded52952488ff1c13"
],
"version": "==1.25.11"
"markers": "python_version >= '3.7'",
"version": "==0.21.0"
},
"wcwidth": {
"trio-websocket": {
"hashes": [
"sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784",
"sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"
"sha256:5b558f6e83cc20a37c3b61202476c5295d1addf57bd65543364e0337e37ed2bc",
"sha256:a3d34de8fac26023eee701ed1e7bf4da9a8326b61a62934ec9e53b64970fd8fe"
],
"version": "==0.2.5"
"markers": "python_version >= '3.5'",
"version": "==0.9.2"
},
"urllib3": {
"extras": [
"secure",
"socks"
],
"hashes": [
"sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc",
"sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4.0'",
"version": "==1.26.11"
},
"webob": {
"hashes": [
"sha256:a3c89a8e9ba0aeb17382836cdb73c516d0ecf6630ec40ec28288f3ed459ce87b",
"sha256:aa3a917ed752ba3e0b242234b2a373f9c4e2a75d35291dcbe977649bd21fd108"
"sha256:73aae30359291c14fa3b956f8b5ca31960e420c28c1bec002547fb04928cf89b",
"sha256:b64ef5141be559cfade448f044fa45c2260351edcb6a8ef6b7e00c7dcef0c323"
],
"version": "==1.8.6"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.8.7"
},
"zipp": {
"wsproto": {
"hashes": [
"sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1",
"sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"
"sha256:2218cb57952d90b9fca325c0dcfb08c3bda93e8fd8070b0a17f048e2e47a521b",
"sha256:a2e56bfd5c7cd83c1369d83b5feccd6d37798b74872866e62616e0ecf111bda8"
],
"version": "==1.2.0"
"markers": "python_version >= '3.7'",
"version": "==1.1.0"
},
"zope.component": {
"hashes": [
"sha256:607628e4c84f7887a69a958542b5c304663e726b73aba0882e3a3f059bff14f3",
"sha256:91628918218b3e6f6323de2a7b845e09ddc5cae131c034896c051b084bba3c92"
"sha256:32cbe426ba8fa7b62ce5b211f80f0718a0c749cc7ff09e3f4b43a57f7ccdf5e5",
"sha256:e955eb9f1e55d30e2d8097c8baa9ee012c356887eef3b0d43e6bfcd4868221e5"
],
"version": "==4.6.2"
},
"zope.deferredimport": {
"hashes": [
"sha256:57b2345e7b5eef47efcd4f634ff16c93e4265de3dcf325afc7315ade48d909e1",
"sha256:9a0c211df44aa95f1c4e6d2626f90b400f56989180d3ef96032d708da3d23e0a"
],
"version": "==4.3.1"
},
"zope.deprecation": {
"hashes": [
"sha256:0d453338f04bacf91bbfba545d8bcdf529aa829e67b705eac8c1a7fdce66e2df",
"sha256:f1480b74995958b24ce37b0ef04d3663d2683e5d6debc96726eff18acf4ea113"
],
"version": "==4.4.0"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==5.0.1"
},
"zope.event": {
"hashes": [
@ -523,150 +535,96 @@
},
"zope.hookable": {
"hashes": [
"sha256:0194b9b9e7f614abba60c90b231908861036578297515d3d6508eb10190f266d",
"sha256:0c2977473918bdefc6fa8dfb311f154e7f13c6133957fe649704deca79b92093",
"sha256:17b8bdb3b77e03a152ca0d5ca185a7ae0156f5e5a2dbddf538676633a1f7380f",
"sha256:29d07681a78042cdd15b268ae9decffed9ace68a53eebeb61d65ae931d158841",
"sha256:36fb1b35d1150267cb0543a1ddd950c0bc2c75ed0e6e92e3aaa6ac2e29416cb7",
"sha256:3aed60c2bb5e812bbf9295c70f25b17ac37c233f30447a96c67913ba5073642f",
"sha256:3cac1565cc768911e72ca9ec4ddf5c5109e1fef0104f19f06649cf1874943b60",
"sha256:3d4bc0cc4a37c3cd3081063142eeb2125511db3c13f6dc932d899c512690378e",
"sha256:3f73096f27b8c28be53ffb6604f7b570fbbb82f273c6febe5f58119009b59898",
"sha256:522d1153d93f2d48aa0bd9fb778d8d4500be2e4dcf86c3150768f0e3adbbc4ef",
"sha256:523d2928fb7377bbdbc9af9c0b14ad73e6eaf226349f105733bdae27efd15b5a",
"sha256:5848309d4fc5c02150a45e8f8d2227e5bfda386a508bbd3160fed7c633c5a2fa",
"sha256:6781f86e6d54a110980a76e761eb54590630fd2af2a17d7edf02a079d2646c1d",
"sha256:6fd27921ebf3aaa945fa25d790f1f2046204f24dba4946f82f5f0a442577c3e9",
"sha256:70d581862863f6bf9e175e85c9d70c2d7155f53fb04dcdb2f73cf288ca559a53",
"sha256:81867c23b0dc66c8366f351d00923f2bc5902820a24c2534dfd7bf01a5879963",
"sha256:81db29edadcbb740cd2716c95a297893a546ed89db1bfe9110168732d7f0afdd",
"sha256:86bd12624068cea60860a0759af5e2c3adc89c12aef6f71cf12f577e28deefe3",
"sha256:9c184d8f9f7a76e1ced99855ccf390ffdd0ec3765e5cbf7b9cada600accc0a1e",
"sha256:acc789e8c29c13555e43fe4bf9fcd15a65512c9645e97bbaa5602e3201252b02",
"sha256:afaa740206b7660d4cc3b8f120426c85761f51379af7a5b05451f624ad12b0af",
"sha256:b5f5fa323f878bb16eae68ea1ba7f6c0419d4695d0248bed4b18f51d7ce5ab85",
"sha256:bd89e0e2c67bf4ac3aca2a19702b1a37269fb1923827f68324ac2e7afd6e3406",
"sha256:c212de743283ec0735db24ec6ad913758df3af1b7217550ff270038062afd6ae",
"sha256:ca553f524293a0bdea05e7f44c3e685e4b7b022cb37d87bc4a3efa0f86587a8d",
"sha256:cab67065a3db92f636128d3157cc5424a145f82d96fb47159c539132833a6d36",
"sha256:d3b3b3eedfdbf6b02898216e85aa6baf50207f4378a2a6803d6d47650cd37031",
"sha256:d9f4a5a72f40256b686d31c5c0b1fde503172307beb12c1568296e76118e402c",
"sha256:df5067d87aaa111ed5d050e1ee853ba284969497f91806efd42425f5348f1c06",
"sha256:e2587644812c6138f05b8a41594a8337c6790e3baf9a01915e52438c13fc6bef",
"sha256:e27fd877662db94f897f3fd532ef211ca4901eb1a70ba456f15c0866a985464a",
"sha256:e427ebbdd223c72e06ba94c004bb04e996c84dec8a0fa84e837556ae145c439e",
"sha256:e583ad4309c203ef75a09d43434cf9c2b4fa247997ecb0dcad769982c39411c7",
"sha256:e760b2bc8ece9200804f0c2b64d10147ecaf18455a2a90827fbec4c9d84f3ad5",
"sha256:ea9a9cc8bcc70e18023f30fa2f53d11ae069572a162791224e60cd65df55fb69",
"sha256:ecb3f17dce4803c1099bd21742cd126b59817a4e76a6544d31d2cca6e30dbffd",
"sha256:ed794e3b3de42486d30444fb60b5561e724ee8a2d1b17b0c2e0f81e3ddaf7a87",
"sha256:ee885d347279e38226d0a437b6a932f207f691c502ee565aba27a7022f1285df",
"sha256:fd5e7bc5f24f7e3d490698f7b854659a9851da2187414617cd5ed360af7efd63",
"sha256:fe45f6870f7588ac7b2763ff1ce98cce59369717afe70cc353ec5218bc854bcc"
"sha256:031e7672540685dc9d07565f2b968c6e21c7899c9391da58a23e63f229a8fdcd",
"sha256:14bac9afd00e9577227749b37dfc3b9fe4f4fb855923262fc016be47baa42712",
"sha256:16c0748438f716894cb61f3ed00adaa65359a5abe7a12bb44d7133d4b0cd3453",
"sha256:1da8d3386238983e97302b2cbdb510e126968e65e3cb8a8745da9744655001fc",
"sha256:24e4489ccf0dbd4c0e9d2d8b845b46994debb30cc22f96da76e973f9cb582799",
"sha256:3111fbc3ddae5d98655691ff81b1c71bd7ad0c3bcf2c2ef659fdc8e66f664603",
"sha256:34a84e15f2e6a3b2e372a67f7d845a372e3f0438319f26dfe9b7cb66ab75be44",
"sha256:35320d283a364c42dbf91694066bc1e7f07628bbd5ec87c1ae08143036e1de49",
"sha256:43855fbab9fb949fa14b5bbcf4c471e4d359428c2196061efe0d82fe3b387101",
"sha256:4711443b964bf7ace58780a3473f520151de8d441e57583b8d8cd8a231fb7656",
"sha256:49427208d9f65e5aa7df5c1be4dc818c51da34e261f4e52fe944a695ae90e3b3",
"sha256:4dbdfe522741effbb507d55354664c93c81db6db66ca124c981d1e3a41e5a31b",
"sha256:4dc9693fa28a238f063ba169110ef4199e0f86f9f976b57824c1d742eb21ad2e",
"sha256:64337672794b01d039e2380d11dd895ab17043530f27b5e3e0709a11fbe5b532",
"sha256:7067a450b15c8d41d00060890573ddc06f3414e62173dac55b38f6683920c20e",
"sha256:7091df7b4d6d897dd00e8717f0fa62b020e28aabe54a92005df22130ed204f6f",
"sha256:7b63de104e531109f606d4e3765b82fa3364e387d63b71a02460d321e24b33c8",
"sha256:7ef3128b5bcb97029c19df95126f57638afe6d2aca0ffede989149fa0bbd744a",
"sha256:800f93479202b05e46ba7696a2dd5411cfdd9d87c47a7d2b6fcda5394a5f9042",
"sha256:84dfb4f5189c8a3b70dfdf0d268840d5dce69048d4767120910f4665fa5ee2f3",
"sha256:8cf9982d43f6a732d041cf68b08fa969e5bcf090212ab519a637c8a393015eda",
"sha256:8fc3e6cd0486c6af48e3317c299def719b57538332a194e0b3bc6a772f4faa0e",
"sha256:a766186b97e493928dfac4a4b6c7508e47411e78c6f3be9846e8981eb91542d4",
"sha256:bfd1b1107a51ddfbd628c1ff884c6a67e92519b23012563b6082d438dbd16b9d",
"sha256:cbcbf6d31092caafb40ab26d07c065bf4f60f3ba7925d23d51a4e19469034544",
"sha256:cf27270212fa51005162d75cae83bb943c84ece7c7f8d30d68efebfad2f469d9",
"sha256:cf7f1f973aeced06ab1a245faa71e867cec6a053b807c2aad4c1728964aac071",
"sha256:de77a946ef020d08643647e417713ed753a2eed1f4495259c38a241c8eb31dbf",
"sha256:e3b01e7cf16b4a3257ee05e4c354737a4f64af302846826c46a296a7944b8da9",
"sha256:ff08276e555f2ef262fd03d872cca130e7ee376b87d7651a5595aae2fa5b2425"
],
"version": "==5.0.1"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==5.1.0"
},
"zope.interface": {
"hashes": [
"sha256:05a97ba92c1c7c26f25c9f671aa1ef85ffead6cdad13770e5b689cf983adc7e1",
"sha256:07d61722dd7d85547b7c6b0f5486b4338001fab349f2ac5cabc0b7182eb3425d",
"sha256:0a990dcc97806e5980bbb54b2e46b9cde9e48932d8e6984daf71ef1745516123",
"sha256:150e8bcb7253a34a4535aeea3de36c0bb3b1a6a47a183a95d65a194b3e07f232",
"sha256:1743bcfe45af8846b775086471c28258f4c6e9ee8ef37484de4495f15a98b549",
"sha256:1b5f6c8fff4ed32aa2dd43e84061bc8346f32d3ba6ad6e58f088fe109608f102",
"sha256:21e49123f375703cf824214939d39df0af62c47d122d955b2a8d9153ea08cfd5",
"sha256:21f579134a47083ffb5ddd1307f0405c91aa8b61ad4be6fd5af0171474fe0c45",
"sha256:27c267dc38a0f0079e96a2945ee65786d38ef111e413c702fbaaacbab6361d00",
"sha256:299bde0ab9e5c4a92f01a152b7fbabb460f31343f1416f9b7b983167ab1e33bc",
"sha256:2ab88d8f228f803fcb8cb7d222c579d13dab2d3622c51e8cf321280da01102a7",
"sha256:2ced4c35061eea623bc84c7711eedce8ecc3c2c51cd9c6afa6290df3bae9e104",
"sha256:2dcab01c660983ba5e5a612e0c935141ccbee67d2e2e14b833e01c2354bd8034",
"sha256:32546af61a9a9b141ca38d971aa6eb9800450fa6620ce6323cc30eec447861f3",
"sha256:32b40a4c46d199827d79c86bb8cb88b1bbb764f127876f2cb6f3a47f63dbada3",
"sha256:3cc94c69f6bd48ed86e8e24f358cb75095c8129827df1298518ab860115269a4",
"sha256:42b278ac0989d6f5cf58d7e0828ea6b5951464e3cf2ff229dd09a96cb6ba0c86",
"sha256:495b63fd0302f282ee6c1e6ea0f1c12cb3d1a49c8292d27287f01845ff252a96",
"sha256:4af87cdc0d4b14e600e6d3d09793dce3b7171348a094ba818e2a68ae7ee67546",
"sha256:4b94df9f2fdde7b9314321bab8448e6ad5a23b80542dcab53e329527d4099dcb",
"sha256:4c48ddb63e2b20fba4c6a2bf81b4d49e99b6d4587fb67a6cd33a2c1f003af3e3",
"sha256:4df9afd17bd5477e9f8c8b6bb8507e18dd0f8b4efe73bb99729ff203279e9e3b",
"sha256:518950fe6a5d56f94ba125107895f938a4f34f704c658986eae8255edb41163b",
"sha256:538298e4e113ccb8b41658d5a4b605bebe75e46a30ceca22a5a289cf02c80bec",
"sha256:55465121e72e208a7b69b53de791402affe6165083b2ea71b892728bd19ba9ae",
"sha256:588384d70a0f19b47409cfdb10e0c27c20e4293b74fc891df3d8eb47782b8b3e",
"sha256:6278c080d4afffc9016e14325f8734456831124e8c12caa754fd544435c08386",
"sha256:64ea6c221aeee4796860405e1aedec63424cda4202a7ad27a5066876db5b0fd2",
"sha256:681dbb33e2b40262b33fd383bae63c36d33fd79fa1a8e4092945430744ffd34a",
"sha256:6936aa9da390402d646a32a6a38d5409c2d2afb2950f045a7d02ab25a4e7d08d",
"sha256:778d0ec38bbd288b150a3ae363c8ffd88d2207a756842495e9bffd8a8afbc89a",
"sha256:8251f06a77985a2729a8bdbefbae79ee78567dddc3acbd499b87e705ca59fe24",
"sha256:83b4aa5344cce005a9cff5d0321b2e318e871cc1dfc793b66c32dd4f59e9770d",
"sha256:844fad925ac5c2ad4faaceb3b2520ad016b5280105c6e16e79838cf951903a7b",
"sha256:8ceb3667dd13b8133f2e4d637b5b00f240f066448e2aa89a41f4c2d78a26ce50",
"sha256:92dc0fb79675882d0b6138be4bf0cec7ea7c7eede60aaca78303d8e8dbdaa523",
"sha256:9789bd945e9f5bd026ed3f5b453d640befb8b1fc33a779c1fe8d3eb21fe3fb4a",
"sha256:a2b6d6eb693bc2fc6c484f2e5d93bd0b0da803fa77bf974f160533e555e4d095",
"sha256:aab9f1e34d810feb00bf841993552b8fcc6ae71d473c505381627143d0018a6a",
"sha256:abb61afd84f23099ac6099d804cdba9bd3b902aaaded3ffff47e490b0a495520",
"sha256:adf9ee115ae8ff8b6da4b854b4152f253b390ba64407a22d75456fe07dcbda65",
"sha256:aedc6c672b351afe6dfe17ff83ee5e7eb6ed44718f879a9328a68bdb20b57e11",
"sha256:b7a00ecb1434f8183395fac5366a21ee73d14900082ca37cf74993cf46baa56c",
"sha256:ba32f4a91c1cb7314c429b03afbf87b1fff4fb1c8db32260e7310104bd77f0c7",
"sha256:cbd0f2cbd8689861209cd89141371d3a22a11613304d1f0736492590aa0ab332",
"sha256:e4bc372b953bf6cec65a8d48482ba574f6e051621d157cf224227dbb55486b1e",
"sha256:eccac3d9aadc68e994b6d228cb0c8919fc47a5350d85a1b4d3d81d1e98baf40c",
"sha256:efd550b3da28195746bb43bd1d815058181a7ca6d9d6aa89dd37f5eefe2cacb7",
"sha256:efef581c8ba4d990770875e1a2218e856849d32ada2680e53aebc5d154a17e20",
"sha256:f057897711a630a0b7a6a03f1acf379b6ba25d37dc5dc217a97191984ba7f2fc",
"sha256:f37d45fab14ffef9d33a0dc3bc59ce0c5313e2253323312d47739192da94f5fd",
"sha256:f44906f70205d456d503105023041f1e63aece7623b31c390a0103db4de17537"
"sha256:08f9636e99a9d5410181ba0729e0408d3d8748026ea938f3b970a0249daa8192",
"sha256:0b465ae0962d49c68aa9733ba92a001b2a0933c317780435f00be7ecb959c702",
"sha256:0cba8477e300d64a11a9789ed40ee8932b59f9ee05f85276dbb4b59acee5dd09",
"sha256:0cee5187b60ed26d56eb2960136288ce91bcf61e2a9405660d271d1f122a69a4",
"sha256:0ea1d73b7c9dcbc5080bb8aaffb776f1c68e807767069b9ccdd06f27a161914a",
"sha256:0f91b5b948686659a8e28b728ff5e74b1be6bf40cb04704453617e5f1e945ef3",
"sha256:15e7d1f7a6ee16572e21e3576d2012b2778cbacf75eb4b7400be37455f5ca8bf",
"sha256:17776ecd3a1fdd2b2cd5373e5ef8b307162f581c693575ec62e7c5399d80794c",
"sha256:194d0bcb1374ac3e1e023961610dc8f2c78a0f5f634d0c737691e215569e640d",
"sha256:1c0e316c9add0db48a5b703833881351444398b04111188069a26a61cfb4df78",
"sha256:205e40ccde0f37496904572035deea747390a8b7dc65146d30b96e2dd1359a83",
"sha256:273f158fabc5ea33cbc936da0ab3d4ba80ede5351babc4f577d768e057651531",
"sha256:2876246527c91e101184f63ccd1d716ec9c46519cc5f3d5375a3351c46467c46",
"sha256:2c98384b254b37ce50eddd55db8d381a5c53b4c10ee66e1e7fe749824f894021",
"sha256:2e5a26f16503be6c826abca904e45f1a44ff275fdb7e9d1b75c10671c26f8b94",
"sha256:334701327f37c47fa628fc8b8d28c7d7730ce7daaf4bda1efb741679c2b087fc",
"sha256:3748fac0d0f6a304e674955ab1365d515993b3a0a865e16a11ec9d86fb307f63",
"sha256:3c02411a3b62668200910090a0dff17c0b25aaa36145082a5a6adf08fa281e54",
"sha256:3dd4952748521205697bc2802e4afac5ed4b02909bb799ba1fe239f77fd4e117",
"sha256:3f24df7124c323fceb53ff6168da70dbfbae1442b4f3da439cd441681f54fe25",
"sha256:469e2407e0fe9880ac690a3666f03eb4c3c444411a5a5fddfdabc5d184a79f05",
"sha256:4de4bc9b6d35c5af65b454d3e9bc98c50eb3960d5a3762c9438df57427134b8e",
"sha256:5208ebd5152e040640518a77827bdfcc73773a15a33d6644015b763b9c9febc1",
"sha256:52de7fc6c21b419078008f697fd4103dbc763288b1406b4562554bd47514c004",
"sha256:5bb3489b4558e49ad2c5118137cfeaf59434f9737fa9c5deefc72d22c23822e2",
"sha256:5dba5f530fec3f0988d83b78cc591b58c0b6eb8431a85edd1569a0539a8a5a0e",
"sha256:5dd9ca406499444f4c8299f803d4a14edf7890ecc595c8b1c7115c2342cadc5f",
"sha256:5f931a1c21dfa7a9c573ec1f50a31135ccce84e32507c54e1ea404894c5eb96f",
"sha256:63b82bb63de7c821428d513607e84c6d97d58afd1fe2eb645030bdc185440120",
"sha256:66c0061c91b3b9cf542131148ef7ecbecb2690d48d1612ec386de9d36766058f",
"sha256:6f0c02cbb9691b7c91d5009108f975f8ffeab5dff8f26d62e21c493060eff2a1",
"sha256:71aace0c42d53abe6fc7f726c5d3b60d90f3c5c055a447950ad6ea9cec2e37d9",
"sha256:7d97a4306898b05404a0dcdc32d9709b7d8832c0c542b861d9a826301719794e",
"sha256:7df1e1c05304f26faa49fa752a8c690126cf98b40b91d54e6e9cc3b7d6ffe8b7",
"sha256:8270252effc60b9642b423189a2fe90eb6b59e87cbee54549db3f5562ff8d1b8",
"sha256:867a5ad16892bf20e6c4ea2aab1971f45645ff3102ad29bd84c86027fa99997b",
"sha256:877473e675fdcc113c138813a5dd440da0769a2d81f4d86614e5d62b69497155",
"sha256:8892f89999ffd992208754851e5a052f6b5db70a1e3f7d54b17c5211e37a98c7",
"sha256:9a9845c4c6bb56e508651f005c4aeb0404e518c6f000d5a1123ab077ab769f5c",
"sha256:a1e6e96217a0f72e2b8629e271e1b280c6fa3fe6e59fa8f6701bec14e3354325",
"sha256:a8156e6a7f5e2a0ff0c5b21d6bcb45145efece1909efcbbbf48c56f8da68221d",
"sha256:a9506a7e80bcf6eacfff7f804c0ad5350c8c95b9010e4356a4b36f5322f09abb",
"sha256:af310ec8335016b5e52cae60cda4a4f2a60a788cbb949a4fbea13d441aa5a09e",
"sha256:b0297b1e05fd128d26cc2460c810d42e205d16d76799526dfa8c8ccd50e74959",
"sha256:bf68f4b2b6683e52bec69273562df15af352e5ed25d1b6641e7efddc5951d1a7",
"sha256:d0c1bc2fa9a7285719e5678584f6b92572a5b639d0e471bb8d4b650a1a910920",
"sha256:d4d9d6c1a455d4babd320203b918ccc7fcbefe308615c521062bc2ba1aa4d26e",
"sha256:db1fa631737dab9fa0b37f3979d8d2631e348c3b4e8325d6873c2541d0ae5a48",
"sha256:dd93ea5c0c7f3e25335ab7d22a507b1dc43976e1345508f845efc573d3d779d8",
"sha256:f44e517131a98f7a76696a7b21b164bcb85291cee106a23beccce454e1f433a4",
"sha256:f7ee479e96f7ee350db1cf24afa5685a5899e2b34992fb99e1f7c1b0b758d263"
],
"version": "==5.2.0"
},
"zope.proxy": {
"hashes": [
"sha256:00573dfa755d0703ab84bb23cb6ecf97bb683c34b340d4df76651f97b0bab068",
"sha256:092049280f2848d2ba1b57b71fe04881762a220a97b65288bcb0968bb199ec30",
"sha256:0cbd27b4d3718b5ec74fc65ffa53c78d34c65c6fd9411b8352d2a4f855220cf1",
"sha256:17fc7e16d0c81f833a138818a30f366696653d521febc8e892858041c4d88785",
"sha256:19577dfeb70e8a67249ba92c8ad20589a1a2d86a8d693647fa8385408a4c17b0",
"sha256:207aa914576b1181597a1516e1b90599dc690c095343ae281b0772e44945e6a4",
"sha256:219a7db5ed53e523eb4a4769f13105118b6d5b04ed169a283c9775af221e231f",
"sha256:2b50ea79849e46b5f4f2b0247a3687505d32d161eeb16a75f6f7e6cd81936e43",
"sha256:5903d38362b6c716e66bbe470f190579c530a5baf03dbc8500e5c2357aa569a5",
"sha256:5c24903675e271bd688c6e9e7df5775ac6b168feb87dbe0e4bcc90805f21b28f",
"sha256:5ef6bc5ed98139e084f4e91100f2b098a0cd3493d4e76f9d6b3f7b95d7ad0f06",
"sha256:61b55ae3c23a126a788b33ffb18f37d6668e79a05e756588d9e4d4be7246ab1c",
"sha256:63ddb992931a5e616c87d3d89f5a58db086e617548005c7f9059fac68c03a5cc",
"sha256:6943da9c09870490dcfd50c4909c0cc19f434fa6948f61282dc9cb07bcf08160",
"sha256:6ad40f85c1207803d581d5d75e9ea25327cd524925699a83dfc03bf8e4ba72b7",
"sha256:6b44433a79bdd7af0e3337bd7bbcf53dd1f9b0fa66bf21bcb756060ce32a96c1",
"sha256:6bbaa245015d933a4172395baad7874373f162955d73612f0b66b6c2c33b6366",
"sha256:7007227f4ea85b40a2f5e5a244479f6a6dfcf906db9b55e812a814a8f0e2c28d",
"sha256:74884a0aec1f1609190ec8b34b5d58fb3b5353cf22b96161e13e0e835f13518f",
"sha256:7d25fe5571ddb16369054f54cdd883f23de9941476d97f2b92eb6d7d83afe22d",
"sha256:7e162bdc5e3baad26b2262240be7d2bab36991d85a6a556e48b9dfb402370261",
"sha256:814d62678dc3a30f4aa081982d830b7c342cf230ffc9d030b020cb154eeebf9e",
"sha256:8878a34c5313ee52e20aa50b03138af8d472bae465710fb954d133a9bfd3c38d",
"sha256:a66a0d94e5b081d5d695e66d6667e91e74d79e273eee95c1747717ba9cb70792",
"sha256:a69f5cbf4addcfdf03dda564a671040127a6b7c34cf9fe4973582e68441b63fa",
"sha256:b00f9f0c334d07709d3f73a7cb8ae63c6ca1a90c790a63b5e7effa666ef96021",
"sha256:b6ed71e4a7b4690447b626f499d978aa13197a0e592950e5d7020308f6054698",
"sha256:bdf5041e5851526e885af579d2f455348dba68d74f14a32781933569a327fddf",
"sha256:be034360dd34e62608419f86e799c97d389c10a0e677a25f236a971b2f40dac9",
"sha256:cc8f590a5eed30b314ae6b0232d925519ade433f663de79cc3783e4b10d662ba",
"sha256:cd7a318a15fe6cc4584bf3c4426f092ed08c0fd012cf2a9173114234fe193e11",
"sha256:cf19b5f63a59c20306e034e691402b02055c8f4e38bf6792c23cad489162a642",
"sha256:cfc781ce442ec407c841e9aa51d0e1024f72b6ec34caa8fdb6ef9576d549acf2",
"sha256:dea9f6f8633571e18bc20cad83603072e697103a567f4b0738d52dd0211b4527",
"sha256:e4a86a1d5eb2cce83c5972b3930c7c1eac81ab3508464345e2b8e54f119d5505",
"sha256:e7106374d4a74ed9ff00c46cc00f0a9f06a0775f8868e423f85d4464d2333679",
"sha256:e98a8a585b5668aa9e34d10f7785abf9545fe72663b4bfc16c99a115185ae6a5",
"sha256:f64840e68483316eb58d82c376ad3585ca995e69e33b230436de0cdddf7363f9",
"sha256:f8f4b0a9e6683e43889852130595c8854d8ae237f2324a053cdd884de936aa9b",
"sha256:fc45a53219ed30a7f670a6d8c98527af0020e6fd4ee4c0a8fb59f147f06d816c"
],
"version": "==4.3.5"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==5.4.0"
}
},
"develop": {}

View File

@ -177,7 +177,7 @@ class SyncIntegrationTest {
val emailInput = mDevice.findObject(
UiSelector()
.instance(0)
.className(EditText::class.java)
.className(EditText::class.java),
)
emailInput.waitForExists(TestAssetHelper.waitingTime)
@ -194,7 +194,7 @@ class SyncIntegrationTest {
val passwordInput = mDevice.findObject(
UiSelector()
.instance(0)
.className(EditText::class.java)
.className(EditText::class.java),
)
val passwordValue = javaClass.classLoader!!.getResource("password.txt").readText()

View File

@ -11,8 +11,8 @@ import mozversion
import pytest
import requests
from tps import TPS
from gradlewbuild import GradlewBuild
from .tps import TPS
from .gradlewbuild import GradlewBuild
here = os.path.dirname(__file__)

View File

@ -2,7 +2,7 @@ import logging
import os
import subprocess
from adbrun import ADBrun
from .adbrun import ADBrun
here = os.path.dirname(__file__)
logging.getLogger(__name__).addHandler(logging.NullHandler())
@ -40,4 +40,4 @@ class GradlewBuild(object):
os.chdir(testsPath)
with open(self.log, 'w') as f:
f.write(out)
f.write(str(out))

View File

@ -5,7 +5,6 @@
package org.mozilla.fenix.ui
import androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu
import androidx.test.espresso.IdlingRegistry
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import androidx.test.uiautomator.UiDevice
@ -19,13 +18,14 @@ import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.bookmarkStorage
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.ui.robots.bookmarksMenu
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
@ -45,10 +45,9 @@ class BookmarksTest {
var title: String = "Bookmark title"
var url: String = "https://www.test.com"
}
private var bookmarksListIdlingResource: RecyclerViewIdlingResource? = null
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Rule
@JvmField
@ -61,8 +60,6 @@ class BookmarksTest {
dispatcher = AndroidAssetDispatcher()
start()
}
val settings = activityTestRule.activity.settings()
settings.shouldShowJumpBackInCFR = false
}
@After
@ -74,10 +71,6 @@ class BookmarksTest {
val bookmarks = bookmarksStorage?.getTree(BookmarkRoot.Mobile.id)?.children
bookmarks?.forEach { bookmarksStorage.deleteNode(it.guid) }
}
if (bookmarksListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}
}
@Test
@ -85,17 +78,14 @@ class BookmarksTest {
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(
activityTestRule.activity.findViewById(R.id.bookmark_list),
1
)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
verifyBookmarksMenuView()
verifyAddFolderButton()
verifyCloseButton()
verifyBookmarkTitle("Desktop Bookmarks")
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1),
) {
verifyBookmarksMenuView()
verifyAddFolderButton()
verifyCloseButton()
verifyBookmarkTitle("Desktop Bookmarks")
}
}
}
@ -104,15 +94,15 @@ class BookmarksTest {
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
selectFolder("Desktop Bookmarks")
verifyFolderTitle("Bookmarks Menu")
verifyFolderTitle("Bookmarks Toolbar")
verifyFolderTitle("Other Bookmarks")
verifySignInToSyncButton()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1),
) {
selectFolder("Desktop Bookmarks")
verifyFolderTitle("Bookmarks Menu")
verifyFolderTitle("Bookmarks Toolbar")
verifyFolderTitle("Other Bookmarks")
verifySyncSignInButton()
}
}.clickSingInToSyncButton {
verifyTurnOnSyncToolbarTitle()
}
@ -139,12 +129,12 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
verifyBookmarkedURL(defaultWebPage.url.toString())
verifyBookmarkFavicon(defaultWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
verifyBookmarkedURL(defaultWebPage.url.toString())
verifyBookmarkFavicon(defaultWebPage.url)
}
}
}
@ -153,16 +143,16 @@ class BookmarksTest {
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
clickAddFolderButton()
verifyKeyboardVisible()
addNewFolderName(bookmarksFolderName)
saveNewFolder()
verifyFolderTitle(bookmarksFolderName)
verifyKeyboardHidden()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1),
) {
clickAddFolderButton()
verifyKeyboardVisible()
addNewFolderName(bookmarksFolderName)
saveNewFolder()
verifyFolderTitle(bookmarksFolderName)
verifyKeyboardHidden()
}
}
}
@ -188,9 +178,9 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
}.clickEdit {
verifyEditBookmarksView()
@ -214,9 +204,9 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
}.clickCopy {
verifyCopySnackBarText()
@ -228,7 +218,7 @@ class BookmarksTest {
clickClearButton()
longClickToolbar()
clickPasteText()
verifyPastedToolbarText(defaultWebPage.url.toString())
verifyTypedToolbarText(defaultWebPage.url.toString())
}
}
@ -240,9 +230,9 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
}.clickShare {
verifyShareOverlay()
@ -260,9 +250,9 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
}.clickOpenInNewTab {
verifyTabTrayIsOpened()
@ -270,6 +260,83 @@ class BookmarksTest {
}
}
@Test
fun openAllInTabsTest() {
val webPages = listOf(
TestAssetHelper.getGenericAsset(mockWebServer, 1),
TestAssetHelper.getGenericAsset(mockWebServer, 2),
TestAssetHelper.getGenericAsset(mockWebServer, 3),
TestAssetHelper.getGenericAsset(mockWebServer, 4),
)
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
createFolder("root")
createFolder("sub", "root")
createFolder("empty", "root")
}.closeMenu {
}
browserScreen {
createBookmark(webPages[0].url)
createBookmark(webPages[1].url, "root")
createBookmark(webPages[2].url, "root")
createBookmark(webPages[3].url, "sub")
}.openTabDrawer {
closeTab()
}
browserScreen {
}.openThreeDotMenu {
}.openBookmarks {
}.openThreeDotMenu("root") {
}.clickOpenAllInTabs {
verifyTabTrayIsOpened()
verifyNormalModeSelected()
verifyExistingOpenTabs("Test_Page_2", "Test_Page_3", "Test_Page_4")
// Bookmark that is not under the root folder should not be opened
verifyNoExistingOpenTabs("Test_Page_1")
}
}
@Test
fun openAllInPrivateTabsTest() {
val webPages = listOf(
TestAssetHelper.getGenericAsset(mockWebServer, 1),
TestAssetHelper.getGenericAsset(mockWebServer, 2),
)
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
createFolder("root")
createFolder("sub", "root")
createFolder("empty", "root")
}.closeMenu {
}
browserScreen {
createBookmark(webPages[0].url, "root")
createBookmark(webPages[1].url, "sub")
}.openTabDrawer {
closeTab()
}
browserScreen {
}.openThreeDotMenu {
}.openBookmarks {
}.openThreeDotMenu("root") {
}.clickOpenAllInPrivateTabs {
verifyTabTrayIsOpened()
verifyPrivateModeSelected()
verifyExistingOpenTabs("Test_Page_1", "Test_Page_2")
}
}
@Test
fun openBookmarkInPrivateTabTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -278,9 +345,9 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
}.clickOpenInPrivateTab {
verifyTabTrayIsOpened()
@ -297,11 +364,10 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}.clickDelete {
verifyDeleteSnackBarText()
verifyUndoDeleteSnackBarButton()
@ -317,19 +383,19 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}.clickDelete {
verifyUndoDeleteSnackBarButton()
clickUndoDeleteButton()
verifySnackBarHidden()
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
verifyBookmarkedURL(defaultWebPage.url.toString())
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
verifyBookmarkedURL(defaultWebPage.url.toString())
}
}
}
@ -342,11 +408,11 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(defaultWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
longTapSelectItem(defaultWebPage.url)
}
}
multipleSelectionToolbar {
@ -362,8 +428,6 @@ class BookmarksTest {
@SmokeTest
@Test
fun openSelectionInNewTabTest() {
val settings = activityTestRule.activity.applicationContext.settings()
settings.shouldShowJumpBackInCFR = false
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
browserScreen {
@ -375,12 +439,12 @@ class BookmarksTest {
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(defaultWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
longTapSelectItem(defaultWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
}
multipleSelectionToolbar {
@ -399,12 +463,12 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(defaultWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
longTapSelectItem(defaultWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
}
multipleSelectionToolbar {
@ -425,13 +489,12 @@ class BookmarksTest {
createBookmark(secondWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 3)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 3),
) {
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
}
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
@ -455,13 +518,12 @@ class BookmarksTest {
createBookmark(secondWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 3)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 3),
) {
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
}
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
@ -485,11 +547,11 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapSelectItem(defaultWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
longTapSelectItem(defaultWebPage.url)
}
}
multipleSelectionToolbar {
@ -523,6 +585,8 @@ class BookmarksTest {
confirmDeletion()
verifyDeleteSnackBarText()
verifyFolderTitle("3")
// On some devices we need to wait for the Snackbar to be gone before continuing
TestHelper.waitUntilSnackbarGone()
}.closeMenu {
}
@ -542,27 +606,19 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
createFolder(bookmarksFolderName)
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {
createFolder(bookmarksFolderName)
}
}.openThreeDotMenu(defaultWebPage.title) {
}.clickEdit {
clickParentFolderSelector()
selectFolder(bookmarksFolderName)
navigateUp()
saveEditBookmark()
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
selectFolder(bookmarksFolderName)
verifyBookmarkedURL(defaultWebPage.url.toString())
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}
}
@ -594,12 +650,12 @@ class BookmarksTest {
homeScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list))
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
longTapDesktopFolder("Desktop Bookmarks")
verifySelectDefaultFolderSnackBarText()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list)),
) {
longTapDesktopFolder("Desktop Bookmarks")
verifySelectDefaultFolderSnackBarText()
}
}
}
@ -621,11 +677,10 @@ class BookmarksTest {
createBookmark(defaultWebPage.url)
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 2),
) {}
}.openThreeDotMenu(defaultWebPage.url) {
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}.clickEdit {
clickDeleteInEditModeButton()
cancelDeletion()
@ -639,16 +694,15 @@ class BookmarksTest {
@SmokeTest
@Test
fun undoDeleteBookmarkFolderTest() {
browserScreen {
}.openThreeDotMenu {
}.openBookmarks {
bookmarksListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1)
IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!)
createFolder("My Folder")
verifyFolderTitle("My Folder")
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.bookmark_list), 1),
) {
createFolder("My Folder")
verifyFolderTitle("My Folder")
}
}.openThreeDotMenu("My Folder") {
}.clickDelete {
cancelFolderDeletion()

View File

@ -5,13 +5,10 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestHelper.getStringResource
@ -26,26 +23,14 @@ class BrowsingErrorPagesTest {
private val unwantedSoftwareWarning =
getStringResource(R.string.mozac_browser_errorpages_safe_browsing_unwanted_uri_title)
private val harmfulSiteWarning = getStringResource(R.string.mozac_browser_errorpages_safe_harmful_uri_title)
private val featureSettingsHelper = FeatureSettingsHelper()
@get: Rule
val mActivityTestRule = HomeActivityTestRule()
val mActivityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Rule
@JvmField
val retryTestRule = RetryTestRule(3)
@Before
fun setUp() {
// disabling the jump-back-in pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
featureSettingsHelper.resetAllFeatureFlags()
}
@SmokeTest
@Test
fun blockMalwarePageTest() {

View File

@ -10,11 +10,11 @@ import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.ui.robots.browserScreen
@ -34,23 +34,23 @@ class CollectionTest {
private val firstCollectionName = "testcollection_1"
private val secondCollectionName = "testcollection_2"
private val collectionName = "First Collection"
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val composeTestRule = AndroidComposeTestRule(
HomeActivityIntentTestRule(),
{ it.activity }
)
val composeTestRule =
AndroidComposeTestRule(
HomeActivityIntentTestRule(
isHomeOnboardingDialogEnabled = false,
isJumpBackInCFREnabled = false,
isRecentTabsFeatureEnabled = false,
isRecentlyVisitedFeatureEnabled = false,
isPocketEnabled = false,
isWallpaperOnboardingEnabled = false,
isTCPCFREnabled = false,
),
) { it.activity }
@Before
fun setUp() {
// disabling these features to have better visibility of Collections,
// and to avoid multiple matches on tab items
featureSettingsHelper.setRecentTabsFeatureEnabled(false)
featureSettingsHelper.setPocketEnabled(false)
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.setRecentlyVisitedFeatureEnabled(false)
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
@ -61,9 +61,6 @@ class CollectionTest {
@After
fun tearDown() {
mockWebServer.shutdown()
// resetting modified features enabled setting to default
featureSettingsHelper.resetAllFeatureFlags()
}
@SmokeTest
@ -80,7 +77,6 @@ class CollectionTest {
}.submitQuery(secondWebPage.url.toString()) {
mDevice.waitForIdle()
}.goToHomescreen {
swipeToBottom()
}.clickSaveTabsToCollectionButton {
longClickTab(firstWebPage.title)
selectTab(secondWebPage.title, numOfTabs = 2)
@ -164,7 +160,7 @@ class CollectionTest {
createCollection(
firstTestPage.title,
secondTestPage.title,
collectionName = collectionName
collectionName = collectionName,
)
closeTab()
}
@ -205,10 +201,10 @@ class CollectionTest {
}
}
@SmokeTest
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
@SmokeTest
@Test
fun deleteCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)
@ -231,8 +227,8 @@ class CollectionTest {
}
}
@Test
// open a webpage, and add currently opened tab to existing collection
@Test
fun mainMenuSaveToExistingCollection() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
@ -314,8 +310,9 @@ class CollectionTest {
createCollection(webPage.title, collectionName = firstCollectionName)
verifySnackBarText("Collection saved!")
createCollection(
webPage.title, collectionName = secondCollectionName,
firstCollection = false
webPage.title,
collectionName = secondCollectionName,
firstCollection = false,
)
verifySnackBarText("Collection saved!")
}.closeTabDrawer {
@ -357,7 +354,7 @@ class CollectionTest {
}.openTabDrawer {
createCollection(
testPage.title,
collectionName = collectionName
collectionName = collectionName,
)
closeTab()
}
@ -383,7 +380,7 @@ class CollectionTest {
}.openTabDrawer {
createCollection(
testPage.title,
collectionName = collectionName
collectionName = collectionName,
)
closeTab()
}
@ -400,6 +397,7 @@ class CollectionTest {
}
@Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun selectTabOnLongTapTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
val secondWebPage = getGenericAsset(mockWebServer, 2)
@ -431,6 +429,7 @@ class CollectionTest {
}
@Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun navigateBackInCollectionFlowTest() {
val webPage = getGenericAsset(mockWebServer, 1)
@ -464,6 +463,7 @@ class CollectionTest {
@SmokeTest
@Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun undoDeleteCollectionTest() {
val webPage = getGenericAsset(mockWebServer, 1)
@ -482,7 +482,7 @@ class CollectionTest {
homeScreen {
verifySnackBarText("Collection deleted")
clickUndoCollectionDeletion("UNDO")
clickUndoSnackBarButton()
verifyCollectionIsDisplayed(collectionName, true)
}
}

View File

@ -9,7 +9,6 @@ import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
@ -41,7 +40,7 @@ class ContextMenusTest {
private lateinit var mockWebServer: MockWebServer
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule()
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Rule
@JvmField
@ -73,7 +72,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("Link 1")
longClickLink("Link 1")
verifyLinkContextMenuItems(genericURL.url)
clickContextOpenLinkInNewTab()
verifySnackBarText("New tab opened")
@ -97,7 +96,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("Link 2")
longClickLink("Link 2")
verifyLinkContextMenuItems(genericURL.url)
clickContextOpenLinkInPrivateTab()
verifySnackBarText("New private tab opened")
@ -119,6 +118,23 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickLink("Link 3")
verifyLinkContextMenuItems(genericURL.url)
clickContextCopyLink()
verifySnackBarText("Link copied to clipboard")
}.openNavigationToolbar {
}.visitLinkFromClipboard {
verifyUrl(genericURL.url.toString())
}
}
@Test
fun verifyContextCopyLinkNotDisplayedAfterApplied() {
val pageLinks = TestAssetHelper.getGenericAsset(mockWebServer, 4)
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 3)
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
longClickMatchingText("Link 3")
verifyLinkContextMenuItems(genericURL.url)
clickContextCopyLink()
@ -126,6 +142,11 @@ class ContextMenusTest {
}.openNavigationToolbar {
}.visitLinkFromClipboard {
verifyUrl(genericURL.url.toString())
}.openTabDrawer {
}.openNewTab {
}
navigationToolbar {
verifyClipboardSuggestionsAreDisplayed(shouldBeDisplayed = false)
}
}
@ -139,7 +160,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("Link 1")
longClickLink("Link 1")
verifyLinkContextMenuItems(genericURL.url)
clickContextShareLink(genericURL.url) // verify share intent is matched with associated URL
}
@ -155,7 +176,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("test_link_image")
longClickLink("test_link_image")
verifyLinkImageContextMenuItems(imageResource.url)
clickContextOpenImageNewTab()
verifySnackBarText("New tab opened")
@ -174,7 +195,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("test_link_image")
longClickLink("test_link_image")
verifyLinkImageContextMenuItems(imageResource.url)
clickContextCopyImageLocation()
verifySnackBarText("Link copied to clipboard")
@ -194,7 +215,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("test_link_image")
longClickLink("test_link_image")
verifyLinkImageContextMenuItems(imageResource.url)
clickContextSaveImage()
}
@ -207,7 +228,6 @@ class ContextMenusTest {
}
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun verifyContextMixedVariations() {
val pageLinks =
@ -220,13 +240,13 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(pageLinks.url) {
mDevice.waitForIdle()
longClickMatchingText("Link 1")
longClickLink("Link 1")
verifyLinkContextMenuItems(genericURL.url)
dismissContentContextMenu(genericURL.url)
longClickMatchingText("test_link_image")
longClickLink("test_link_image")
verifyLinkImageContextMenuItems(imageResource.url)
dismissContentContextMenu(imageResource.url)
longClickMatchingText("test_no_link_image")
longClickLink("test_no_link_image")
verifyNoLinkImageContextMenuItems(imageResource.url)
}
}
@ -238,7 +258,7 @@ class ContextMenusTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
longClickMatchingText(genericURL.content)
longClickLink(genericURL.content)
}.clickShareSelectedText {
verifyAndroidShareLayout()
}

View File

@ -0,0 +1,70 @@
/* 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.ui
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.ui.robots.navigationToolbar
/**
* Tests for verifying the new Cookie protection & homescreen feature hints.
* Note: This involves setting the feature flags On for CFRs which are disabled elsewhere.
*
*/
class ContextualHintsTest {
private lateinit var mockWebServer: MockWebServer
@get:Rule
val activityTestRule = HomeActivityTestRule(
isJumpBackInCFREnabled = true,
isTCPCFREnabled = true,
isPocketEnabled = false,
isRecentlyVisitedFeatureEnabled = false,
)
@Before
fun setUp() {
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
@Test
fun jumpBackInCFRTest() {
val genericPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(genericPage.url) {
verifyCookiesProtectionHint()
// One back press to dismiss the TCP hint
mDevice.pressBack()
}.goToHomescreen {
verifyJumpBackInMessage()
}
}
@Test
fun cookieProtectionHintTest() {
val genericPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(genericPage.url) {
verifyCookiesProtectionHint()
}
}
}

View File

@ -12,7 +12,6 @@ import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.getStringResource
@ -22,20 +21,20 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
class CrashReportingTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
private val tabCrashMessage = getStringResource(R.string.tab_crash_title_2)
@get:Rule
val activityTestRule = AndroidComposeTestRule(
HomeActivityIntentTestRule(),
{ it.activity }
)
HomeActivityIntentTestRule(
isPocketEnabled = false,
isJumpBackInCFREnabled = false,
isWallpaperOnboardingEnabled = false,
isTCPCFREnabled = false,
),
) { it.activity }
@Before
fun setUp() {
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.setPocketEnabled(false)
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
@ -46,7 +45,6 @@ class CrashReportingTest {
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
@ -76,7 +74,6 @@ class CrashReportingTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/25029")
@SmokeTest
@Test
fun useAppWhileTabIsCrashedTest() {
@ -122,7 +119,6 @@ class CrashReportingTest {
}.openNewTab {
}.submitQuery(secondWebPage.url.toString()) {
waitForPageToLoad()
verifyPageContent("Page content: 2")
}
navigationToolbar {

View File

@ -14,6 +14,7 @@ import org.junit.Test
import org.mozilla.fenix.IntentReceiverActivity
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.createCustomTabIntent
@ -29,6 +30,7 @@ class CustomTabsTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val customMenuItem = "TestMenuItem"
/* Updated externalLinks.html to v2.0,
changed the hypertext reference to mozilla-mobile.github.io/testapp/downloads for "External link"
*/
@ -40,9 +42,13 @@ class CustomTabsTest {
@get: Rule
val intentReceiverActivityTestRule = ActivityTestRule(
IntentReceiverActivity::class.java, true, false
IntentReceiverActivity::class.java,
true,
false,
)
private val featureSettingsHelper = FeatureSettingsHelperDelegate()
@Before
fun setUp() {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
@ -50,11 +56,16 @@ class CustomTabsTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.apply {
isTCPCFREnabled = false
}.applyFlagUpdates()
}
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@SmokeTest
@ -65,8 +76,8 @@ class CustomTabsTest {
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
externalLinksPWAPage.toUri().toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {
@ -80,12 +91,11 @@ class CustomTabsTest {
@SmokeTest
@Test
fun customTabsSaveLoginTest() {
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
loginPage.toUri().toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {
@ -119,8 +129,8 @@ class CustomTabsTest {
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
customTabPage.url.toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {
@ -137,7 +147,7 @@ class CustomTabsTest {
clickClearButton()
longClickToolbar()
clickPasteText()
verifyPastedToolbarText(customTabPage.url.toString())
verifyTypedToolbarText(customTabPage.url.toString())
}
}
@ -149,8 +159,8 @@ class CustomTabsTest {
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
customTabPage.url.toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {
@ -173,8 +183,8 @@ class CustomTabsTest {
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
customTabPage.toUri().toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {

View File

@ -5,14 +5,11 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -27,10 +24,9 @@ class DownloadFileTypesTest(fileName: String) {
/* Remote test page managed by Mozilla Mobile QA team at https://github.com/mozilla-mobile/testapp */
private val downloadTestPage = "https://storage.googleapis.com/mobile_test_assets/test_app/downloads.html"
private var downloadFile: String = fileName
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityTestRule = HomeActivityIntentTestRule()
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
companion object {
// Creating test data. The test will take each file name as a parameter and run it individually.
@ -44,23 +40,10 @@ class DownloadFileTypesTest(fileName: String) {
"web_icon.png",
"videoSample.webm",
"CSVfile.csv",
"XMLfile.xml"
"XMLfile.xml",
)
}
@Before
fun setUp() {
// disabling the jump-back-in pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
// disabling the PWA CFR on 3rd visit
featureSettingsHelper.disablePwaCFR(true)
}
@After
fun tearDown() {
featureSettingsHelper.resetAllFeatureFlags()
}
@SmokeTest
@Test
fun downloadMultipleFileTypesTest() {

View File

@ -4,23 +4,15 @@
package org.mozilla.fenix.ui
import android.os.Build
import androidx.core.net.toUri
import androidx.test.filters.SdkSuppress
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.runner.permission.PermissionRequester
import androidx.test.uiautomator.UiDevice
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestRule
import org.junit.rules.TestWatcher
import org.junit.runner.Description
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadFromStorage
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.downloadRobot
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -35,38 +27,15 @@ import org.mozilla.fenix.ui.robots.notificationShade
* - Verifies managing downloads inside the Downloads listing.
**/
class DownloadTest {
private lateinit var mDevice: UiDevice
private val featureSettingsHelper = FeatureSettingsHelper()
/* Remote test page managed by Mozilla Mobile QA team at https://github.com/mozilla-mobile/testapp */
private val downloadTestPage = "https://storage.googleapis.com/mobile_test_assets/test_app/downloads.html"
private var downloadFile: String = ""
@get:Rule
val activityTestRule = HomeActivityIntentTestRule()
@get: Rule
// Making sure to grant storage access for this test running on API 28
var watcher: TestRule = object : TestWatcher() {
override fun starting(description: Description) {
if (description.methodName == "pauseResumeCancelDownloadTest") {
PermissionRequester().apply {
addPermissions(
android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
android.Manifest.permission.READ_EXTERNAL_STORAGE
)
requestPermissions()
}
}
}
}
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
// disabling the jump-back-in pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
// disabling the PWA CFR on 3rd visit
featureSettingsHelper.disablePwaCFR(true)
// clear all existing notifications
notificationShade {
mDevice.openNotification()
@ -76,7 +45,6 @@ class DownloadTest {
@After
fun tearDown() {
featureSettingsHelper.resetAllFeatureFlags()
notificationShade {
cancelAllShownNotifications()
}
@ -134,7 +102,6 @@ class DownloadTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@Test
fun pauseResumeCancelDownloadTest() {
@ -162,15 +129,16 @@ class DownloadTest {
}
}
@SmokeTest
@Test
/* Verifies downloads in the Downloads Menu:
/* Verifies downloads in the Downloads Menu:
- downloads appear in the list
- deleting a download from device storage, removes it from the Downloads Menu too
*/
*/
@SmokeTest
@Test
fun manageDownloadsInDownloadsMenuTest() {
// a long filename to verify it's correctly displayed on the prompt and in the Downloads menu
downloadFile = "tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg"
downloadFile =
"tAJwqaWjJsXS8AhzSninBMCfIZbHBGgcc001lx5DIdDwIcfEgQ6vE5Gb5VgAled17DFZ2A7ZDOHA0NpQPHXXFt.svg"
navigationToolbar {
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
@ -186,14 +154,34 @@ class DownloadTest {
waitForDownloadsListToExist()
verifyDownloadedFileName(downloadFile)
verifyDownloadedFileIcon()
openDownloadedFile(downloadFile)
verifyPhotosAppOpens()
deleteDownloadFromStorage()
waitForDownloadsListToExist()
deleteDownloadedFileOnStorage(downloadFile)
}.exitDownloadsManagerToBrowser {
}.openThreeDotMenu {
}.openDownloadsManager {
verifyEmptyDownloadsList()
}
}
@SmokeTest
@Test
fun openDownloadedFileTest() {
downloadFile = "web_icon.png"
navigationToolbar {
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
waitForPageToLoad()
}.clickDownloadLink(downloadFile) {
verifyDownloadPrompt(downloadFile)
}.clickDownload {
verifyDownloadNotificationPopup()
}
browserScreen {
}.openThreeDotMenu {
}.openDownloadsManager {
verifyDownloadedFileName(downloadFile)
openDownloadedFile(downloadFile)
verifyPhotosAppOpens()
mDevice.pressBack()
}
}
}

View File

@ -4,17 +4,19 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.ui.robots.enhancedTrackingProtection
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -33,12 +35,15 @@ import org.mozilla.fenix.ui.robots.settingsSubMenuEnhancedTrackingProtection
* - Verifying Enhanced Tracking Protection site exceptions
*/
class StrictEnhancedTrackingProtectionTest {
class EnhancedTrackingProtectionTest {
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule(
isJumpBackInCFREnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
)
@Before
fun setUp() {
@ -46,14 +51,11 @@ class StrictEnhancedTrackingProtectionTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setStrictETPEnabled()
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
@ -83,8 +85,8 @@ class StrictEnhancedTrackingProtectionTest {
}.openEnhancedTrackingProtectionSubMenu {
switchEnhancedTrackingProtectionToggle()
verifyEnhancedTrackingProtectionOptionsEnabled(false)
}.goBack {
}.goBack { }
exitMenu()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(genericPage.url) { }
@ -107,6 +109,7 @@ class StrictEnhancedTrackingProtectionTest {
@Test
fun testStrictVisitProtectionSheet() {
appContext.settings().setStrictETP()
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingProtectionTest =
TestAssetHelper.getEnhancedTrackingProtectionAsset(mockWebServer)
@ -126,9 +129,9 @@ class StrictEnhancedTrackingProtectionTest {
}
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun testStrictVisitDisableExceptionToggle() {
appContext.settings().setStrictETP()
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingProtectionTest =
TestAssetHelper.getEnhancedTrackingProtectionAsset(mockWebServer)
@ -163,6 +166,7 @@ class StrictEnhancedTrackingProtectionTest {
@Test
fun testStrictVisitSheetDetails() {
appContext.settings().setStrictETP()
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingProtectionTest =
TestAssetHelper.getEnhancedTrackingProtectionAsset(mockWebServer)
@ -176,7 +180,11 @@ class StrictEnhancedTrackingProtectionTest {
navigationToolbar {
}.enterURLAndEnterToBrowser(trackingProtectionTest.url) {
verifyTrackingProtectionWebContent("blocked")
verifyTrackingProtectionWebContent("social blocked")
verifyTrackingProtectionWebContent("ads blocked")
verifyTrackingProtectionWebContent("analytics blocked")
verifyTrackingProtectionWebContent("Fingerprinting blocked")
verifyTrackingProtectionWebContent("Cryptomining blocked")
}
enhancedTrackingProtection {
}.openEnhancedTrackingProtectionSheet {
@ -190,4 +198,76 @@ class StrictEnhancedTrackingProtectionTest {
viewTrackingContentBlockList()
}
}
@SmokeTest
@Test
fun customTrackingProtectionSettingsTest() {
val genericWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingPage = TestAssetHelper.getEnhancedTrackingProtectionAsset(mockWebServer)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openEnhancedTrackingProtectionSubMenu {
verifyEnhancedTrackingProtectionOptionsEnabled()
selectTrackingProtectionOption("Custom")
verifyCustomTrackingProtectionSettings()
}.goBackToHomeScreen {}
navigationToolbar {
// browsing a basic page to allow GV to load on a fresh run
}.enterURLAndEnterToBrowser(genericWebPage.url) {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(trackingPage.url) {
verifyTrackingProtectionWebContent("social blocked")
verifyTrackingProtectionWebContent("ads blocked")
verifyTrackingProtectionWebContent("analytics blocked")
verifyTrackingProtectionWebContent("Fingerprinting blocked")
verifyTrackingProtectionWebContent("Cryptomining blocked")
}
enhancedTrackingProtection {
}.openEnhancedTrackingProtectionSheet {
}.openDetails {
verifyTrackingCookiesBlocked()
verifyCryptominersBlocked()
verifyFingerprintersBlocked()
verifyTrackingContentBlocked()
viewTrackingContentBlockList()
}
}
@SmokeTest
@Test
fun blockCookiesStorageAccessTest() {
// With Standard TrackingProtection settings
val page = mockWebServer.url("pages/cross-site-cookies.html").toString().toUri()
val originSite = "https://mozilla-mobile.github.io"
val currentSite = "http://localhost:${mockWebServer.port}"
navigationToolbar {
}.enterURLAndEnterToBrowser(page) {
}.clickRequestStorageAccessButton {
verifyCrossOriginCookiesPermissionPrompt(originSite, currentSite)
}.clickPagePermissionButton(allow = false) {
verifyPageContent("access denied")
}
}
@SmokeTest
@Test
fun allowCookiesStorageAccessTest() {
// With Standard TrackingProtection settings
val page = mockWebServer.url("pages/cross-site-cookies.html").toString().toUri()
val originSite = "https://mozilla-mobile.github.io"
val currentSite = "http://localhost:${mockWebServer.port}"
navigationToolbar {
}.enterURLAndEnterToBrowser(page) {
}.clickRequestStorageAccessButton {
verifyCrossOriginCookiesPermissionPrompt(originSite, currentSite)
}.clickPagePermissionButton(allow = true) {
verifyPageContent("access granted")
}
}
}

View File

@ -6,7 +6,6 @@ package org.mozilla.fenix.ui
import android.content.Context
import androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu
import androidx.test.espresso.IdlingRegistry
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import kotlinx.coroutines.runBlocking
@ -24,6 +23,7 @@ import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.ui.robots.historyMenu
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.multipleSelectionToolbar
@ -37,11 +37,9 @@ class HistoryTest {
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
private lateinit var mockWebServer: MockWebServer
private lateinit var mDevice: UiDevice
private var historyListIdlingResource: RecyclerViewIdlingResource? = null
private var recentlyClosedTabsListIdlingResource: RecyclerViewIdlingResource? = null
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
@ -65,14 +63,6 @@ class HistoryTest {
runBlocking {
historyStorage.deleteEverything()
}
if (historyListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
}
if (recentlyClosedTabsListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
}
}
@Test
@ -86,9 +76,9 @@ class HistoryTest {
}
}
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
@Test
fun visitedUrlHistoryTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -98,13 +88,14 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
verifyHistoryMenuView()
verifyVisitedTimeTitle()
verifyFirstTestPageTitle("Test_Page_1")
verifyTestPageUrl(firstWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
verifyHistoryMenuView()
verifyVisitedTimeTitle()
verifyFirstTestPageTitle("Test_Page_1")
verifyTestPageUrl(firstWebPage.url)
}
}
}
@ -118,16 +109,61 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
clickDeleteHistoryButton(firstWebPage.url.toString())
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
clickDeleteHistoryButton(firstWebPage.url.toString())
}
verifyDeleteSnackbarText("Deleted")
verifyEmptyHistoryView()
}
}
@Test
fun undoDeleteHistoryItemTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
mDevice.waitForIdle()
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
clickDeleteHistoryButton(firstWebPage.url.toString())
}
verifyUndoDeleteSnackBarButton()
clickUndoDeleteButton()
verifyHistoryItemExists(true, firstWebPage.url.toString())
}
}
@SmokeTest
@Test
fun cancelDeleteAllHistoryTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
mDevice.waitForIdle()
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
clickDeleteAllHistoryButton()
}
verifyDeleteConfirmationMessage()
selectEverythingOption()
cancelDeleteHistory()
verifyHistoryItemExists(true, firstWebPage.url.toString())
}
}
@SmokeTest
@Test
fun deleteAllHistoryTest() {
@ -139,12 +175,13 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
clickDeleteAllHistoryButton()
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
clickDeleteAllHistoryButton()
}
verifyDeleteConfirmationMessage()
selectEverythingOption()
confirmDeleteAllHistory()
verifyDeleteSnackbarText("Browsing data deleted")
verifyEmptyHistoryView()
@ -162,10 +199,11 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
longTapSelectItem(firstWebPage.url)
}
}
multipleSelectionToolbar {
@ -192,11 +230,12 @@ class HistoryTest {
homeScreen { }.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
longTapSelectItem(firstWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
}
multipleSelectionToolbar {
@ -216,11 +255,12 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
longTapSelectItem(firstWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
}
multipleSelectionToolbar {
@ -244,15 +284,15 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 2)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
verifyHistoryItemExists(true, firstWebPage.url.toString())
verifyHistoryItemExists(true, secondWebPage.url.toString())
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 2),
) {
verifyHistoryItemExists(true, firstWebPage.url.toString())
verifyHistoryItemExists(true, secondWebPage.url.toString())
longTapSelectItem(firstWebPage.url)
longTapSelectItem(secondWebPage.url)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
}
multipleSelectionToolbar {
@ -274,10 +314,11 @@ class HistoryTest {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryListExists()
historyListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1)
IdlingRegistry.getInstance().register(historyListIdlingResource!!)
longTapSelectItem(firstWebPage.url)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.history_list), 1),
) {
longTapSelectItem(firstWebPage.url)
}
}
multipleSelectionToolbar {
@ -289,8 +330,8 @@ class HistoryTest {
}
}
@Test
// This test verifies the Recently Closed Tabs List and items
@Test
fun verifyRecentlyClosedTabsListTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -303,11 +344,11 @@ class HistoryTest {
}.openTabDrawer {
}.openRecentlyClosedTabs {
waitForListToExist()
recentlyClosedTabsListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1)
IdlingRegistry.getInstance().register(recentlyClosedTabsListIdlingResource!!)
verifyRecentlyClosedTabsMenuView()
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1),
) {
verifyRecentlyClosedTabsMenuView()
}
verifyRecentlyClosedTabsPageTitle("Test_Page_1")
verifyRecentlyClosedTabsUrl(website.url)
}

View File

@ -4,20 +4,26 @@
package org.mozilla.fenix.ui
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.Until
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Constants.POCKET_RECOMMENDED_STORIES_UTM_PARAM
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.ext.waitNotNull
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
/**
* Tests for verifying the presence of home screen and first-run homescreen elements
@ -30,17 +36,30 @@ class HomeScreenTest {
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private lateinit var firstPocketStoryPublisher: String
@get:Rule
val activityTestRule = HomeActivityTestRule()
@get:Rule(order = 0)
val activityTestRule =
AndroidComposeTestRule(HomeActivityTestRule.withDefaultSettingsOverrides()) { it.activity }
@Rule
@Rule(order = 1)
@JvmField
val retryTestRule = RetryTestRule(3)
@Before
fun setUp() {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
@Test
@ -48,21 +67,26 @@ class HomeScreenTest {
homeScreen { }.dismissOnboarding()
homeScreen {
verifyHomeScreen()
verifyNavigationToolbar()
verifyHomePrivateBrowsingButton()
verifyHomeMenu()
verifyHomeWordmark()
verifyTabButton()
verifyCollectionsHeader()
verifyHomeToolbar()
verifyHomeComponent()
// Verify Top Sites
verifyExistingTopSitesList()
verifyHomePrivateBrowsingButton()
verifyExistingTopSitesTabs("Wikipedia")
verifyExistingTopSitesTabs("Top Articles")
verifyExistingTopSitesTabs("Google")
verifyCollectionsHeader()
verifyNoCollectionsText()
scrollToPocketProvokingStories()
swipePocketProvokingStories()
verifyPocketRecommendedStoriesItems(activityTestRule, 1, 3, 4, 5, 6, 7)
verifyPocketSponsoredStoriesItems(activityTestRule, 2, 8)
verifyDiscoverMoreStoriesButton(activityTestRule, 9)
verifyStoriesByTopicItems()
verifyPoweredByPocket(activityTestRule)
verifyCustomizeHomepageButton(true)
verifyNavigationToolbar()
verifyDefaultSearchEngine("Google")
verifyHomeMenuButton()
verifyTabButton()
verifyTabCounter("0")
}
}
@ -75,11 +99,11 @@ class HomeScreenTest {
verifyHomeScreen()
verifyNavigationToolbar()
verifyHomePrivateBrowsingButton()
verifyHomeMenu()
verifyHomeMenuButton()
verifyHomeWordmark()
verifyTabButton()
verifyPrivateSessionMessage()
verifyHomeToolbar()
verifyNavigationToolbar()
verifyHomeComponent()
}.openCommonMythsLink {
verifyUrl("common-myths-about-private-browsing")
@ -93,15 +117,47 @@ class HomeScreenTest {
verifyHomeScreen()
verifyNavigationToolbar()
verifyHomePrivateBrowsingButton()
verifyHomeMenu()
verifyHomeMenuButton()
verifyHomeWordmark()
verifyTabButton()
verifyPrivateSessionMessage()
verifyHomeToolbar()
verifyNavigationToolbar()
verifyHomeComponent()
}
}
@Test
fun verifyJumpBackInSectionTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 4)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.goToHomescreen {
verifyJumpBackInSectionIsDisplayed()
verifyJumpBackInItemTitle(firstWebPage.title)
verifyJumpBackInItemWithUrl(firstWebPage.url.toString())
verifyJumpBackInShowAllButton()
}.clickJumpBackInShowAllButton {
verifyExistingOpenTabs(firstWebPage.title)
}.closeTabDrawer() {
}
homeScreen {
}.clickJumpBackInItemWithTitle(firstWebPage.title) {
verifyUrl(firstWebPage.url.toString())
clickLinkMatchingText("Link 1")
}.goToHomescreen {
verifyJumpBackInSectionIsDisplayed()
verifyJumpBackInItemTitle(secondWebPage.title)
verifyJumpBackInItemWithUrl(secondWebPage.url.toString())
}.openTabDrawer {
closeTab()
}
homeScreen {
verifyJumpBackInSectionIsNotDisplayed()
}
}
@Test
fun dismissOnboardingUsingSettingsTest() {
homeScreen {
@ -130,8 +186,11 @@ class HomeScreenTest {
@Test
fun dismissOnboardingUsingHelpTest() {
val settings = activityTestRule.activity.applicationContext.settings()
settings.shouldShowJumpBackInCFR = false
activityTestRule.activityRule.applySettingsExceptions {
it.isJumpBackInCFREnabled = false
it.isWallpaperOnboardingEnabled = false
}
homeScreen {
verifyWelcomeHeader()
}.openThreeDotMenu {
@ -142,6 +201,25 @@ class HomeScreenTest {
}
}
@Test
fun dismissOnboardingWithPageLoadTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isJumpBackInCFREnabled = false
it.isWallpaperOnboardingEnabled = false
}
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
homeScreen {
verifyWelcomeHeader()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.goToHomescreen {
verifyExistingTopSitesList()
}
}
@Test
fun toolbarTapDoesntDismissOnboardingTest() {
homeScreen {
@ -155,18 +233,125 @@ class HomeScreenTest {
}
}
@SmokeTest
@Test
fun tapLogoToChangeWallpaperTest() {
fun verifyPocketHomepageStoriesTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
homeScreen {
clickFirefoxLogo()
verifyWallpaperImageApplied(true)
clickFirefoxLogo()
verifyWallpaperImageApplied(true)
clickFirefoxLogo()
verifyWallpaperImageApplied(true)
clickFirefoxLogo()
verifyWallpaperImageApplied(false)
}.dismissOnboarding()
homeScreen {
verifyThoughtProvokingStories(true)
scrollToPocketProvokingStories()
swipePocketProvokingStories()
verifyPocketRecommendedStoriesItems(activityTestRule, 1, 3, 4, 5, 6, 7)
verifyPocketSponsoredStoriesItems(activityTestRule, 2, 8)
verifyDiscoverMoreStoriesButton(activityTestRule, 9)
verifyStoriesByTopic(true)
}.openThreeDotMenu {
}.openCustomizeHome {
clickPocketButton()
}.goBack {
verifyThoughtProvokingStories(false)
verifyStoriesByTopic(false)
}
}
@Test
fun openPocketStoryItemTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
homeScreen {
}.dismissOnboarding()
homeScreen {
verifyThoughtProvokingStories(true)
scrollToPocketProvokingStories()
firstPocketStoryPublisher = getProvokingStoryPublisher(1)
}.clickPocketStoryItem(firstPocketStoryPublisher, 1) {
verifyUrl(POCKET_RECOMMENDED_STORIES_UTM_PARAM)
}
}
@Ignore("Failed, see: https://github.com/mozilla-mobile/fenix/issues/28098")
@Test
fun openPocketDiscoverMoreTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
homeScreen {
}.dismissOnboarding()
homeScreen {
scrollToPocketProvokingStories()
swipePocketProvokingStories()
verifyDiscoverMoreStoriesButton(activityTestRule, 9)
}.clickPocketDiscoverMoreButton(activityTestRule, 9) {
verifyUrl("getpocket.com/explore")
}
}
@Test
fun selectStoriesByTopicItemTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
homeScreen {
}.dismissOnboarding()
homeScreen {
verifyStoriesByTopicItemState(activityTestRule, false, 1)
clickStoriesByTopicItem(activityTestRule, 1)
verifyStoriesByTopicItemState(activityTestRule, true, 1)
}
}
@Test
fun verifyPocketLearnMoreLinkTest() {
activityTestRule.activityRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
homeScreen {
}.dismissOnboarding()
homeScreen {
verifyPoweredByPocket(activityTestRule)
}.clickPocketLearnMoreLink(activityTestRule) {
verifyUrl("mozilla.org/en-US/firefox/pocket")
}
}
@Test
fun verifyCustomizeHomepageTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.goToHomescreen {
}.openCustomizeHomepage {
clickJumpBackInButton()
clickRecentBookmarksButton()
clickRecentSearchesButton()
clickPocketButton()
}.goBack {
verifyCustomizeHomepageButton(false)
}.openThreeDotMenu {
}.openCustomizeHome {
clickJumpBackInButton()
}.goBack {
verifyCustomizeHomepageButton(true)
}
}
}

View File

@ -11,7 +11,6 @@ import mozilla.components.concept.engine.mediasession.MediaSession
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.ext.components
@ -37,7 +36,7 @@ class MediaNotificationTest {
private lateinit var mDevice: UiDevice
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
private lateinit var browserStore: BrowserStore
@Rule
@ -62,7 +61,6 @@ class MediaNotificationTest {
mockWebServer.shutdown()
}
@Ignore("Failing with ANR: https://github.com/mozilla-mobile/fenix/issues/15754")
@Test
fun videoPlaybackSystemNotificationTest() {
val videoTestPage = TestAssetHelper.getVideoPageAsset(mockWebServer)
@ -96,7 +94,6 @@ class MediaNotificationTest {
mDevice.pressBack()
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun mediaSystemNotificationInPrivateModeTest() {
val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer)

View File

@ -4,6 +4,7 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
@ -11,11 +12,14 @@ import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.runWithSystemLocaleChanged
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
import java.util.Locale
/**
* Tests for verifying basic functionality of browser navigation and page related interactions
@ -33,7 +37,7 @@ class NavigationToolbarTest {
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
@ -42,8 +46,6 @@ class NavigationToolbarTest {
dispatcher = AndroidAssetDispatcher()
start()
}
val settings = activityTestRule.activity.settings()
settings.shouldShowJumpBackInCFR = false
}
@After
@ -63,7 +65,7 @@ class NavigationToolbarTest {
}.enterURLAndEnterToBrowser(nextWebPage.url) {
verifyUrl(nextWebPage.url.toString())
}.openThreeDotMenu {
}.goBack {
}.goToPreviousPage {
mDevice.waitForIdle()
verifyUrl(defaultWebPage.url.toString())
}
@ -82,7 +84,7 @@ class NavigationToolbarTest {
mDevice.waitForIdle()
verifyUrl(nextWebPage.url.toString())
}.openThreeDotMenu {
}.goBack {
}.goToPreviousPage {
mDevice.waitForIdle()
verifyUrl(defaultWebPage.url.toString())
}
@ -96,9 +98,49 @@ class NavigationToolbarTest {
}
}
// Swipes the nav bar left/right to switch between tabs
@SmokeTest
@Test
fun swipeToSwitchTabTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.openTabDrawer {
}.openNewTab {
}.submitQuery(secondWebPage.url.toString()) {
swipeNavBarRight(secondWebPage.url.toString())
verifyUrl(firstWebPage.url.toString())
swipeNavBarLeft(firstWebPage.url.toString())
verifyUrl(secondWebPage.url.toString())
}
}
// Because it requires changing system prefs, this test will run only on Debug builds
@Test
fun swipeToSwitchTabInRTLTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
val arabicLocale = Locale("ar", "AR")
runWithSystemLocaleChanged(arabicLocale, activityTestRule) {
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.openTabDrawer {
}.openNewTab {
}.submitQuery(secondWebPage.url.toString()) {
swipeNavBarLeft(secondWebPage.url.toString())
verifyUrl(firstWebPage.url.toString())
swipeNavBarRight(firstWebPage.url.toString())
verifyUrl(secondWebPage.url.toString())
}
}
}
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
@Test
fun visitURLTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -136,4 +178,44 @@ class NavigationToolbarTest {
verifyFindNextInPageResult("1/1")
}.closeFindInPage { }
}
@Test
fun verifySecurePageSecuritySubMenuTest() {
val defaultWebPage = "https://mozilla-mobile.github.io/testapp/loginForm"
val defaultWebPageTitle = "Login_form"
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.toUri()) {
}.openSiteSecuritySheet {
verifyQuickActionSheet(defaultWebPage, true)
openSecureConnectionSubMenu(true)
verifySecureConnectionSubMenu(defaultWebPageTitle, defaultWebPage, true)
}
}
@Test
fun verifyInsecurePageSecuritySubMenuTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openSiteSecuritySheet {
verifyQuickActionSheet(defaultWebPage.url.toString(), false)
openSecureConnectionSubMenu(false)
verifySecureConnectionSubMenu(defaultWebPage.title, defaultWebPage.url.toString(), false)
}
}
@Test
fun verifyClearCookiesFromQuickSettingsTest() {
val helpPageUrl = "mozilla.org"
homeScreen {
}.openThreeDotMenu {
}.openHelp {
}.openSiteSecuritySheet {
clickQuickActionSheetClearSiteData()
verifyClearSiteDataPrompt(helpPageUrl)
}
}
}

View File

@ -0,0 +1,74 @@
/* 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.ui
import android.content.Intent
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import io.mockk.mockk
import mozilla.components.concept.sync.AuthType
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.components.TelemetryAccountObserver
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Experimentation
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.ui.robots.homeScreen
class NimbusEventTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
@get:Rule
val homeActivityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
.withIntent(
Intent().apply {
action = Intent.ACTION_VIEW
},
)
@Rule
@JvmField
val retryTestRule = RetryTestRule(3)
@Before
fun setUp() {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
@Test
fun homeScreenNimbusEventsTest() {
homeScreen { }.dismissOnboarding()
Experimentation.withHelper {
assertTrue(evalJexl("'app_opened'|eventSum('Days', 28, 0) > 0"))
}
}
@Test
fun telemetryAccountObserverTest() {
val observer = TelemetryAccountObserver(appContext)
observer.onAuthenticated(mockk(), AuthType.Signin)
Experimentation.withHelper {
assertTrue(evalJexl("'sync_auth.sign_in'|eventSum('Days', 28, 0) > 0"))
}
}
}

View File

@ -5,13 +5,10 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.After
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestHelper.packageName
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
@ -28,7 +25,7 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
class NoNetworkAccessStartupTests {
@get:Rule
val activityTestRule = HomeActivityTestRule(launchActivity = false)
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides(launchActivity = false)
@After
fun tearDown() {
@ -36,10 +33,10 @@ class NoNetworkAccessStartupTests {
setNetworkEnabled(true)
}
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
// Based on STR from https://github.com/mozilla-mobile/fenix/issues/16886
@Test
fun noNetworkConnectionStartupTest() {
setNetworkEnabled(false)
@ -52,12 +49,10 @@ class NoNetworkAccessStartupTests {
}
}
@Test
// Based on STR from https://github.com/mozilla-mobile/fenix/issues/16886
@Test
fun networkInterruptedFromBrowserToHomeTest() {
val url = "example.com"
val settings = InstrumentationRegistry.getInstrumentation().targetContext.settings()
settings.shouldShowJumpBackInCFR = false
activityTestRule.launchActivity(null)
@ -88,7 +83,6 @@ class NoNetworkAccessStartupTests {
}.refreshPage { }
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun testSignInPageWithNoNetworkConnection() {
setNetworkEnabled(false)
@ -103,7 +97,7 @@ class NoNetworkAccessStartupTests {
verifyUrl(
"firefox.com",
"$packageName:id/mozac_browser_toolbar_url_view",
R.id.mozac_browser_toolbar_url_view
R.id.mozac_browser_toolbar_url_view,
)
}
}

View File

@ -0,0 +1,53 @@
/* 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.ui
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.ui.robots.homeScreen
/**
* Tests for verifying the new onboarding features.
* Note: This involves setting the feature flag On for the onboarding dialog
*
*/
class OnboardingFeaturesTest {
@get:Rule
val activityTestRule = AndroidComposeTestRule(
HomeActivityTestRule(isHomeOnboardingDialogEnabled = true),
) { it.activity }
@SmokeTest
@Test
fun upgradingUsersOnboardingScreensTest() {
homeScreen {
verifyUpgradingUserOnboardingFirstScreen(activityTestRule)
clickGetStartedButton(activityTestRule)
verifyUpgradingUserOnboardingSecondScreen(activityTestRule)
clickSkipButton(activityTestRule)
verifyHomeScreen()
}
}
@Test
fun upgradingUsersOnboardingSignInButtonTest() {
homeScreen {
verifyUpgradingUserOnboardingFirstScreen(activityTestRule)
clickGetStartedButton(activityTestRule)
verifyUpgradingUserOnboardingSecondScreen(activityTestRule)
}.clickUpgradingUserOnboardingSignInButton(activityTestRule) {
verifyTurnOnSyncMenu()
mDevice.pressBack()
}
homeScreen {
verifyHomeScreen()
}
}
}

View File

@ -1,21 +1,19 @@
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.Constants.PackageName.GMAIL_APP
import org.mozilla.fenix.helpers.Constants.PackageName.PHONE_APP
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
import org.mozilla.fenix.ui.robots.customTabScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
import org.mozilla.fenix.ui.robots.pwaScreen
class PwaTest {
private val featureSettingsHelper = FeatureSettingsHelper()
/* Updated externalLinks.html to v2.0,
changed the hypertext reference to mozilla-mobile.github.io/testapp/downloads for "External link"
*/
@ -25,17 +23,7 @@ class PwaTest {
private val shortcutTitle = "TEST_APP"
@get:Rule
val activityTestRule = HomeActivityIntentTestRule()
@Before
fun setUp() {
featureSettingsHelper.disablePwaCFR(true)
}
@After
fun tearDown() {
featureSettingsHelper.resetAllFeatureFlags()
}
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@SmokeTest
@Test
@ -58,10 +46,10 @@ class PwaTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/28212")
@SmokeTest
@Test
fun emailLinkPWATest() {
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPWAPage.toUri()) {
waitForPageToLoad()
@ -78,7 +66,6 @@ class PwaTest {
@SmokeTest
@Test
fun telephoneLinkPWATest() {
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPWAPage.toUri()) {
waitForPageToLoad()
@ -91,4 +78,23 @@ class PwaTest {
assertNativeAppOpens(PHONE_APP, phoneLink)
}
}
@SmokeTest
@Test
fun appLikeExperiencePWATest() {
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPWAPage.toUri()) {
waitForPageToLoad()
verifyNotificationDotOnMainMenu()
}.openThreeDotMenu {
}.clickInstall {
clickAddAutomaticallyButton()
}.openHomeScreenShortcut(shortcutTitle) {
}
pwaScreen {
verifyCustomTabToolbarIsNotDisplayed()
verifyPwaActivityInCurrentTask()
}
}
}

View File

@ -5,7 +5,6 @@
package org.mozilla.fenix.ui
import android.view.View
import androidx.test.espresso.IdlingRegistry
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
@ -18,6 +17,7 @@ import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.helpers.ViewVisibilityIdlingResource
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -34,11 +34,10 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
class ReaderViewTest {
private lateinit var mockWebServer: MockWebServer
private lateinit var mDevice: UiDevice
private var readerViewNotification: ViewVisibilityIdlingResource? = null
private val estimatedReadingTime = "1 - 2 minutes"
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule()
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Rule
@JvmField
@ -56,7 +55,6 @@ class ReaderViewTest {
@After
fun tearDown() {
mockWebServer.shutdown()
IdlingRegistry.getInstance().unregister(readerViewNotification)
}
/**
@ -75,12 +73,12 @@ class ReaderViewTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)
@ -118,12 +116,12 @@ class ReaderViewTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)
@ -143,7 +141,7 @@ class ReaderViewTest {
verifyReaderViewDetected(true)
}.openThreeDotMenu {
verifyReaderViewAppearance(false)
}.close { }
}.closeBrowserMenuToBrowser { }
}
@Test
@ -156,12 +154,12 @@ class ReaderViewTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)
@ -196,12 +194,12 @@ class ReaderViewTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)
@ -242,12 +240,12 @@ class ReaderViewTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)

View File

@ -6,11 +6,10 @@ package org.mozilla.fenix.ui
import android.content.Context
import android.hardware.camera2.CameraManager
import android.os.Build
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import androidx.core.net.toUri
import androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu
import androidx.test.filters.SdkSuppress
import androidx.test.espresso.Espresso.pressBack
import mozilla.components.browser.icons.IconRequest
import mozilla.components.browser.icons.generator.DefaultIconGenerator
import mozilla.components.feature.search.ext.createSearchEngine
@ -23,17 +22,18 @@ import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.Constants.PackageName.ANDROID_SETTINGS
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.Constants.searchEngineCodes
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.SearchDispatcher
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
import org.mozilla.fenix.helpers.TestHelper.denyPermission
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.grantPermission
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.setCustomSearchEngine
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.multipleSelectionToolbar
@ -48,14 +48,20 @@ import org.mozilla.fenix.ui.robots.multipleSelectionToolbar
*/
class SearchTest {
private val featureSettingsHelper = FeatureSettingsHelper()
lateinit var searchMockServer: MockWebServer
lateinit var queryString: String
@get:Rule
val activityTestRule = AndroidComposeTestRule(
HomeActivityTestRule(),
{ it.activity }
)
HomeActivityTestRule(
skipOnboarding = true,
isPocketEnabled = false,
isJumpBackInCFREnabled = false,
isRecentTabsFeatureEnabled = false,
isTCPCFREnabled = false,
isWallpaperOnboardingEnabled = false,
),
) { it.activity }
@Before
fun setUp() {
@ -63,14 +69,11 @@ class SearchTest {
dispatcher = SearchDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.setPocketEnabled(false)
}
@After
fun tearDown() {
searchMockServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
@ -84,7 +87,6 @@ class SearchTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@Test
fun scanButtonDenyPermissionTest() {
@ -106,7 +108,6 @@ class SearchTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@Test
fun scanButtonAllowPermissionTest() {
@ -122,193 +123,236 @@ class SearchTest {
}
@Test
fun shortcutButtonTest() {
val searchEngineURL = "bing.com/search?q=mozilla%20firefox"
fun setDefaultSearchEngineFromShortcutsTest() {
queryString = "firefox"
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
enableShowSearchShortcuts()
}.goBack {
}.goBack {
}.openSearch {
verifySearchBarEmpty()
clickSearchEngineButton(activityTestRule, "Bing")
typeSearch("mozilla")
verifySearchEngineResults(activityTestRule, "mozilla firefox", "Bing")
clickSearchEngineResult(activityTestRule, "mozilla firefox")
}
browserScreen {
waitForPageToLoad()
verifyUrl(searchEngineURL)
}
}
@Test
fun shortcutSearchEngineSettingsTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
enableShowSearchShortcuts()
toggleShowSearchShortcuts()
}.goBack {
}.goBack {
}.openSearch {
scrollToSearchEngineSettings(activityTestRule)
clickSearchEngineSettings(activityTestRule)
verifySearchSettings()
}.clickSearchEngineSettings(activityTestRule) {
changeDefaultSearchEngine("DuckDuckGo")
}
exitMenu()
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
verifyUrl("duckduckgo.com/?q=firefox")
}
}
@Test
fun clearSearchTest() {
queryString = "test"
homeScreen {
}.openSearch {
typeSearch("test")
typeSearch(queryString)
clickClearButton()
verifySearchBarEmpty()
}
}
@Ignore("Failure caused by bugs: https://github.com/mozilla-mobile/fenix/issues/23818")
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@SmokeTest
@Test
fun searchGroupShowsInRecentlyVisitedTest() {
val firstPage = searchMockServer.url("generic1.html").toString()
val secondPage = searchMockServer.url("generic2.html").toString()
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString = "http://localhost:${searchMockServer.port}/searchResults.html?search={searchTerms}"
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery("test search") {
longClickMatchingText("Link 1")
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
longClickMatchingText("Link 2")
snackBarButtonClick()
waitForPageToLoad()
pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
}.goToHomescreen {
verifyJumpBackInSectionIsDisplayed()
verifyCurrentSearchGroupIsDisplayed(true, "test search", 3)
verifyRecentlyVisitedSearchGroupDisplayed(false, "test search", 3)
}.openTabDrawer {
}.openTabFromGroup(firstPage) {
}.openTabDrawer {
}.openTabFromGroup(secondPage) {
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, "test search", 3)
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}
}
@SmokeTest
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@Test
fun noCurrentSearchGroupFromPrivateBrowsingTest() {
fun verifySearchGroupHistoryWithNoDuplicatesTest() {
val firstPageUrl = getGenericAsset(searchMockServer, 1).url
val secondPageUrl = getGenericAsset(searchMockServer, 2).url
val originPageUrl =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search=test%20search".toUri()
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString = "http://localhost:${searchMockServer.port}/searchResults.html?search={searchTerms}"
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery("test search") {
longClickMatchingText("Link 1")
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
pressBack()
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
pressBack()
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
verifyTestPageUrl(firstPageUrl)
verifyTestPageUrl(secondPageUrl)
verifyTestPageUrl(originPageUrl)
}
}
@Ignore("Failing due to known bug, see https://github.com/mozilla-mobile/fenix/issues/23818")
@Test
fun searchGroupGeneratedInTheSameTabTest() {
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
clickLinkMatchingText("Link 1")
waitForPageToLoad()
pressBack()
clickLinkMatchingText("Link 2")
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}
}
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@SmokeTest
@Test
fun noSearchGroupFromPrivateBrowsingTest() {
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInPrivateTab()
longClickMatchingText("Link 2")
longClickLink("Link 2")
clickContextOpenLinkInPrivateTab()
}.goToHomescreen {
verifyCurrentSearchGroupIsDisplayed(false, "test search", 3)
}.openTabDrawer {
}.toggleToPrivateTabs {
}.openTabWithIndex(0) {
}.openTabDrawer {
}.openTabWithIndex(1) {
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
togglePrivateBrowsingModeOnOff()
verifyRecentlyVisitedSearchGroupDisplayed(false, queryString, 3)
}.openThreeDotMenu {
}.openHistory {
verifyHistoryItemExists(false, "3 sites")
}
}
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@SmokeTest
@Test
fun noRecentlyVisitedSearchGroupInPrivateBrowsingTest() {
val firstPage = searchMockServer.url("generic1.html").toString()
val secondPage = searchMockServer.url("generic2.html").toString()
fun deleteItemsFromSearchGroupHistoryTest() {
queryString = "test search"
val firstPageUrl = getGenericAsset(searchMockServer, 1).url
val secondPageUrl = getGenericAsset(searchMockServer, 2).url
// setting our custom mockWebServer search URL
val searchString = "http://localhost:${searchMockServer.port}/searchResults.html?search={searchTerms}"
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.togglePrivateBrowsingMode()
homeScreen {
}.openSearch {
}.submitQuery("test search") {
longClickMatchingText("Link 1")
clickContextOpenLinkInPrivateTab()
longClickMatchingText("Link 2")
clickContextOpenLinkInPrivateTab()
}.openTabDrawer {
}.openTab(firstPage) {
}.openTabDrawer {
}.openTab(secondPage) {
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
homeScreen {
}.togglePrivateBrowsingMode()
verifyRecentlyVisitedSearchGroupDisplayed(false, "test search", 3)
}
}
@Ignore("Failure caused by bugs: https://github.com/mozilla-mobile/fenix/issues/23818")
@SmokeTest
@Test
fun deleteItemsFromSearchGroupsHistoryTest() {
val firstPage = searchMockServer.url("generic1.html").toString()
val secondPage = searchMockServer.url("generic2.html").toString()
// setting our custom mockWebServer search URL
val searchString = "http://localhost:${searchMockServer.port}/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery("test search") {
longClickMatchingText("Link 1")
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
longClickMatchingText("Link 2")
snackBarButtonClick()
waitForPageToLoad()
mDevice.pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
}.openTabDrawer {
}.openTabFromGroup(firstPage) {
}.openTabDrawer {
}.openTabFromGroup(secondPage) {
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, "test search", 3)
}.openRecentlyVisitedSearchGroupHistoryList("test search") {
clickDeleteHistoryButton(firstPage)
longTapSelectItem(secondPage.toUri())
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
clickDeleteHistoryButton(firstPageUrl.toString())
longTapSelectItem(secondPageUrl)
multipleSelectionToolbar {
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
clickMultiSelectionDelete()
@ -317,7 +361,207 @@ class SearchTest {
}
homeScreen {
// checking that the group is removed when only 1 item is left
verifyRecentlyVisitedSearchGroupDisplayed(false, "test search", 1)
verifyRecentlyVisitedSearchGroupDisplayed(false, queryString, 1)
}
}
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@Test
fun deleteSearchGroupFromHistoryTest() {
queryString = "test search"
val firstPageUrl = getGenericAsset(searchMockServer, 1).url
// setting our custom mockWebServer search URL
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
mDevice.pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
clickDeleteAllHistoryButton()
confirmDeleteAllHistory()
verifyDeleteSnackbarText("Group deleted")
verifyHistoryItemExists(false, firstPageUrl.toString())
}.goBack {}
homeScreen {
verifyRecentlyVisitedSearchGroupDisplayed(false, queryString, 3)
}.openThreeDotMenu {
}.openHistory {
verifySearchGroupDisplayed(false, queryString, 3)
verifyEmptyHistoryView()
}
}
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@Test
fun reopenTabsFromSearchGroupTest() {
val firstPageUrl = getGenericAsset(searchMockServer, 1).url
val secondPageUrl = getGenericAsset(searchMockServer, 2).url
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
mDevice.pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
}.openWebsite(firstPageUrl) {
verifyUrl(firstPageUrl.toString())
}.goToHomescreen {
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
longTapSelectItem(firstPageUrl)
longTapSelectItem(secondPageUrl)
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
}
multipleSelectionToolbar {
}.clickOpenNewTab {
verifyNormalModeSelected()
}.closeTabDrawer {}
openActionBarOverflowOrOptionsMenu(activityTestRule.activity)
multipleSelectionToolbar {
}.clickOpenPrivateTab {
verifyPrivateModeSelected()
}
}
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
@Test
fun sharePageFromASearchGroupTest() {
val firstPageUrl = getGenericAsset(searchMockServer, 1).url
queryString = "test search"
// setting our custom mockWebServer search URL
val searchString =
"http://localhost:${searchMockServer.port}/pages/searchResults.html?search={searchTerms}"
val customSearchEngine = createSearchEngine(
name = "TestSearchEngine",
url = searchString,
icon = DefaultIconGenerator().generate(appContext, IconRequest(searchString)).bitmap,
)
setCustomSearchEngine(customSearchEngine)
// Performs a search and opens 2 dummy search results links to create a search group
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
longClickLink("Link 1")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
mDevice.pressBack()
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
waitForPageToLoad()
}.openTabDrawer {
}.openTabsListThreeDotMenu {
}.closeAllTabs {
verifyRecentlyVisitedSearchGroupDisplayed(true, queryString, 3)
}.openRecentlyVisitedSearchGroupHistoryList(queryString) {
longTapSelectItem(firstPageUrl)
}
multipleSelectionToolbar {
clickShareHistoryButton()
verifyShareOverlay()
verifyShareTabFavicon()
verifyShareTabTitle()
verifyShareTabUrl()
}
}
// Default search code for Google-US
@Test
fun defaultSearchCodeGoogleUS() {
queryString = "firefox"
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
verifyUrl(searchEngineCodes["Google"]!!)
}
}
// Default search code for Bing-US
@Test
fun defaultSearchCodeBingUS() {
queryString = "firefox"
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
changeDefaultSearchEngine("Bing")
}
exitMenu()
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
verifyUrl(searchEngineCodes["Bing"]!!)
}
}
// Default search code for DuckDuckGo-US
@Test
fun defaultSearchCodeDuckDuckGoUS() {
queryString = "firefox"
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
changeDefaultSearchEngine("DuckDuckGo")
}
exitMenu()
homeScreen {
}.openSearch {
}.submitQuery(queryString) {
verifyUrl(searchEngineCodes["DuckDuckGo"]!!)
}
}
}

View File

@ -10,10 +10,8 @@ import androidx.test.uiautomator.UiSelector
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RetryTestRule
@ -53,8 +51,8 @@ class SettingsAboutTest {
mockWebServer.shutdown()
}
@Test
// Walks through settings menu and sub-menus to ensure all items are present
@Test
fun settingsAboutItemsTest() {
// ABOUT
homeScreen {
@ -70,6 +68,10 @@ class SettingsAboutTest {
// ABOUT
@Test
fun verifyRateOnGooglePlayRedirect() {
activityIntentTestRule.applySettingsExceptions {
it.isTCPCFREnabled = false
}
homeScreen {
}.openThreeDotMenu {
}.openSettings {
@ -81,11 +83,12 @@ class SettingsAboutTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/25355")
@Test
fun verifyAboutFirefoxPreview() {
val settings = activityIntentTestRule.activity.settings()
settings.shouldShowJumpBackInCFR = false
activityIntentTestRule.applySettingsExceptions {
it.isJumpBackInCFREnabled = false
it.isTCPCFREnabled = false
}
homeScreen {
}.openThreeDotMenu {
}.openSettings {

View File

@ -5,7 +5,6 @@
package org.mozilla.fenix.ui
import android.view.View
import androidx.test.espresso.IdlingRegistry
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
@ -19,6 +18,7 @@ import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.TestAssetHelper.getEnhancedTrackingProtectionAsset
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.helpers.ViewVisibilityIdlingResource
import org.mozilla.fenix.ui.robots.addonsMenu
import org.mozilla.fenix.ui.robots.homeScreen
@ -30,11 +30,9 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
*/
class SettingsAddonsTest {
private lateinit var mockWebServer: MockWebServer
private var addonsListIdlingResource: RecyclerViewIdlingResource? = null
private var addonContainerIdlingResource: ViewVisibilityIdlingResource? = null
@get:Rule
val activityTestRule = HomeActivityIntentTestRule()
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
@ -47,14 +45,6 @@ class SettingsAddonsTest {
@After
fun tearDown() {
mockWebServer.shutdown()
if (addonsListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(addonsListIdlingResource!!)
}
if (addonContainerIdlingResource != null) {
IdlingRegistry.getInstance().unregister(addonContainerIdlingResource!!)
}
}
// Walks through settings add-ons menu to ensure all items are present
@ -66,10 +56,11 @@ class SettingsAddonsTest {
verifyAdvancedHeading()
verifyAddons()
}.openAddonsManagerMenu {
addonsListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.add_ons_list), 1)
IdlingRegistry.getInstance().register(addonsListIdlingResource!!)
verifyAddonsItems()
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.add_ons_list), 1),
) {
verifyAddonsItems()
}
}
}
@ -81,14 +72,14 @@ class SettingsAddonsTest {
homeScreen {}
.openThreeDotMenu {}
.openAddonsManagerMenu {
addonsListIdlingResource =
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(
activityTestRule.activity.findViewById(R.id.add_ons_list),
1
)
IdlingRegistry.getInstance().register(addonsListIdlingResource!!)
clickInstallAddon(addonName)
IdlingRegistry.getInstance().unregister(addonsListIdlingResource!!)
1,
),
) {
clickInstallAddon(addonName)
}
verifyAddonPermissionPrompt(addonName)
cancelInstallAddon()
clickInstallAddon(addonName)
@ -111,20 +102,20 @@ class SettingsAddonsTest {
verifyAddonInstallCompleted(addonName, activityTestRule)
closeAddonInstallCompletePrompt()
}.openDetailedMenuForAddon(addonName) {
addonContainerIdlingResource = ViewVisibilityIdlingResource(
activityTestRule.activity.findViewById(R.id.addon_container),
View.VISIBLE
)
IdlingRegistry.getInstance().register(addonContainerIdlingResource!!)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityTestRule.activity.findViewById(R.id.addon_container),
View.VISIBLE,
),
) {}
}.removeAddon {
IdlingRegistry.getInstance().unregister(addonContainerIdlingResource!!)
verifyAddonCanBeInstalled(addonName)
}
}
// Installs uBlock add-on and checks that the app doesn't crash while loading pages with trackers
@SmokeTest
@Test
// Installs uBlock add-on and checks that the app doesn't crash while loading pages with trackers
fun noCrashWithAddonInstalledTest() {
// setting ETP to Strict mode to test it works with add-ons
activityTestRule.activity.settings().setStrictETP()

View File

@ -13,11 +13,9 @@ import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_PLAY_SERVICES
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -31,10 +29,12 @@ class SettingsAdvancedTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule()
val activityIntentTestRule = HomeActivityIntentTestRule(
isPocketEnabled = false,
isTCPCFREnabled = false,
)
@Before
fun setUp() {
@ -43,18 +43,15 @@ class SettingsAdvancedTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setPocketEnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
// Walks through settings menu and sub-menus to ensure all items are present
@Test
fun settingsAboutItemsTest() {
// ADVANCED
homeScreen {
@ -70,12 +67,11 @@ class SettingsAdvancedTest {
}
}
// Assumes Play Store is installed and enabled
@SmokeTest
@Test
// Assumes Play Store is installed and enabled
fun openLinkInAppTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 3)
val playStoreUrl = "play.google.com/store/apps/details?id=org.mozilla.fenix"
homeScreen {
}.openThreeDotMenu {
@ -90,7 +86,7 @@ class SettingsAdvancedTest {
mDevice.waitForIdle()
clickLinkMatchingText("Mozilla Playstore link")
mDevice.waitForIdle()
assertNativeAppOpens(GOOGLE_PLAY_SERVICES, playStoreUrl)
TestHelper.assertPlayStoreOpens()
}
}
}

View File

@ -4,19 +4,39 @@
package org.mozilla.fenix.ui
import android.content.res.Configuration
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.FenixApplication
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestAssetHelper.getLoremIpsumAsset
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
import org.mozilla.fenix.helpers.TestHelper.getStringResource
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.helpers.TestHelper.runWithSystemLocaleChanged
import org.mozilla.fenix.ui.SettingsBasicsTest.CreditCard.MOCK_CREDIT_CARD_NUMBER
import org.mozilla.fenix.ui.SettingsBasicsTest.CreditCard.MOCK_EXPIRATION_MONTH
import org.mozilla.fenix.ui.SettingsBasicsTest.CreditCard.MOCK_EXPIRATION_YEAR
import org.mozilla.fenix.ui.SettingsBasicsTest.CreditCard.MOCK_LAST_CARD_DIGITS
import org.mozilla.fenix.ui.SettingsBasicsTest.CreditCard.MOCK_NAME_ON_CARD
import org.mozilla.fenix.ui.robots.checkTextSizeOnWebsite
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
import org.mozilla.fenix.ui.util.FRENCH_LANGUAGE_HEADER
import org.mozilla.fenix.ui.util.FRENCH_SYSTEM_LOCALE_OPTION
import org.mozilla.fenix.ui.util.FR_SETTINGS
import org.mozilla.fenix.ui.util.ROMANIAN_LANGUAGE_HEADER
import java.time.LocalDate
import java.util.Locale
/**
* Tests for verifying the General section of the Settings menu
@ -25,10 +45,17 @@ import org.mozilla.fenix.ui.robots.homeScreen
class SettingsBasicsTest {
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
object CreditCard {
const val MOCK_CREDIT_CARD_NUMBER = "5555555555554444"
const val MOCK_LAST_CARD_DIGITS = "4444"
const val MOCK_NAME_ON_CARD = "Mastercard"
const val MOCK_EXPIRATION_MONTH = "February"
val MOCK_EXPIRATION_YEAR = (LocalDate.now().year + 1).toString()
}
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule()
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
@ -36,27 +63,11 @@ class SettingsBasicsTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
// resetting modified features enabled setting to default
featureSettingsHelper.resetAllFeatureFlags()
}
private fun getUiTheme(): Boolean {
val mode =
activityIntentTestRule.activity.resources?.configuration?.uiMode?.and(Configuration.UI_MODE_NIGHT_MASK)
return when (mode) {
Configuration.UI_MODE_NIGHT_YES -> true // dark theme is set
Configuration.UI_MODE_NIGHT_NO -> false // dark theme is not set, using light theme
else -> false // default option is light theme
}
}
@Test
@ -78,21 +89,6 @@ class SettingsBasicsTest {
}
}
@Test
fun changeThemeSetting() {
// Goes through the settings and changes the default search engine, then verifies it changes.
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
verifyThemes()
selectDarkMode()
verifyDarkThemeApplied(getUiTheme())
selectLightMode()
verifyLightThemeApplied(getUiTheme())
}
}
@Test
fun changeAccessibiltySettings() {
// Goes through the settings and changes the default text on a webpage, then verifies if the text has changed.
@ -122,4 +118,179 @@ class SettingsBasicsTest {
verifyMenuItemsAreDisabled()
}
}
@SmokeTest
@Test
fun verifyAddressAutofillTest() {
val addressFormPage =
TestAssetHelper.getAddressFormAsset(mockWebServer)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openAutofillSubMenu {
clickAddAddressButton()
fillAndSaveAddress(
"Mozilla",
"Fenix",
"Firefox",
"Harrison Street",
"San Francisco",
"Alaska",
"94105",
"United States",
"555-5555",
"foo@bar.com",
)
}.goBack {
}.goBack {
}
navigationToolbar {
}.enterURLAndEnterToBrowser(addressFormPage.url) {
clickStreetAddressTextBox()
clickSelectAddressButton()
clickAddressSuggestion("Harrison Street")
verifyAutofilledAddress("Harrison Street")
}
}
@SmokeTest
@Test
fun deleteSavedAddressTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openAutofillSubMenu {
clickAddAddressButton()
fillAndSaveAddress(
"Mozilla",
"Fenix",
"Firefox",
"Harrison Street",
"San Francisco",
"Alaska",
"94105",
"United States",
"555-5555",
"foo@bar.com",
)
clickManageAddressesButton()
clickSavedAddress("Mozilla")
clickDeleteAddressButton()
clickCancelDeleteAddressButton()
clickDeleteAddressButton()
clickConfirmDeleteAddressButton()
verifyAddAddressButton()
}
}
@SmokeTest
@Test
fun verifyCreditCardAutofillTest() {
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openAutofillSubMenu {
clickAddCreditCardButton()
fillAndSaveCreditCard(MOCK_CREDIT_CARD_NUMBER, MOCK_NAME_ON_CARD, MOCK_EXPIRATION_MONTH, MOCK_EXPIRATION_YEAR)
// Opening Manage saved cards to dismiss here the Secure your credit prompt
clickManageSavedCardsButton()
clickSecuredCreditCardsLaterButton()
}.goBackToAutofillSettings {
}.goBack {
}.goBack {
}
navigationToolbar {
}.enterURLAndEnterToBrowser(creditCardFormPage.url) {
clickCardNumberTextBox()
clickSelectCreditCardButton()
clickCreditCardSuggestion(MOCK_LAST_CARD_DIGITS)
verifyAutofilledCreditCard(MOCK_CREDIT_CARD_NUMBER)
}
}
@SmokeTest
@Test
fun deleteSavedCreditCardTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openAutofillSubMenu {
clickAddCreditCardButton()
fillAndSaveCreditCard(MOCK_CREDIT_CARD_NUMBER, MOCK_NAME_ON_CARD, MOCK_EXPIRATION_MONTH, MOCK_EXPIRATION_YEAR)
clickManageSavedCardsButton()
clickSecuredCreditCardsLaterButton()
clickSavedCreditCard()
clickDeleteCreditCardButton()
clickConfirmDeleteCreditCardButton()
verifyAddCreditCardsButton()
}
}
@SmokeTest
@Test
fun switchLanguageTest() {
val enLanguageHeaderText = getStringResource(R.string.preferences_language)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openLanguageSubMenu {
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(
activityIntentTestRule.activity.findViewById(R.id.locale_list),
2,
),
) {
selectLanguage("Romanian")
verifyLanguageHeaderIsTranslated(ROMANIAN_LANGUAGE_HEADER)
selectLanguage("Français")
verifyLanguageHeaderIsTranslated(FRENCH_LANGUAGE_HEADER)
selectLanguage(FRENCH_SYSTEM_LOCALE_OPTION)
verifyLanguageHeaderIsTranslated(enLanguageHeaderText)
}
}
}
@Test
fun searchInLanguagesListTest() {
val systemLocaleDefault = getStringResource(R.string.default_locale_text)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openLanguageSubMenu {
verifyLanguageListIsDisplayed()
openSearchBar()
typeInSearchBar("French")
verifySearchResultsContains(systemLocaleDefault)
clearSearchBar()
typeInSearchBar("French")
selectLanguageSearchResult("Français")
verifyLanguageHeaderIsTranslated(FRENCH_LANGUAGE_HEADER)
// Add this step when https://github.com/mozilla-mobile/fenix/issues/26733 is fixed
// verifyLanguageListIsDisplayed()
}
}
// Because it requires changing system prefs, this test will run only on Debug builds
@Ignore("Failing due to app translation bug, see: https://github.com/mozilla-mobile/fenix/issues/26729")
@Test
fun frenchSystemLocaleTest() {
val frenchLocale = Locale("fr", "FR")
runWithSystemLocaleChanged(frenchLocale, activityIntentTestRule) {
mDevice.waitForIdle(waitingTimeLong)
homeScreen {
}.openThreeDotMenu {
}.openSettings(localizedText = FR_SETTINGS) {
}.openLanguageSubMenu(localizedText = FRENCH_LANGUAGE_HEADER) {
verifyLanguageHeaderIsTranslated(FRENCH_LANGUAGE_HEADER)
verifySelectedLanguage(FRENCH_SYSTEM_LOCALE_OPTION)
}
}
}
}

View File

@ -0,0 +1,122 @@
package org.mozilla.fenix.ui
import android.content.res.Configuration
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
class SettingsCustomizeTest {
private lateinit var mockWebServer: MockWebServer
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
private fun getUiTheme(): Boolean {
val mode =
activityIntentTestRule.activity.resources?.configuration?.uiMode?.and(Configuration.UI_MODE_NIGHT_MASK)
return when (mode) {
Configuration.UI_MODE_NIGHT_YES -> true // dark theme is set
Configuration.UI_MODE_NIGHT_NO -> false // dark theme is not set, using light theme
else -> false // default option is light theme
}
}
@Test
fun changeThemeSettingTest() {
// Goes through the settings and changes the default search engine, then verifies it changes.
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
verifyThemes()
selectDarkMode()
verifyDarkThemeApplied(getUiTheme())
selectLightMode()
verifyLightThemeApplied(getUiTheme())
}
}
@Test
fun setToolbarPositionTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
verifyToolbarPositionPreference("Bottom")
clickTopToolbarToggle()
verifyToolbarPositionPreference("Top")
}.goBack {
}.goBack {
verifyToolbarPosition(defaultPosition = false)
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
clickBottomToolbarToggle()
verifyToolbarPositionPreference("Bottom")
exitMenu()
}
homeScreen {
verifyToolbarPosition(defaultPosition = true)
}
}
@Test
fun swipeToolbarGesturePreferenceOffTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
verifySwipeToolbarGesturePrefState(true)
clickSwipeToolbarToSwitchTabToggle()
verifySwipeToolbarGesturePrefState(false)
exitMenu()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.openTabDrawer {
}.openNewTab {
}.submitQuery(secondWebPage.url.toString()) {
swipeNavBarRight(secondWebPage.url.toString())
verifyUrl(secondWebPage.url.toString())
swipeNavBarLeft(secondWebPage.url.toString())
verifyUrl(secondWebPage.url.toString())
}
}
@Test
fun pullToRefreshPreferenceTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openCustomizeSubMenu {
verifyPullToRefreshGesturePrefState(isEnabled = true)
clickPullToRefreshToggle()
verifyPullToRefreshGesturePrefState(isEnabled = false)
}
}
}

View File

@ -7,10 +7,10 @@ package org.mozilla.fenix.ui
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.Rule
import org.junit.Before
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -44,8 +44,8 @@ class SettingsDeveloperToolsTest {
mockWebServer.shutdown()
}
@Test
// Walks through settings developer tools menu and sub-menus to ensure all items are present
@Test
fun settingsDeveloperToolsItemsTest() {
homeScreen {
}.openThreeDotMenu {

View File

@ -7,14 +7,16 @@ package org.mozilla.fenix.ui
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.openAppFromExternalLink
import org.mozilla.fenix.helpers.TestHelper.restartApp
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
@ -26,10 +28,9 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
*/
class SettingsHomepageTest {
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule(skipOnboarding = true)
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
@Rule
@JvmField
@ -41,15 +42,83 @@ class SettingsHomepageTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
// resetting modified features enabled setting to default
featureSettingsHelper.resetAllFeatureFlags()
@Test
fun verifyHomepageSettingsTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openHomepageSubMenu {
verifyHomePageView()
}
}
@Test
fun verifyShortcutOptionTest() {
// en-US defaults
val defaultTopSites = arrayOf(
"Top Articles",
"Wikipedia",
"Google",
)
homeScreen {
defaultTopSites.forEach { item ->
verifyExistingTopSitesTabs(item)
}
}.openThreeDotMenu {
}.openCustomizeHome {
clickShortcutsButton()
}.goBack {
defaultTopSites.forEach { item ->
verifyNotExistingTopSitesList(item)
}
}
}
@Test
fun verifyRecentlyVisitedOptionTest() {
activityIntentTestRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
}
val genericURL = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.goToHomescreen {
verifyRecentlyVisitedSectionIsDisplayed()
}.openThreeDotMenu {
}.openCustomizeHome {
clickRecentlyVisited()
}.goBack {
verifyRecentlyVisitedSectionIsNotDisplayed()
}
}
@Test
fun verifyPocketOptionTest() {
activityIntentTestRule.applySettingsExceptions {
it.isRecentTabsFeatureEnabled = false
it.isRecentlyVisitedFeatureEnabled = false
}
val genericURL = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.goToHomescreen {
verifyPocketSectionIsDisplayed()
}.openThreeDotMenu {
}.openCustomizeHome {
clickPocketButton()
}.goBack {
verifyPocketSectionIsNotDisplayed()
}
}
@SmokeTest
@ -113,19 +182,6 @@ class SettingsHomepageTest {
fun startOnLastTabTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openHomepageSubMenu {
clickStartOnHomepageButton()
}
restartApp(activityIntentTestRule)
homeScreen {
verifyHomeScreen()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.goToHomescreen {
@ -141,13 +197,39 @@ class SettingsHomepageTest {
}
}
@Test
fun ignoreStartOnHomeWhenLaunchedByExternalLinkTest() {
val genericPage = getGenericAsset(mockWebServer, 1)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openHomepageSubMenu {
clickStartOnHomepageButton()
}.goBack {}
with(activityIntentTestRule) {
finishActivity()
mDevice.waitForIdle()
this.applySettingsExceptions {
it.isTCPCFREnabled = false
}
openAppFromExternalLink(genericPage.url.toString())
}
browserScreen {
verifyPageContent(genericPage.content)
}
}
@SmokeTest
@Test
@Ignore("Intermittent test: https://github.com/mozilla-mobile/fenix/issues/26559")
fun setWallpaperTest() {
val wallpapers = listOf(
"Wallpaper Item: amethyst",
"Wallpaper Item: cerulean",
"Wallpaper Item: sunrise"
"Wallpaper Item: sunrise",
)
for (wallpaper in wallpapers) {

View File

@ -13,19 +13,23 @@ import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.generateRandomString
import org.mozilla.fenix.helpers.TestHelper.getStringResource
import org.mozilla.fenix.helpers.TestHelper.openAppFromExternalLink
import org.mozilla.fenix.helpers.TestHelper.restartApp
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
import org.mozilla.fenix.ui.robots.addToHomeScreen
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
@ -42,23 +46,20 @@ class SettingsPrivacyTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val pageShortcutName = "TestShortcut"
private val featureSettingsHelper = FeatureSettingsHelper()
private val pageShortcutName = generateRandomString(5)
@get:Rule
val activityTestRule = HomeActivityIntentTestRule()
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
@Before
fun setUp() {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
appContext.settings().userOptOutOfReEngageCookieBannerDialog = true
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.disablePwaCFR(true)
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
val autofillManager: AutofillManager =
appContext.getSystemService(AutofillManager::class.java)
@ -71,8 +72,8 @@ class SettingsPrivacyTest {
mockWebServer.shutdown()
}
@Test
// Walks through settings privacy menu and sub-menus to ensure all items are present
@Test
fun settingsPrivacyItemsTest() {
homeScreen {
}.openThreeDotMenu {
@ -102,7 +103,6 @@ class SettingsPrivacyTest {
verifyEnhancedTrackingProtectionProtectionExceptionsSubMenuItems()
}.goBack {
}.goBack {
// SITE PERMISSIONS
verifySitePermissionsButton()
}.openSettingsSubMenuSitePermissions {
@ -114,54 +114,46 @@ class SettingsPrivacyTest {
verifyNavigationToolBarHeader("Autoplay")
verifySitePermissionsAutoPlaySubMenuItems()
}.goBack {
// SITE PERMISSIONS CAMERA
}.openCamera {
verifyNavigationToolBarHeader("Camera")
verifySitePermissionsCommonSubMenuItems()
verifyToggleNameToON("3. Toggle Camera to ON")
}.goBack {
// SITE PERMISSIONS LOCATION
}.openLocation {
verifyNavigationToolBarHeader("Location")
verifySitePermissionsCommonSubMenuItems()
verifyToggleNameToON("3. Toggle Location to ON")
}.goBack {
// SITE PERMISSIONS MICROPHONE
}.openMicrophone {
verifyNavigationToolBarHeader("Microphone")
verifySitePermissionsCommonSubMenuItems()
verifyToggleNameToON("3. Toggle Microphone to ON")
}.goBack {
// SITE PERMISSIONS NOTIFICATION
}.openNotification {
verifyNavigationToolBarHeader("Notification")
verifySitePermissionsNotificationSubMenuItems()
}.goBack {
// SITE PERMISSIONS PERSISTENT STORAGE
}.openPersistentStorage {
verifyNavigationToolBarHeader("Persistent Storage")
verifySitePermissionsPersistentStorageSubMenuItems()
}.goBack {
// SITE PERMISSIONS EXCEPTIONS
}.openExceptions {
verifyNavigationToolBarHeader()
verifySitePermissionsExceptionSubMenuItems()
}.goBack {
}.goBack {
// DELETE BROWSING DATA
verifyDeleteBrowsingDataButton()
}.openSettingsSubMenuDeleteBrowsingData {
verifyNavigationToolBarHeader()
verifyDeleteBrowsingDataSubMenuItems()
}.goBack {
// DELETE BROWSING DATA ON QUIT
verifyDeleteBrowsingDataOnQuitButton()
verifyDeleteBrowsingDataOnQuitState("Off")
@ -169,13 +161,11 @@ class SettingsPrivacyTest {
verifyNavigationToolBarHeader()
verifyDeleteBrowsingDataOnQuitSubMenuItems()
}.goBack {
// NOTIFICATIONS
verifyNotificationsButton()
}.openSettingsSubMenuNotifications {
verifySystemNotificationsView()
}.goBack {
// DATA COLLECTION
verifyDataCollectionButton()
}.openSettingsSubMenuDataCollection {
@ -241,8 +231,6 @@ class SettingsPrivacyTest {
@Test
fun neverSaveLoginFromPromptTest() {
val saveLoginTest = TestAssetHelper.getSaveLoginAsset(mockWebServer)
val settings = activityTestRule.activity.settings()
settings.shouldShowJumpBackInCFR = false
navigationToolbar {
}.enterURLAndEnterToBrowser(saveLoginTest.url) {
@ -393,11 +381,8 @@ class SettingsPrivacyTest {
}
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun launchLinksInPrivateToggleOffStateDoesntChangeTest() {
val settings = activityTestRule.activity.applicationContext.settings()
settings.shouldShowJumpBackInCFR = false
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
setOpenLinksInPrivateOn()
@ -446,10 +431,10 @@ class SettingsPrivacyTest {
}
}
// Verifies that you can go to System settings and change app's permissions from inside the app
@SmokeTest
@Test
@SdkSuppress(minSdkVersion = 29)
// Verifies that you can go to System settings and change app's permissions from inside the app
fun redirectToAppPermissionsSystemSettingsTest() {
homeScreen {
}.openThreeDotMenu {
@ -591,16 +576,16 @@ class SettingsPrivacyTest {
@SmokeTest
@Test
fun deleteDeleteBrowsingHistoryDataTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
fun deleteBrowsingHistoryAndSiteDataTest() {
val storageWritePage = getStorageTestAsset(mockWebServer, "storage_write.html").url
val storageCheckPage = getStorageTestAsset(mockWebServer, "storage_check.html").url
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
mDevice.waitForIdle()
}.enterURLAndEnterToBrowser(storageWritePage) {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(secondWebPage.url) {
mDevice.waitForIdle()
}.enterURLAndEnterToBrowser(storageCheckPage) {
verifyPageContent("Session storage has value")
verifyPageContent("Local storage has value")
}.openThreeDotMenu {
}.openSettings {
}.openSettingsSubMenuDeleteBrowsingData {
@ -612,15 +597,79 @@ class SettingsPrivacyTest {
clickDeleteBrowsingDataButton()
confirmDeletionAndAssertSnackbar()
verifyBrowsingHistoryDetails("0")
}.goBack {
verifyGeneralHeading()
}.goBack {
exitMenu()
}
navigationToolbar {
}.openThreeDotMenu {
}.openHistory {
verifyEmptyHistoryView()
mDevice.pressBack()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(storageCheckPage) {
verifyPageContent("Session storage empty")
verifyPageContent("Local storage empty")
}
}
@SmokeTest
@Test
fun deleteCookiesTest() {
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val cookiesTestPage = getStorageTestAsset(mockWebServer, "storage_write.html").url
// Browsing a generic page to allow GV to load on a fresh run
navigationToolbar {
}.enterURLAndEnterToBrowser(genericPage.url) {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(cookiesTestPage) {
verifyPageContent("No cookies set")
clickSetCookiesButton()
verifyPageContent("user=android")
}.openThreeDotMenu {
}.openSettings {
}.openSettingsSubMenuDeleteBrowsingData {
selectOnlyCookiesCheckBox()
clickDeleteBrowsingDataButton()
confirmDeletionAndAssertSnackbar()
exitMenu()
}
browserScreen {
}.openThreeDotMenu {
}.refreshPage {
verifyPageContent("No cookies set")
}
}
@SmokeTest
@Test
fun deleteCachedFilesTest() {
val pocketTopArticles = getStringResource(R.string.pocket_pinned_top_articles)
homeScreen {
verifyExistingTopSitesTabs(pocketTopArticles)
}.openTopSiteTabWithTitle(pocketTopArticles) {
waitForPageToLoad()
}.openTabDrawer {
}.openNewTab {
}.submitQuery("about:cache") {
// disabling wifi to prevent downloads in the background
setNetworkEnabled(enabled = false)
}.openThreeDotMenu {
}.openSettings {
}.openSettingsSubMenuDeleteBrowsingData {
selectOnlyCachedFilesCheckBox()
clickDeleteBrowsingDataButton()
confirmDeletionAndAssertSnackbar()
exitMenu()
}
browserScreen {
}.openThreeDotMenu {
}.refreshPage {
verifyNetworkCacheIsEmpty("memory")
verifyNetworkCacheIsEmpty("disk")
}
setNetworkEnabled(enabled = true)
}
@SmokeTest

View File

@ -7,24 +7,28 @@ import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.SearchDispatcher
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.setTextToClipBoard
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
import org.mozilla.fenix.ui.util.ARABIC_LANGUAGE_HEADER
class SettingsSearchTest {
private lateinit var mockWebServer: MockWebServer
private lateinit var searchMockServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityTestRule = AndroidComposeTestRule(
HomeActivityIntentTestRule()
HomeActivityIntentTestRule.withDefaultSettingsOverrides(),
) { it.activity }
@Before
@ -33,15 +37,11 @@ class SettingsSearchTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
// resetting modified features enabled setting to default
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
@ -53,6 +53,11 @@ class SettingsSearchTest {
verifySearchToolbar()
verifyDefaultSearchEngineHeader()
verifySearchEngineList()
verifyShowSearchSuggestions()
verifyShowSearchShortcuts()
verifySearchBrowsingHistory()
verifySearchBookmarks()
verifyShowClipboardSuggestionsDefault()
}
}
@ -70,6 +75,27 @@ class SettingsSearchTest {
}
}
@Test
fun toggleSearchAutocomplete() {
homeScreen {
}.openSearch {
typeSearch("mo")
verifyTypedToolbarText("monster.com")
typeSearch("moz")
verifyTypedToolbarText("mozilla.org")
}.dismissSearchBar {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
toggleAutocomplete()
}.goBack {
}.goBack {
}.openSearch {
typeSearch("moz")
verifyTypedToolbarText("moz")
}
}
@Test
fun toggleSearchBookmarksAndHistoryTest() {
// Bookmarks 2 websites, toggles the bookmarks and history search settings off,
@ -98,8 +124,9 @@ class SettingsSearchTest {
}.openSearch {
typeSearch("test")
expandSearchSuggestionsList()
verifySearchEngineSuggestionResults(activityTestRule, "Test_Page_1")
verifySearchEngineSuggestionResults(activityTestRule, "Test_Page_2")
verifyFirefoxSuggestResults(activityTestRule, "Firefox Suggest")
verifyFirefoxSuggestResults(activityTestRule, "Test_Page_1")
verifyFirefoxSuggestResults(activityTestRule, "Test_Page_2")
}.dismissSearchBar {
}.openThreeDotMenu {
}.openSettings {
@ -115,14 +142,15 @@ class SettingsSearchTest {
}.openSearch {
typeSearch("test")
expandSearchSuggestionsList()
verifyNoSuggestionsAreDisplayed(activityTestRule, "Firefox Suggest")
verifyNoSuggestionsAreDisplayed(activityTestRule, "Test_Page_1")
verifyNoSuggestionsAreDisplayed(activityTestRule, "Test_Page_2")
}
}
// Ads a new search engine from the list of custom engines
@SmokeTest
@Test
// Ads a new search engine from the list of custom engines
fun addPredefinedSearchEngineTest() {
val searchEngine = "Reddit"
@ -146,9 +174,9 @@ class SettingsSearchTest {
}
}
// Verifies setting as default a customized search engine name and URL
@SmokeTest
@Test
// Verifies setting as default a customized search engine name and URL
fun editCustomSearchEngineTest() {
searchMockServer = MockWebServer().apply {
dispatcher = SearchDispatcher()
@ -182,14 +210,13 @@ class SettingsSearchTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/23817")
@SmokeTest
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
// Goes through the settings and changes the search suggestion toggle, then verifies it changes.
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/23817")
@SmokeTest
@Test
fun toggleSearchSuggestionsTest() {
homeScreen {
}.openSearch {
typeSearch("mozilla")
@ -198,7 +225,48 @@ class SettingsSearchTest {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
disableShowSearchSuggestions()
toggleShowSearchSuggestions()
}.goBack {
}.goBack {
}.openSearch {
typeSearch("mozilla")
verifyNoSuggestionsAreDisplayed(activityTestRule, "mozilla firefox")
}
}
// Tests the "Don't allow" option from private mode search suggestions onboarding dialog
@Test
fun blockSearchSuggestionsInPrivateModeOnboardingTest() {
homeScreen {
togglePrivateBrowsingModeOnOff()
}.openSearch {
typeSearch("mozilla")
verifyAllowSuggestionsInPrivateModeDialog()
denySuggestionsInPrivateMode()
verifyNoSuggestionsAreDisplayed(activityTestRule, "mozilla firefox")
}.dismissSearchBar {
togglePrivateBrowsingModeOnOff()
}.openSearch {
typeSearch("mozilla")
verifySearchEngineSuggestionResults(activityTestRule, "mozilla firefox")
}
}
// Tests the "Allow" option from private mode search suggestions onboarding dialog
@Test
fun allowSearchSuggestionsInPrivateModeOnboardingTest() {
homeScreen {
togglePrivateBrowsingModeOnOff()
}.openSearch {
typeSearch("mozilla")
verifyAllowSuggestionsInPrivateModeDialog()
allowSuggestionsInPrivateMode()
verifySearchEngineSuggestionResults(activityTestRule, "mozilla firefox")
}.dismissSearchBar {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
toggleShowSuggestionsInPrivateSessions()
}.goBack {
}.goBack {
}.openSearch {
@ -226,4 +294,194 @@ class SettingsSearchTest {
verifyVoiceSearchButtonVisibility(false)
}
}
@Test
fun toggleShowClipboardSuggestionsTest() {
val link = "https://www.mozilla.org/en-US/"
setTextToClipBoard(appContext, link)
homeScreen {
}.openNavigationToolbar {
verifyClipboardSuggestionsAreDisplayed(link, true)
}.visitLinkFromClipboard {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
verifyShowClipboardSuggestionsDefault()
toggleClipboardSuggestion()
exitMenu()
}
homeScreen {
}.openNavigationToolbar {
verifyClipboardSuggestionsAreDisplayed(link, false)
}
}
// Expected for en-us defaults
@Test
fun undoDeleteSearchEngineTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
verifyEngineListContains("Bing")
openEngineOverflowMenu("Bing")
clickDeleteSearchEngine()
clickUndoSnackBarButton()
verifyEngineListContains("Bing")
}
}
// Expected for en-us defaults
@Test
fun deleteDefaultSearchEngineTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
verifyEngineListContains("Google")
verifyDefaultSearchEngine("Google")
openEngineOverflowMenu("Google")
clickDeleteSearchEngine()
verifyEngineListDoesNotContain("Google")
verifyDefaultSearchEngine("Bing")
}
}
// Expected for en-us defaults
@Test
fun deleteAllSearchEnginesTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
deleteMultipleSearchEngines(
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"eBay",
)
verifyDefaultSearchEngine("Wikipedia")
verifyThreeDotButtonIsNotDisplayed("Wikipedia")
openAddSearchEngineMenu()
verifyAddSearchEngineListContains(
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"eBay",
)
}
}
// Expected for en-us defaults
@Test
fun changeSearchEnginesBasedOnTextTest() {
homeScreen {
}.openSearch {
typeSearch("D")
verifySearchEnginePrompt(activityTestRule, "DuckDuckGo")
clickSearchEnginePrompt(activityTestRule, "DuckDuckGo")
}.submitQuery("firefox") {
verifyUrl("duckduckgo.com/?q=firefox")
}
}
// Expected for app language set to Arabic
@Test
fun verifySearchEnginesWithRTLLocale() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
toggleShowSearchShortcuts()
}.goBack {
}.openLanguageSubMenu {
TestHelper.registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(
activityTestRule.activity.findViewById(R.id.locale_list),
2,
),
) {
selectLanguage("Arabic")
verifyLanguageHeaderIsTranslated(ARABIC_LANGUAGE_HEADER)
}
}
exitMenu()
homeScreen {
}.openSearch {
verifyTranslatedFocusedNavigationToolbar("ابحث أو أدخِل عنوانا")
verifySearchEngineShortcuts(
activityTestRule,
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"ويكيبيديا (ar)",
)
changeDefaultSearchEngine(activityTestRule, "ويكيبيديا (ar)")
}.submitQuery("firefox") {
verifyUrl("ar.m.wikipedia.org")
}
}
// Expected for en-us defaults
@Test
fun toggleSearchEnginesShortcutListTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
verifyShowSearchEnginesToggleState(false)
toggleShowSearchShortcuts()
verifyShowSearchEnginesToggleState(true)
}
exitMenu()
homeScreen {
}.openSearch {
verifySearchEngineShortcuts(
activityTestRule,
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"eBay",
"Wikipedia",
)
scrollToSearchEngineSettings(activityTestRule)
}.clickSearchEngineSettings(activityTestRule) {
toggleShowSearchShortcuts()
verifyShowSearchEnginesToggleState(false)
}
exitMenu()
homeScreen {
}.openSearch {
verifySearchEngineShortcutsAreNotDisplayed(
activityTestRule,
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"eBay",
"Wikipedia",
)
clickSearchEngineShortcutButton()
verifySearchEngineShortcuts(
activityTestRule,
"Google",
"Bing",
"Amazon.com",
"DuckDuckGo",
"eBay",
"Wikipedia",
)
}
}
}

View File

@ -7,10 +7,10 @@ package org.mozilla.fenix.ui
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.Rule
import org.junit.Before
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -43,9 +43,9 @@ class SettingsSyncTest {
mockWebServer.shutdown()
}
// Walks through settings sync menu and sub-menus to ensure all items are present
@Ignore("This is a stub test, ignore for now")
@Test
// Walks through settings sync menu and sub-menus to ensure all items are present
fun settingsSyncItemsTest() {
// SYNC

View File

@ -7,10 +7,10 @@ package org.mozilla.fenix.ui
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.Rule
import org.junit.Before
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -43,9 +43,9 @@ class SettingsTest {
mockWebServer.shutdown()
}
// Walks through settings menu and sub-menus to ensure all items are present
@Ignore("This is a stub test, ignore for now")
@Test
// Walks through settings menu and sub-menus to ensure all items are present
fun settingsMenusItemsTest() {
// SYNC

View File

@ -12,17 +12,13 @@ import android.os.Build
import androidx.core.net.toUri
import androidx.test.filters.SdkSuppress
import androidx.test.rule.GrantPermissionRule
import kotlinx.coroutines.runBlocking
import org.junit.After
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.components.PermissionStorage
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.MockLocationUpdatesRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestHelper.appContext
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -35,36 +31,29 @@ class SitePermissionsTest {
/* Test page created and handled by the Mozilla mobile test-eng team */
private val testPage = "https://mozilla-mobile.github.io/testapp/permissions"
private val testPageSubstring = "https://mozilla-mobile.github.io:443"
private val featureSettingsHelper = FeatureSettingsHelper()
private val cameraManager = appContext.getSystemService(Context.CAMERA_SERVICE) as CameraManager
private val micManager = appContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule(
isJumpBackInCFREnabled = false,
isPWAsPromptEnabled = false,
isTCPCFREnabled = false,
isDeleteSitePermissionsEnabled = true,
)
@get:Rule
val grantPermissionRule: GrantPermissionRule = GrantPermissionRule.grant(
Manifest.permission.RECORD_AUDIO,
Manifest.permission.CAMERA
Manifest.permission.CAMERA,
Manifest.permission.ACCESS_COARSE_LOCATION,
)
@Before
fun setUp() {
// disabling the new homepage pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.deleteSitePermissions(true)
}
@get: Rule
val mockLocationUpdatesRule = MockLocationUpdatesRule()
@After
fun tearDown() {
// Clearing all permission data after each test to avoid overlapping data
val applicationContext: Context = activityTestRule.activity.applicationContext
val permissionStorage = PermissionStorage(applicationContext)
runBlocking {
permissionStorage.deleteAllSitePermissions()
}
}
@get: Rule
val retryTestRule = RetryTestRule(3)
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@ -85,7 +74,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@Test
fun rememberBlockAudioVideoPermissionChoiceTest() {
@ -109,7 +97,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@SmokeTest
@Test
fun rememberAllowAudioVideoPermissionChoiceTest() {
@ -133,7 +120,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun microphonePermissionChoiceOnEachRequestTest() {
assumeTrue(micManager.microphones.isNotEmpty())
@ -151,7 +137,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun rememberBlockMicrophonePermissionChoiceTest() {
assumeTrue(micManager.microphones.isNotEmpty())
@ -173,7 +158,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun rememberAllowMicrophonePermissionChoiceTest() {
assumeTrue(micManager.microphones.isNotEmpty())
@ -195,7 +179,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun cameraPermissionChoiceOnEachRequestTest() {
assumeTrue(cameraManager.cameraIdList.isNotEmpty())
@ -213,7 +196,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun rememberBlockCameraPermissionChoiceTest() {
assumeTrue(cameraManager.cameraIdList.isNotEmpty())
@ -235,7 +217,6 @@ class SitePermissionsTest {
}
}
@SdkSuppress(maxSdkVersion = Build.VERSION_CODES.P, codeName = "P")
@Test
fun rememberAllowCameraPermissionChoiceTest() {
assumeTrue(cameraManager.cameraIdList.isNotEmpty())
@ -284,20 +265,20 @@ class SitePermissionsTest {
}
}
@Ignore("Needs mocking location for Firebase - to do: https://github.com/mozilla-mobile/mobile-test-eng/issues/585")
@Test
fun allowLocationPermissionsTest() {
mockLocationUpdatesRule.setMockLocation()
navigationToolbar {
}.enterURLAndEnterToBrowser(testPage.toUri()) {
}.clickGetLocationButton {
verifyLocationPermissionPrompt(testPageSubstring)
}.clickPagePermissionButton(true) {
verifyPageContent("longitude")
verifyPageContent("latitude")
verifyPageContent("${mockLocationUpdatesRule.latitude}")
verifyPageContent("${mockLocationUpdatesRule.longitude}")
}
}
@Ignore("Needs mocking location for Firebase - to do: https://github.com/mozilla-mobile/mobile-test-eng/issues/585")
@Test
fun blockLocationPermissionsTest() {
navigationToolbar {

View File

@ -9,7 +9,6 @@ package org.mozilla.fenix.ui
import android.view.View
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import androidx.core.net.toUri
import androidx.test.espresso.IdlingRegistry
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.rule.ActivityTestRule
import androidx.test.uiautomator.UiDevice
@ -18,7 +17,6 @@ import mozilla.components.concept.engine.mediasession.MediaSession
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.IntentReceiverActivity
@ -26,8 +24,8 @@ import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Constants
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP
import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
import org.mozilla.fenix.helpers.RetryTestRule
@ -36,20 +34,16 @@ import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.helpers.TestHelper.appName
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
import org.mozilla.fenix.helpers.TestHelper.createCustomTabIntent
import org.mozilla.fenix.helpers.TestHelper.scrollToElementByText
import org.mozilla.fenix.helpers.TestHelper.generateRandomString
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
import org.mozilla.fenix.helpers.ViewVisibilityIdlingResource
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.customTabScreen
import org.mozilla.fenix.ui.robots.enhancedTrackingProtection
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
import org.mozilla.fenix.ui.robots.notificationShade
import org.mozilla.fenix.ui.robots.openEditURLView
import org.mozilla.fenix.ui.robots.searchScreen
import org.mozilla.fenix.ui.util.FRENCH_LANGUAGE_HEADER
import org.mozilla.fenix.ui.util.FRENCH_SYSTEM_LOCALE_OPTION
import org.mozilla.fenix.ui.util.ROMANIAN_LANGUAGE_HEADER
import org.mozilla.fenix.ui.util.STRING_ONBOARDING_TRACKING_PROTECTION_HEADER
/**
* Test Suite that contains a part of the Smoke and Sanity tests defined in TestRail:
@ -62,28 +56,24 @@ import org.mozilla.fenix.ui.util.STRING_ONBOARDING_TRACKING_PROTECTION_HEADER
class SmokeTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private var awesomeBar: ViewVisibilityIdlingResource? = null
private var addonsListIdlingResource: RecyclerViewIdlingResource? = null
private var recentlyClosedTabsListIdlingResource: RecyclerViewIdlingResource? = null
private var readerViewNotification: ViewVisibilityIdlingResource? = null
private var bookmarksListIdlingResource: RecyclerViewIdlingResource? = null
private var localeListIdlingResource: RecyclerViewIdlingResource? = null
private val customMenuItem = "TestMenuItem"
private lateinit var browserStore: BrowserStore
private val featureSettingsHelper = FeatureSettingsHelper()
private val featureSettingsHelper = FeatureSettingsHelperDelegate()
@get:Rule
@get:Rule(order = 0)
val activityTestRule = AndroidComposeTestRule(
HomeActivityIntentTestRule(),
{ it.activity }
{ it.activity },
)
@get: Rule
@get: Rule(order = 1)
val intentReceiverActivityTestRule = ActivityTestRule(
IntentReceiverActivity::class.java, true, false
IntentReceiverActivity::class.java,
true,
false,
)
@Rule
@Rule(order = 2)
@JvmField
val retryTestRule = RetryTestRule(3)
@ -94,7 +84,11 @@ class SmokeTest {
browserStore = activityTestRule.activity.components.core.store
// disabling the new homepage pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
featureSettingsHelper.apply {
isJumpBackInCFREnabled = false
isTCPCFREnabled = false
isWallpaperOnboardingEnabled = false
}.applyFlagUpdates()
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
@ -107,30 +101,6 @@ class SmokeTest {
fun tearDown() {
mockWebServer.shutdown()
if (awesomeBar != null) {
IdlingRegistry.getInstance().unregister(awesomeBar!!)
}
if (addonsListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(addonsListIdlingResource!!)
}
if (recentlyClosedTabsListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
}
if (bookmarksListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(bookmarksListIdlingResource!!)
}
if (readerViewNotification != null) {
IdlingRegistry.getInstance().unregister(readerViewNotification)
}
if (localeListIdlingResource != null) {
IdlingRegistry.getInstance().unregister(localeListIdlingResource)
}
// resetting modified features enabled setting to default
featureSettingsHelper.resetAllFeatureFlags()
}
@ -139,46 +109,24 @@ class SmokeTest {
@Test
fun firstRunScreenTest() {
homeScreen {
verifyHomeScreen()
verifyNavigationToolbar()
verifyHomePrivateBrowsingButton()
verifyHomeMenu()
verifyHomeWordmark()
verifyWelcomeHeader()
// Sign in to Firefox
verifyStartSyncHeader()
verifyAccountsSignInButton()
// Always-on privacy
scrollToElementByText(STRING_ONBOARDING_TRACKING_PROTECTION_HEADER)
verifyAutomaticPrivacyHeader()
verifyAutomaticPrivacyText()
// Choose your theme
verifyChooseThemeHeader()
verifyChooseThemeText()
verifyDarkThemeDescription()
verifyDarkThemeToggle()
verifyLightThemeDescription()
verifyLightThemeToggle()
// Pick your toolbar placement
verifyTakePositionHeader()
verifyTakePositionElements()
// Your privacy
verifyYourPrivacyHeader()
verifyYourPrivacyText()
verifyPrivacyNoticeButton()
// Start Browsing
verifyStartBrowsingButton()
verifyHomeScreenAppBarItems()
verifyHomeScreenWelcomeItems()
verifyChooseYourThemeCard(
isDarkThemeChecked = false,
isLightThemeChecked = false,
isAutomaticThemeChecked = true,
)
verifyToolbarPlacementCard(isBottomChecked = true, isTopChecked = false)
verifySignInToSyncCard()
verifyPrivacyProtectionCard(isStandardChecked = true, isStrictChecked = false)
verifyPrivacyNoticeCard()
verifyStartBrowsingSection()
verifyNavigationToolbarItems("0")
}
}
@Test
// Verifies the functionality of the onboarding Start Browsing button
@Test
fun startBrowsingButtonTest() {
homeScreen {
verifyStartBrowsingButton()
@ -187,7 +135,6 @@ class SmokeTest {
}
}
@Test
/* Verifies the nav bar:
- opening a web page
- the existence of nav bar items
@ -195,6 +142,7 @@ class SmokeTest {
- the tab drawer button
- opening a new search and dismissing the nav bar
*/
@Test
fun verifyBasicNavigationToolbarFunctionality() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -214,21 +162,22 @@ class SmokeTest {
}
}
@Test
// Verifies the list of items in a tab's 3 dot menu
@Test
fun verifyPageMainMenuItemsTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
waitForPageToLoad()
}.openThreeDotMenu {
verifyPageThreeDotMainMenuItems()
verifyPageThreeDotMainMenuItems(isRequestDesktopSiteEnabled = false)
}
}
// Could be removed when more smoke tests from the History category are added
@Test
// Verifies the History menu opens from a tab's 3 dot menu
@Test
fun openMainMenuHistoryItemTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -241,8 +190,8 @@ class SmokeTest {
}
// Could be removed when more smoke tests from the Bookmarks category are added
@Test
// Verifies the Bookmarks menu opens from a tab's 3 dot menu
@Test
fun openMainMenuBookmarksItemTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -254,8 +203,8 @@ class SmokeTest {
}
}
@Test
// Verifies the Add-ons menu opens from a tab's 3 dot menu
@Test
fun openMainMenuAddonsTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -263,20 +212,17 @@ class SmokeTest {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
}.openAddonsManagerMenu {
addonsListIdlingResource =
RecyclerViewIdlingResource(
activityTestRule.activity.findViewById(R.id.add_ons_list),
1
)
IdlingRegistry.getInstance().register(addonsListIdlingResource!!)
verifyAddonsItems()
IdlingRegistry.getInstance().unregister(addonsListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.add_ons_list), 1),
) {
verifyAddonsItems()
}
}
}
@Test
// Verifies the Synced tabs menu or Sync Sign In menu opens from a tab's 3 dot menu.
// The test is assuming we are NOT signed in.
@Test
fun openMainMenuSyncItemTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -289,10 +235,10 @@ class SmokeTest {
}
}
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
// Verifies the Settings menu opens from a tab's 3 dot menu
@Test
fun openMainMenuSettingsItemTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -304,8 +250,8 @@ class SmokeTest {
}
}
@Test
// Verifies the Find in page option in a tab's 3 dot menu
@Test
fun openMainMenuFindInPageTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -317,10 +263,11 @@ class SmokeTest {
}
}
@Test
// Verifies the Add to home screen option in a tab's 3 dot menu
@Test
fun mainMenuAddToHomeScreenTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val shortcutTitle = generateRandomString(5)
homeScreen {
}.openNavigationToolbar {
@ -335,18 +282,18 @@ class SmokeTest {
}.openThreeDotMenu {
expandMenu()
}.openAddToHomeScreen {
verifyShortcutNameField("Test_Page_1")
addShortcutName("Test Page")
verifyShortcutTextFieldTitle("Test_Page_1")
addShortcutName(shortcutTitle)
clickAddShortcutButton()
clickAddAutomaticallyButton()
}.openHomeScreenShortcut("Test Page") {
}.openHomeScreenShortcut(shortcutTitle) {
verifyUrl(website.url.toString())
verifyTabCounter("1")
}
}
@Test
// Verifies the Add to collection option in a tab's 3 dot menu
@Test
fun openMainMenuAddToCollectionTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -358,8 +305,8 @@ class SmokeTest {
}
}
@Test
// Verifies the Bookmark button in a tab's 3 dot menu
@Test
fun mainMenuBookmarkButtonTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -371,23 +318,23 @@ class SmokeTest {
}
}
@Test
// Device or AVD requires a Google Services Android OS installation with Play Store installed
// Verifies the Open in app button when an app is installed
@Test
fun mainMenuOpenInAppTest() {
val playStoreUrl = "play.google.com/store/apps/details?id=org.mozilla.fenix"
val youtubeURL = "https://m.youtube.com/user/mozilla?cbrd=1"
navigationToolbar {
}.enterURLAndEnterToBrowser(playStoreUrl.toUri()) {
}.enterURLAndEnterToBrowser(youtubeURL.toUri()) {
verifyNotificationDotOnMainMenu()
}.openThreeDotMenu {
}.clickOpenInApp {
assertNativeAppOpens(Constants.PackageName.GOOGLE_PLAY_SERVICES, playStoreUrl)
assertNativeAppOpens(YOUTUBE_APP, youtubeURL)
}
}
@Test
// Verifies the Desktop site toggle in a tab's 3 dot menu
@Test
fun mainMenuDesktopSiteTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -400,8 +347,8 @@ class SmokeTest {
}
}
@Test
// Verifies the Share button in a tab's 3 dot menu
@Test
fun mainMenuShareButtonTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -415,8 +362,8 @@ class SmokeTest {
}
}
@Test
// Verifies the refresh button in a tab's 3 dot menu
@Test
fun mainMenuRefreshButtonTest() {
val refreshWebPage = TestAssetHelper.getRefreshAsset(mockWebServer)
@ -430,40 +377,8 @@ class SmokeTest {
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/25345")
@Test
fun customTrackingProtectionSettingsTest() {
val genericWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val trackingPage = TestAssetHelper.getEnhancedTrackingProtectionAsset(mockWebServer)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openEnhancedTrackingProtectionSubMenu {
verifyEnhancedTrackingProtectionOptionsEnabled()
selectTrackingProtectionOption("Custom")
verifyCustomTrackingProtectionSettings()
}.goBackToHomeScreen {}
navigationToolbar {
// browsing a basic page to allow GV to load on a fresh run
}.enterURLAndEnterToBrowser(genericWebPage.url) {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(trackingPage.url) {}
enhancedTrackingProtection {
}.openEnhancedTrackingProtectionSheet {
}.openDetails {
verifyTrackingCookiesBlocked()
verifyCryptominersBlocked()
verifyFingerprintersBlocked()
verifyTrackingContentBlocked()
viewTrackingContentBlockList()
}
}
@Test
// Verifies changing the default engine from the Search Shortcut menu
@Test
fun selectSearchEnginesShortcutTest() {
val enginesList = listOf("DuckDuckGo", "Google", "Amazon.com", "Wikipedia", "Bing", "eBay")
@ -481,26 +396,8 @@ class SmokeTest {
}
}
@Test
// Swipes the nav bar left/right to switch between tabs
fun swipeToSwitchTabTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
}.openTabDrawer {
}.openNewTab {
}.submitQuery(secondWebPage.url.toString()) {
swipeNavBarRight(secondWebPage.url.toString())
verifyUrl(firstWebPage.url.toString())
swipeNavBarLeft(firstWebPage.url.toString())
verifyUrl(secondWebPage.url.toString())
}
}
@Test
// Saves a login, then changes it and verifies the update
@Test
fun updateSavedLoginTest() {
val saveLoginTest =
TestAssetHelper.getSaveLoginAsset(mockWebServer)
@ -531,8 +428,8 @@ class SmokeTest {
}
}
@Test
// Verifies that a recently closed item is properly opened
@Test
fun openRecentlyClosedItemTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -545,18 +442,18 @@ class SmokeTest {
}.openTabDrawer {
}.openRecentlyClosedTabs {
waitForListToExist()
recentlyClosedTabsListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1)
IdlingRegistry.getInstance().register(recentlyClosedTabsListIdlingResource!!)
verifyRecentlyClosedTabsMenuView()
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1),
) {
verifyRecentlyClosedTabsMenuView()
}
}.clickRecentlyClosedItem("Test_Page_1") {
verifyUrl(website.url.toString())
}
}
@Test
// Verifies that tapping the "x" button removes a recently closed item from the list
@Test
fun deleteRecentlyClosedTabsItemTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -569,18 +466,18 @@ class SmokeTest {
}.openTabDrawer {
}.openRecentlyClosedTabs {
waitForListToExist()
recentlyClosedTabsListIdlingResource =
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1)
IdlingRegistry.getInstance().register(recentlyClosedTabsListIdlingResource!!)
verifyRecentlyClosedTabsMenuView()
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
registerAndCleanupIdlingResources(
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1),
) {
verifyRecentlyClosedTabsMenuView()
}
clickDeleteRecentlyClosedTabs()
verifyEmptyRecentlyClosedTabsList()
}
}
@Test
// Verifies that deleting a Bookmarks folder also removes the item from inside it.
@Test
fun deleteNonEmptyBookmarkFolderTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -650,8 +547,9 @@ class SmokeTest {
}.clickShareAllTabsButton {
verifyShareTabsOverlay(firstWebsiteTitle, secondWebsiteTitle)
verifySharingWithSelectedApp(
sharingApp, sharedUrlsString,
"$firstWebsiteTitle, $secondWebsiteTitle"
sharingApp,
sharedUrlsString,
"$firstWebsiteTitle, $secondWebsiteTitle",
)
}
}
@ -681,7 +579,6 @@ class SmokeTest {
homeScreen {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(website.url) {
mDevice.waitForIdle()
}.openTabDrawer {
verifyNormalBrowsingButtonIsSelected(false)
verifyPrivateBrowsingButtonIsSelected(true)
@ -691,14 +588,15 @@ class SmokeTest {
verifyExistingTabList()
verifyExistingOpenTabs(website.title)
verifyCloseTabsButton(website.title)
verifyOpenedTabThumbnail()
// Disabled step due to ongoing tabs tray compose refactoring, see: https://github.com/mozilla-mobile/fenix/issues/21318
// verifyOpenedTabThumbnail()
verifyPrivateBrowsingNewTabButton()
}
}
@Test
// Test running on beta/release builds in CI:
// caution when making changes to it, so they don't block the builds
@Test
fun noHistoryInPrivateBrowsingTest() {
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -750,8 +648,8 @@ class SmokeTest {
}
}
@Test
// Verifies that reader mode is detected and the custom appearance controls are displayed
@Test
fun verifyReaderViewAppearanceUI() {
val readerViewPage =
TestAssetHelper.getLoremIpsumAsset(mockWebServer)
@ -762,12 +660,12 @@ class SmokeTest {
mDevice.waitForIdle()
}
readerViewNotification = ViewVisibilityIdlingResource(
activityTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE
)
IdlingRegistry.getInstance().register(readerViewNotification)
registerAndCleanupIdlingResources(
ViewVisibilityIdlingResource(
activityTestRule.activity.findViewById(R.id.mozac_browser_toolbar_page_actions),
View.VISIBLE,
),
) {}
navigationToolbar {
verifyReaderViewDetected(true)
@ -792,16 +690,16 @@ class SmokeTest {
}
}
@Test
// Verifies the main menu of a custom tab with a custom menu item
@Test
fun customTabMenuItemsTest() {
val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
customTabPage.url.toString(),
customMenuItem
)
customMenuItem,
),
)
customTabScreen {
@ -818,15 +716,15 @@ class SmokeTest {
}
}
@Test
// The test opens a link in a custom tab then sends it to the browser
@Test
fun openCustomTabInBrowserTest() {
val customTabPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
intentReceiverActivityTestRule.launchActivity(
createCustomTabIntent(
customTabPage.url.toString()
)
customTabPage.url.toString(),
),
)
customTabScreen {
@ -837,7 +735,6 @@ class SmokeTest {
}
}
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun audioPlaybackSystemNotificationTest() {
val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer)
@ -889,9 +786,9 @@ class SmokeTest {
}
}
@Test
// For API>23
// Verifies the default browser switch opens the system default apps menu.
@Test
fun changeDefaultBrowserSetting() {
homeScreen {
}.openThreeDotMenu {
@ -919,7 +816,7 @@ class SmokeTest {
clickClearButton()
longClickToolbar()
clickPasteText()
verifyPastedToolbarText("content")
verifyTypedToolbarText("content")
}
}
@ -938,29 +835,8 @@ class SmokeTest {
clickClearButton()
longClickToolbar()
clickPasteText()
verifyPastedToolbarText("Page content: 1")
}
}
@Test
fun switchLanguageTest() {
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openLanguageSubMenu {
localeListIdlingResource =
RecyclerViewIdlingResource(
activityTestRule.activity.findViewById(R.id.locale_list),
2
)
IdlingRegistry.getInstance().register(localeListIdlingResource)
selectLanguage("Romanian")
verifyLanguageHeaderIsTranslated(ROMANIAN_LANGUAGE_HEADER)
selectLanguage("Français")
verifyLanguageHeaderIsTranslated(FRENCH_LANGUAGE_HEADER)
selectLanguage(FRENCH_SYSTEM_LOCALE_OPTION)
verifyLanguageHeaderIsTranslated("Language")
IdlingRegistry.getInstance().unregister(localeListIdlingResource)
// with Select all, some white space is copied over, so we need to include that too
verifyTypedToolbarText(" Page content: 1 ")
}
}

View File

@ -0,0 +1,252 @@
/* 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.ui
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Constants.defaultTopSitesList
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.getSponsoredShortcutTitle
import org.mozilla.fenix.ui.robots.homeScreen
/**
* Tests Sponsored shortcuts functionality
*/
class SponsoredShortcutsTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val defaultSearchEngine = "Amazon.com"
private lateinit var sponsoredShortcutTitle: String
private lateinit var sponsoredShortcutTitle2: String
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
@Before
fun setUp() {
TestHelper.appContext.settings().userOptOutOfReEngageCookieBannerDialog = true
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
// Expected for en-us defaults
@SmokeTest
@Test
fun verifySponsoredShortcutsListTest() {
homeScreen {
defaultTopSitesList.values.forEach { value ->
verifyExistingTopSitesTabs(value)
}
}.openThreeDotMenu {
}.openCustomizeHome {
verifySponsoredShortcutsCheckBox(true)
clickSponsoredShortcuts()
verifySponsoredShortcutsCheckBox(false)
}.goBack {
verifyNotExistingSponsoredTopSitesList()
}
}
@Test
fun openSponsoredShortcutTest() {
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
}.openSponsoredShortcut(sponsoredShortcutTitle) {
verifyUrl(sponsoredShortcutTitle)
}
}
@Test
fun openSponsoredShortcutInPrivateBrowsingTest() {
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
}.openContextMenuOnSponsoredShortcut(sponsoredShortcutTitle) {
}.openTopSiteInPrivateTab {
verifyUrl(sponsoredShortcutTitle)
}
}
@Ignore("Failing, see: https://github.com/mozilla-mobile/fenix/issues/25926")
@Test
fun verifySponsorsAndPrivacyLinkTest() {
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
}.openContextMenuOnSponsoredShortcut(sponsoredShortcutTitle) {
}.clickSponsorsAndPrivacyButton {
verifyUrl("support.mozilla.org/en-US/kb/sponsor-privacy")
}
}
@Test
fun verifySponsoredShortcutsSettingsOptionTest() {
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
}.openContextMenuOnSponsoredShortcut(sponsoredShortcutTitle) {
}.clickSponsoredShortcutsSettingsButton {
verifyHomePageView()
}
}
@Test
fun verifySponsoredShortcutsDetailsTest() {
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
sponsoredShortcutTitle2 = getSponsoredShortcutTitle(3)
verifySponsoredShortcutDetails(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDetails(sponsoredShortcutTitle2, 3)
}
}
// The default search engine should not be displayed as a sponsored shortcut
@Test
fun defaultSearchEngineIsNotDisplayedAsSponsoredShortcutTest() {
val sponsoredShortcutTitle = "Amazon"
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openSearchSubMenu {
changeDefaultSearchEngine(defaultSearchEngine)
}
exitMenu()
homeScreen {
verifySponsoredShortcutDoesNotExist(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDoesNotExist(sponsoredShortcutTitle, 3)
}
}
// 1 sponsored shortcut should be displayed if there are 7 pinned top sites
@Test
fun verifySponsoredShortcutsListWithSevenPinnedSitesTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
val thirdWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 3)
val fourthWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 4)
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
sponsoredShortcutTitle2 = getSponsoredShortcutTitle(3)
verifySponsoredShortcutDetails(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDetails(sponsoredShortcutTitle2, 3)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
verifyPageContent(firstWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(firstWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(secondWebPage.url) {
verifyPageContent(secondWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(secondWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(thirdWebPage.url) {
verifyPageContent(thirdWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(thirdWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(fourthWebPage.url) {
verifyPageContent(fourthWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifySponsoredShortcutDetails(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDoesNotExist(sponsoredShortcutTitle2, 3)
}
}
// No sponsored shortcuts should be displayed if there are 8 pinned top sites
@Test
fun verifySponsoredShortcutsListWithEightPinnedSitesTest() {
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
val thirdWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 3)
val fourthWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 4)
val fifthWebPage = TestAssetHelper.getLoremIpsumAsset(mockWebServer)
homeScreen {
sponsoredShortcutTitle = getSponsoredShortcutTitle(2)
sponsoredShortcutTitle2 = getSponsoredShortcutTitle(3)
verifySponsoredShortcutDetails(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDetails(sponsoredShortcutTitle2, 3)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
verifyPageContent(firstWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(firstWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(secondWebPage.url) {
verifyPageContent(secondWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(secondWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(thirdWebPage.url) {
verifyPageContent(thirdWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(thirdWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(fourthWebPage.url) {
verifyPageContent(fourthWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifyExistingTopSitesTabs(fourthWebPage.title)
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(fifthWebPage.url) {
verifyPageContent(fifthWebPage.content)
}.openThreeDotMenu {
expandMenu()
}.addToFirefoxHome {
}.goToHomescreen {
verifySponsoredShortcutDoesNotExist(sponsoredShortcutTitle, 2)
verifySponsoredShortcutDoesNotExist(sponsoredShortcutTitle2, 3)
}
}
}

View File

@ -10,10 +10,10 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
@ -42,11 +42,10 @@ import org.mozilla.fenix.ui.robots.notificationShade
class TabbedBrowsingTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Rule
@JvmField
@ -54,9 +53,6 @@ class TabbedBrowsingTest {
@Before
fun setUp() {
// disabling the new homepage pop-up that interferes with the tests.
featureSettingsHelper.setJumpBackCFREnabled(false)
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
@ -67,7 +63,6 @@ class TabbedBrowsingTest {
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@Test
@ -127,7 +122,7 @@ class TabbedBrowsingTest {
verifyShareTabButton()
verifySelectTabs()
}.closeAllTabs {
verifyNoTabsOpened()
verifyTabCounter("0")
}
// Repeat for Private Tabs
@ -142,11 +137,12 @@ class TabbedBrowsingTest {
}.openTabsListThreeDotMenu {
verifyCloseAllTabsButton()
}.closeAllTabs {
verifyNoTabsOpened()
verifyTabCounter("0")
}
}
@Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun closeTabTest() {
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -157,7 +153,7 @@ class TabbedBrowsingTest {
closeTab()
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.openTabDrawer {
@ -165,7 +161,7 @@ class TabbedBrowsingTest {
swipeTabRight("Test_Page_1")
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.openTabDrawer {
@ -173,15 +169,17 @@ class TabbedBrowsingTest {
swipeTabLeft("Test_Page_1")
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}
}
@Test
fun verifyUndoSnackBarTest() {
// disabling these features because they interfere with the snackbar visibility
featureSettingsHelper.setPocketEnabled(false)
featureSettingsHelper.setRecentTabsFeatureEnabled(false)
activityTestRule.applySettingsExceptions {
it.isPocketEnabled = false
it.isRecentTabsFeatureEnabled = false
}
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -202,6 +200,7 @@ class TabbedBrowsingTest {
}
@Test
@Ignore("Failing after compose migration. See: https://github.com/mozilla-mobile/fenix/issues/26087")
fun closePrivateTabTest() {
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
@ -214,7 +213,7 @@ class TabbedBrowsingTest {
closeTab()
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.openTabDrawer {
@ -222,7 +221,7 @@ class TabbedBrowsingTest {
swipeTabRight("Test_Page_1")
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(genericURL.url) {
}.openTabDrawer {
@ -230,7 +229,7 @@ class TabbedBrowsingTest {
swipeTabLeft("Test_Page_1")
}
homeScreen {
verifyNoTabsOpened()
verifyTabCounter("0")
}
}
@ -278,7 +277,6 @@ class TabbedBrowsingTest {
@Test
fun verifyTabTrayNotShowingStateHalfExpanded() {
navigationToolbar {
}.openTabTray {
verifyNoOpenTabsInNormalBrowsing()
@ -328,7 +326,8 @@ class TabbedBrowsingTest {
verifyTabsTrayCounter()
verifyExistingTabList()
verifyNormalBrowsingNewTabButton()
verifyOpenedTabThumbnail()
// Disabled step due to ongoing tabs tray compose refactoring, see: https://github.com/mozilla-mobile/fenix/issues/21318
// verifyOpenedTabThumbnail()
verifyExistingOpenTabs(defaultWebPage.title)
verifyCloseTabsButton(defaultWebPage.title)
}.openTab(defaultWebPage.title) {
@ -354,7 +353,7 @@ class TabbedBrowsingTest {
// dismiss search dialog
homeScreen { }.pressBack()
verifyPrivateSessionMessage()
verifyHomeToolbar()
verifyNavigationToolbar()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
@ -365,7 +364,7 @@ class TabbedBrowsingTest {
// dismiss search dialog
homeScreen { }.pressBack()
verifyHomeWordmark()
verifyHomeToolbar()
verifyNavigationToolbar()
}
}
}

View File

@ -7,12 +7,11 @@ package org.mozilla.fenix.ui
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.ui.robots.homeScreen
/**
@ -26,11 +25,10 @@ class ThreeDotMenuMainTest {
private lateinit var mockWebServer: MockWebServer
@get:Rule
val activityTestRule = HomeActivityTestRule()
val activityTestRule = HomeActivityTestRule.withDefaultSettingsOverrides()
@Before
fun setUp() {
activityTestRule.activity.applicationContext.settings().shouldShowJumpBackInCFR = false
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
@ -43,54 +41,159 @@ class ThreeDotMenuMainTest {
}
// Verifies the list of items in the homescreen's 3 dot main menu
@Ignore("Failing with frequent ANR: https://bugzilla.mozilla.org/show_bug.cgi?id=1764605")
@Test
fun homeThreeDotMenuItemsTest() {
homeScreen {
}.openThreeDotMenu {
verifyBookmarksButton()
verifyHistoryButton()
verifyDownloadsButton()
verifyAddOnsButton()
verifySyncSignInButton()
verifyDesktopSite()
verifyWhatsNewButton()
verifyHelpButton()
verifyCustomizeHomeButton()
verifySettingsButton()
}.openSettings {
verifySettingsView()
verifyHomeThreeDotMainMenuItems(isRequestDesktopSiteEnabled = false)
}.openBookmarks {
verifyBookmarksMenuView()
}.goBack {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryMenuView()
}.goBack {
}.openThreeDotMenu {
}.openDownloadsManager {
verifyEmptyDownloadsList()
}.goBack {
}.openThreeDotMenu {
}.openAddonsManagerMenu {
verifyAddonsItems()
}.goBack {
}.openThreeDotMenu {
}.openSyncSignIn {
verifyTurnOnSyncMenu()
}.goBack {
// Desktop toggle
}.openThreeDotMenu {
}.switchDesktopSiteMode {
}
homeScreen {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(isRequestDesktopSiteEnabled = true)
}.openWhatsNew {
verifyWhatsNewURL()
}.goToHomescreen {
}.openThreeDotMenu {
}.openHelp {
verifyHelpUrl()
}.goToHomescreen {
}.openThreeDotMenu {
}.openCustomizeHome {
verifyHomePageView()
}.goBack {
}.openThreeDotMenu {
}.openHelp {
verifyHelpUrl()
}.openTabDrawer {
closeTab()
}
homeScreen {
}.openThreeDotMenu {
}.openWhatsNew {
verifyWhatsNewURL()
}.openTabDrawer {
closeTab()
}.openSettings {
verifySettingsView()
}
}
// Verifies the list of items in the homescreen's 3 dot main menu in private browsing
@Test
fun privateHomeThreeDotMenuItemsTest() {
homeScreen {
}.togglePrivateBrowsingMode()
homeScreen {
}.openThreeDotMenu {
verifyHomeThreeDotMainMenuItems(isRequestDesktopSiteEnabled = false)
}.openBookmarks {
verifyBookmarksMenuView()
}.closeMenu {
}
homeScreen {
}.goBack {
}.openThreeDotMenu {
}.openHistory {
verifyHistoryMenuView()
}.goBack {
}.openThreeDotMenu {
}.openDownloadsManager {
verifyEmptyDownloadsList()
}.goBack {
}.openThreeDotMenu {
}.openAddonsManagerMenu {
verifyAddonsItems()
}.goBack {
}.openThreeDotMenu {
}.openSyncSignIn {
verifyTurnOnSyncMenu()
}.goBack {
// Desktop toggle
}.openThreeDotMenu {
}.switchDesktopSiteMode {
}
homeScreen {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(isRequestDesktopSiteEnabled = true)
}.openWhatsNew {
verifyWhatsNewURL()
}.goToHomescreen {
}.openThreeDotMenu {
}.openHelp {
verifyHelpUrl()
}.goToHomescreen {
}.openThreeDotMenu {
}.openCustomizeHome {
verifyHomePageView()
}.goBack {
}.openThreeDotMenu {
}.openSettings {
verifySettingsView()
}
}
@Test
fun setDesktopSiteBeforePageLoadTest() {
val webPage = TestAssetHelper.getGenericAsset(mockWebServer, 4)
homeScreen {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(false)
}.switchDesktopSiteMode {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(webPage.url) {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(true)
}.closeBrowserMenuToBrowser {
clickLinkMatchingText("Link 1")
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(true)
}.closeBrowserMenuToBrowser {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(webPage.url) {
longClickLink("Link 2")
clickContextOpenLinkInNewTab()
snackBarButtonClick()
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(false)
}
}
@Test
fun privateBrowsingSetDesktopSiteBeforePageLoadTest() {
val webPage = TestAssetHelper.getGenericAsset(mockWebServer, 4)
homeScreen {
}.togglePrivateBrowsingMode()
homeScreen {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(false)
}.switchDesktopSiteMode {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(webPage.url) {
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(true)
}.closeBrowserMenuToBrowser {
clickLinkMatchingText("Link 1")
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(true)
}.closeBrowserMenuToBrowser {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(webPage.url) {
longClickLink("Link 2")
clickContextOpenLinkInPrivateTab()
snackBarButtonClick()
}.openThreeDotMenu {
verifyDesktopSiteModeEnabled(false)
}
}
}

View File

@ -14,10 +14,13 @@ import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.FeatureSettingsHelper
import org.mozilla.fenix.helpers.Constants.defaultTopSitesList
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.RetryTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestHelper.generateRandomString
import org.mozilla.fenix.helpers.TestHelper.getStringResource
import org.mozilla.fenix.helpers.TestHelper.waitUntilSnackbarGone
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -34,10 +37,12 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
class TopSitesTest {
private lateinit var mDevice: UiDevice
private lateinit var mockWebServer: MockWebServer
private val featureSettingsHelper = FeatureSettingsHelper()
@get:Rule
val activityIntentTestRule = HomeActivityIntentTestRule(skipOnboarding = true)
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
@get:Rule
val retryTestRule = RetryTestRule(3)
@Before
fun setUp() {
@ -46,56 +51,51 @@ class TopSitesTest {
dispatcher = AndroidAssetDispatcher()
start()
}
featureSettingsHelper.setJumpBackCFREnabled(false)
}
@After
fun tearDown() {
mockWebServer.shutdown()
featureSettingsHelper.resetAllFeatureFlags()
}
@SmokeTest
@Test
fun verifyAddToFirefoxHome() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPageTitle = "Test_Page_1"
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToTopSitesButton()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
verifyExistingTopSitesTabs(defaultWebPage.title)
}
}
@Test
fun verifyOpenTopSiteNormalTab() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPageTitle = "Test_Page_1"
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToTopSitesButton()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
}.openTopSiteTabWithTitle(title = defaultWebPageTitle) {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openTopSiteTabWithTitle(title = defaultWebPage.title) {
verifyUrl(defaultWebPage.url.toString().replace("http://", ""))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
}.openContextMenuOnTopSitesWithTitle(defaultWebPageTitle) {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
verifyTopSiteContextMenuItems()
}
@ -105,20 +105,19 @@ class TopSitesTest {
@Test
fun verifyOpenTopSitePrivateTab() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPageTitle = "Test_Page_1"
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToTopSitesButton()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
}.openContextMenuOnTopSitesWithTitle(defaultWebPageTitle) {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
verifyTopSiteContextMenuItems()
}.openTopSiteInPrivateTab {
verifyCurrentPrivateSession(activityIntentTestRule.activity.applicationContext)
@ -127,65 +126,103 @@ class TopSitesTest {
@Test
fun verifyRenameTopSite() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPageTitle = "Test_Page_1"
val defaultWebPageTitleNew = "Test_Page_2"
val defaultWebPage = getGenericAsset(mockWebServer, 1)
val newPageTitle = generateRandomString(5)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
waitForPageToLoad()
}.openThreeDotMenu {
expandMenu()
verifyAddToTopSitesButton()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
}.openContextMenuOnTopSitesWithTitle(defaultWebPageTitle) {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
verifyTopSiteContextMenuItems()
}.renameTopSite(defaultWebPageTitleNew) {
}.renameTopSite(newPageTitle) {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitleNew)
verifyExistingTopSitesTabs(newPageTitle)
}
}
@Test
fun verifyRemoveTopSite() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPageTitle = "Test_Page_1"
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToTopSitesButton()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPageTitle)
}.openContextMenuOnTopSitesWithTitle(defaultWebPageTitle) {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
verifyTopSiteContextMenuItems()
}.removeTopSite {
verifyNotExistingTopSitesList(defaultWebPageTitle)
verifyNotExistingTopSitesList(defaultWebPage.title)
}
}
@Test
fun verifyDefaultTopSitesLocale_EN() {
// en-US defaults
val defaultTopSites = arrayOf(
"Top Articles",
"Wikipedia",
"Google"
)
fun verifyUndoRemoveTopSite() {
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
verifyTopSiteContextMenuItems()
}.removeTopSite {
clickUndoSnackBarButton()
verifyExistingTopSitesTabs(defaultWebPage.title)
}
}
@Test
fun verifyRemoveTopSiteFromMainMenu() {
val defaultWebPage = getGenericAsset(mockWebServer, 1)
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
}.openThreeDotMenu {
expandMenu()
verifyAddToShortcutsButton()
}.addToFirefoxHome {
verifySnackBarText(getStringResource(R.string.snackbar_added_to_shortcuts))
}.goToHomescreen {
verifyExistingTopSitesList()
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openTopSiteTabWithTitle(defaultWebPage.title) {
}.openThreeDotMenu {
verifyRemoveFromShortcutsButton()
}.clickRemoveFromShortcuts {
}.goToHomescreen {
verifyNotExistingTopSitesList(defaultWebPage.title)
}
}
// Expected for en-us defaults
@Test
fun verifyDefaultTopSitesList() {
homeScreen { }.dismissOnboarding()
homeScreen {
verifyExistingTopSitesList()
defaultTopSites.forEach { item ->
verifyExistingTopSitesTabs(item)
defaultTopSitesList.values.forEach { value ->
verifyExistingTopSitesTabs(value)
}
}
}
@ -193,12 +230,11 @@ class TopSitesTest {
@SmokeTest
@Test
fun addAndRemoveMostViewedTopSiteTest() {
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
val defaultWebPage = getGenericAsset(mockWebServer, 1)
for (i in 0..1) {
navigationToolbar {
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
mDevice.waitForIdle()
waitForPageToLoad()
}
}
@ -209,6 +245,8 @@ class TopSitesTest {
verifyExistingTopSitesTabs(defaultWebPage.title)
}.openContextMenuOnTopSitesWithTitle(defaultWebPage.title) {
}.deleteTopSiteFromHistory {
verifySnackBarText(getStringResource(R.string.snackbar_top_site_removed))
waitUntilSnackbarGone()
}.openThreeDotMenu {
}.openHistory {
verifyEmptyHistoryView()

View File

@ -0,0 +1,187 @@
/* 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.ui
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
import org.mozilla.fenix.helpers.Constants
import org.mozilla.fenix.helpers.HomeActivityTestRule
import org.mozilla.fenix.helpers.TestAssetHelper
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
import org.mozilla.fenix.ui.robots.navigationToolbar
/**
* Tests for verifying basic interactions with web control elements
*
*/
class WebControlsTest {
private lateinit var mockWebServer: MockWebServer
private val hour = 10
private val minute = 10
private val colorHexValue = "#5b2067"
private val emailLink = "mailto://example@example.com"
private val phoneLink = "tel://1234567890"
@get:Rule
val activityTestRule = HomeActivityTestRule(
isJumpBackInCFREnabled = false,
isTCPCFREnabled = false,
)
@Before
fun setUp() {
mockWebServer = MockWebServer().apply {
dispatcher = AndroidAssetDispatcher()
start()
}
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
@Test
fun cancelCalendarFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Calendar Form")
clickFormViewButton("CANCEL")
clickSubmitDateButton()
verifyNoDateIsSelected()
}
}
@Test
fun setAndClearCalendarFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Calendar Form")
selectDate()
clickFormViewButton("OK")
clickSubmitDateButton()
verifySelectedDate()
clickForm("Calendar Form")
clickFormViewButton("CLEAR")
clickSubmitDateButton()
verifyNoDateIsSelected()
}
}
@Test
fun cancelClockFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Clock Form")
clickFormViewButton("CANCEL")
clickSubmitTimeButton()
verifyNoTimeIsSelected(hour, minute)
}
}
@Test
fun setAndClearClockFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Clock Form")
selectTime(hour, minute)
clickFormViewButton("OK")
clickSubmitTimeButton()
verifySelectedTime(hour, minute)
clickForm("Clock Form")
clickFormViewButton("CLEAR")
clickSubmitTimeButton()
verifyNoTimeIsSelected(hour, minute)
}
}
@Test
fun cancelColorFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Color Form")
selectColor(colorHexValue)
clickFormViewButton("CANCEL")
clickSubmitColorButton()
verifyColorIsNotSelected(colorHexValue)
}
}
@Test
fun setColorFormTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Color Form")
selectColor(colorHexValue)
clickFormViewButton("SET")
clickSubmitColorButton()
verifySelectedColor(colorHexValue)
}
}
@Test
fun verifyDropdownMenuTest() {
val htmlControlsPage = TestAssetHelper.getHTMLControlsFormAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(htmlControlsPage.url) {
clickForm("Drop-down Form")
selectDropDownOption("The National")
clickSubmitDropDownButton()
verifySelectedDropDownOption("The National")
}
}
@Test
fun externalLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickLinkMatchingText("External link")
verifyUrl("duckduckgo")
}
}
@Test
fun emailLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickLinkMatchingText("Email link")
assertNativeAppOpens(Constants.PackageName.GMAIL_APP, emailLink)
}
}
@Test
fun telephoneLinkTest() {
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
navigationToolbar {
}.enterURLAndEnterToBrowser(externalLinksPage.url) {
clickLinkMatchingText("Telephone link")
assertNativeAppOpens(Constants.PackageName.PHONE_APP, phoneLink)
}
}
}

View File

@ -50,17 +50,17 @@ private fun disconnectButton() = Espresso.onView(CoreMatchers.allOf(ViewMatchers
private fun assertBookmarksCheckbox() = bookmarksCheckbox().check(
ViewAssertions.matches(
ViewMatchers.withEffectiveVisibility(
ViewMatchers.Visibility.VISIBLE
)
)
ViewMatchers.Visibility.VISIBLE,
),
),
)
private fun assertHistoryCheckbox() = historyCheckbox().check(
ViewAssertions.matches(
ViewMatchers.withEffectiveVisibility(
ViewMatchers.Visibility.VISIBLE
)
)
ViewMatchers.Visibility.VISIBLE,
),
),
)
private fun assertSignOutButton() = signOutButton().check(ViewAssertions.matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))

View File

@ -6,24 +6,22 @@ package org.mozilla.fenix.ui.robots
import android.os.Build
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.clearText
import androidx.test.espresso.action.ViewActions.typeText
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiScrollable
import androidx.test.uiautomator.UiSelector
import androidx.test.uiautomator.Until
import org.hamcrest.CoreMatchers.allOf
import org.junit.Assert.assertTrue
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.MatcherHelper.assertItemContainingTextExists
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.packageName
import org.mozilla.fenix.helpers.click
import org.mozilla.fenix.helpers.ext.waitNotNull
import java.util.regex.Pattern
/**
@ -37,28 +35,25 @@ class AddToHomeScreenRobot {
fun clickAddPrivateBrowsingShortcutButton() = addPrivateBrowsingShortcutButton().click()
fun addShortcutName(title: String) {
mDevice.waitNotNull(Until.findObject(By.text("Add to Home screen")), waitingTime)
shortcutNameField()
.perform(clearText())
.perform(typeText(title))
}
fun addShortcutName(title: String) = shortcutTextField.setText(title)
fun verifyShortcutNameField(expectedText: String) = assertShortcutNameField(expectedText)
fun verifyShortcutTextFieldTitle(title: String) = assertItemContainingTextExists(shortcutTitle(title))
fun clickAddShortcutButton() = addButton().click()
fun clickAddShortcutButton() =
confirmAddToHomeScreenButton.clickAndWaitForNewWindow(waitingTime)
fun clickCancelShortcutButton() = cancelAddToHomeScreenButton().click()
fun clickCancelShortcutButton() =
cancelAddToHomeScreenButton.click()
fun clickAddAutomaticallyButton() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mDevice.wait(
Until.findObject(
By.text(
Pattern.compile("Add Automatically", Pattern.CASE_INSENSITIVE)
)
Pattern.compile("Add Automatically", Pattern.CASE_INSENSITIVE),
),
),
waitingTime
waitingTime,
)
addAutomaticallyButton().click()
}
@ -67,7 +62,7 @@ class AddToHomeScreenRobot {
fun verifyShortcutAdded(shortcutTitle: String) {
assertTrue(
mDevice.findObject(UiSelector().text(shortcutTitle))
.waitForExists(waitingTime)
.waitForExists(waitingTime),
)
}
@ -75,7 +70,7 @@ class AddToHomeScreenRobot {
fun openHomeScreenShortcut(title: String, interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
mDevice.wait(
Until.findObject(By.text(title)),
waitingTime
waitingTime,
)
mDevice.findObject((UiSelector().text(title))).clickAndWaitForNewWindow(waitingTime)
@ -106,22 +101,6 @@ fun addToHomeScreen(interact: AddToHomeScreenRobot.() -> Unit): AddToHomeScreenR
return AddToHomeScreenRobot.Transition()
}
private fun shortcutNameField() = onView(withId(R.id.shortcut_text))
private fun assertShortcutNameField(expectedText: String) {
onView(
allOf(
withId(R.id.shortcut_text),
withText(expectedText)
)
)
.check(matches(isCompletelyDisplayed()))
}
private fun addButton() = onView((withText("ADD")))
private fun cancelAddToHomeScreenButton() = onView((withText("CANCEL")))
private fun addAutomaticallyButton() =
mDevice.findObject(UiSelector().textContains("add automatically"))
@ -134,3 +113,12 @@ private fun noThanksPrivateBrowsingShortcutButton() = onView(withId(R.id.cfr_neg
private fun assertNoThanksPrivateBrowsingShortcutButton() = noThanksPrivateBrowsingShortcutButton()
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
private val cancelAddToHomeScreenButton =
itemWithResId("$packageName:id/cancel_button")
private val confirmAddToHomeScreenButton =
itemWithResId("$packageName:id/add_button")
private val shortcutTextField =
itemWithResId("$packageName:id/shortcut_text")
private fun shortcutTitle(title: String) =
itemWithResIdAndText("$packageName:id/shortcut_text", title)

View File

@ -46,7 +46,7 @@ class BookmarksRobot {
fun verifyBookmarksMenuView() {
mDevice.findObject(
UiSelector().text("Bookmarks")
UiSelector().text("Bookmarks"),
).waitForExists(waitingTime)
assertBookmarksView()
@ -83,7 +83,7 @@ class BookmarksRobot {
fun verifySnackBarHidden() {
mDevice.waitNotNull(
Until.gone(By.text("UNDO")),
TestAssetHelper.waitingTime
TestAssetHelper.waitingTime,
)
onView(withId(R.id.snackbar_layout)).check(doesNotExist())
}
@ -115,15 +115,15 @@ class BookmarksRobot {
fun verifyCurrentFolderTitle(title: String) {
mDevice.findObject(
UiSelector().resourceId("$packageName:id/navigationToolbar")
.textContains(title)
.textContains(title),
)
.waitForExists(waitingTime)
onView(
allOf(
withText(title),
withParent(withId(R.id.navigationToolbar))
)
withParent(withId(R.id.navigationToolbar)),
),
)
.check(matches(isDisplayed()))
}
@ -131,15 +131,15 @@ class BookmarksRobot {
fun waitForBookmarksFolderContentToExist(parentFolderName: String, childFolderName: String) {
mDevice.findObject(
UiSelector().resourceId("$packageName:id/navigationToolbar")
.textContains(parentFolderName)
.textContains(parentFolderName),
)
.waitForExists(waitingTime)
mDevice.waitNotNull(Until.findObject(By.text(childFolderName)), waitingTime)
}
fun verifySignInToSyncButton() =
signInToSyncButton().check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
fun verifySyncSignInButton() =
syncSignInButton().check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
fun verifyDeleteFolderConfirmationMessage() = assertDeleteFolderConfirmationMessage()
@ -150,16 +150,25 @@ class BookmarksRobot {
.click()
}
fun createFolder(name: String) {
fun createFolder(name: String, parent: String? = null) {
clickAddFolderButton()
addNewFolderName(name)
if (!parent.isNullOrBlank()) {
setParentFolder(parent)
}
saveNewFolder()
}
fun setParentFolder(parentName: String) {
clickParentFolderSelector()
selectFolder(parentName)
navigateUp()
}
fun clickAddFolderButton() {
mDevice.waitNotNull(
Until.findObject(By.desc("Add folder")),
TestAssetHelper.waitingTime
TestAssetHelper.waitingTime,
)
addFolderButton().click()
}
@ -244,11 +253,18 @@ class BookmarksRobot {
}
fun clickSingInToSyncButton(interact: SettingsTurnOnSyncRobot.() -> Unit): SettingsTurnOnSyncRobot.Transition {
signInToSyncButton().click()
syncSignInButton().click()
SettingsTurnOnSyncRobot().interact()
return SettingsTurnOnSyncRobot.Transition()
}
fun goBack(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
goBackButton().click()
HomeScreenRobot().interact()
return HomeScreenRobot.Transition()
}
}
}
@ -266,10 +282,10 @@ private fun bookmarkFavicon(url: String) = onView(
withId(R.id.favicon),
withParent(
withParent(
withChild(allOf(withId(R.id.url), withText(url)))
)
)
)
withChild(allOf(withId(R.id.url), withText(url))),
),
),
),
)
private fun bookmarkURL(url: String) = onView(allOf(withId(R.id.url), withText(containsString(url))))
@ -283,15 +299,15 @@ private fun saveFolderButton() = onView(withId(R.id.confirm_add_folder_button))
private fun threeDotMenu(bookmarkUrl: Uri) = onView(
allOf(
withId(R.id.overflow_menu),
withParent(withChild(allOf(withId(R.id.url), withText(bookmarkUrl.toString()))))
)
withParent(withChild(allOf(withId(R.id.url), withText(bookmarkUrl.toString())))),
),
)
private fun threeDotMenu(bookmarkTitle: String) = onView(
allOf(
withId(R.id.overflow_menu),
withParent(withChild(allOf(withId(R.id.title), withText(bookmarkTitle))))
)
withParent(withChild(allOf(withId(R.id.title), withText(bookmarkTitle)))),
),
)
private fun snackBarText() = onView(withId(R.id.snackbar_text))
@ -308,14 +324,14 @@ private fun saveBookmarkButton() = onView(withId(R.id.save_bookmark_button))
private fun deleteInEditModeButton() = onView(withId(R.id.delete_bookmark_button))
private fun signInToSyncButton() = onView(withId(R.id.bookmark_folders_sign_in))
private fun syncSignInButton() = onView(withId(R.id.bookmark_folders_sign_in))
private fun assertBookmarksView() {
onView(
allOf(
withText("Bookmarks"),
withParent(withId(R.id.navigationToolbar))
)
withParent(withId(R.id.navigationToolbar)),
),
)
.check(matches(isDisplayed()))
}
@ -331,23 +347,23 @@ private fun assertEmptyBookmarksList() =
private fun assertBookmarkFolderIsNotCreated(title: String) {
mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/bookmarks_wrapper")
.resourceId("$packageName:id/bookmarks_wrapper"),
).waitForExists(waitingTime)
assertFalse(
mDevice.findObject(
UiSelector()
.textContains(title)
).waitForExists(waitingTime)
.textContains(title),
).waitForExists(waitingTime),
)
}
private fun assertBookmarkFavicon(forUrl: Uri) = bookmarkFavicon(forUrl.toString()).check(
matches(
withEffectiveVisibility(
ViewMatchers.Visibility.VISIBLE
)
)
ViewMatchers.Visibility.VISIBLE,
),
),
)
private fun assertBookmarkURL(expectedURL: String) =
@ -362,15 +378,15 @@ private fun assertBookmarkTitle(expectedTitle: String) =
private fun assertBookmarkIsDeleted(expectedTitle: String) {
mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/bookmarks_wrapper")
.resourceId("$packageName:id/bookmarks_wrapper"),
).waitForExists(waitingTime)
assertFalse(
mDevice.findObject(
UiSelector()
.resourceId("$packageName:id/title")
.textContains(expectedTitle)
).waitForExists(waitingTime)
.textContains(expectedTitle),
).waitForExists(waitingTime),
)
}
private fun assertUndoDeleteSnackBarButton() =
@ -399,7 +415,7 @@ private fun assertKeyboardVisibility(isExpectedToBeVisible: Boolean) =
isExpectedToBeVisible,
mDevice
.executeShellCommand("dumpsys input_method | grep mInputShown")
.contains("mInputShown=true")
.contains("mInputShown=true"),
)
private fun assertShareOverlay() =

View File

@ -7,6 +7,7 @@ package org.mozilla.fenix.ui.robots
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasContentDescription
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.isDialog
import androidx.compose.ui.test.junit4.ComposeTestRule
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTouchInput
@ -15,6 +16,7 @@ import androidx.compose.ui.test.swipeRight
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.NoMatchingViewException
import androidx.test.espresso.action.ViewActions.pressImeActionButton
import androidx.test.espresso.matcher.RootMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiScrollable
@ -23,10 +25,12 @@ import androidx.test.uiautomator.Until
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.packageName
import org.mozilla.fenix.helpers.TestHelper.scrollToElementByText
import org.mozilla.fenix.helpers.click
import org.mozilla.fenix.helpers.ext.waitNotNull
class CollectionRobot {
@ -34,15 +38,15 @@ class CollectionRobot {
fun verifySelectCollectionScreen() {
assertTrue(
mDevice.findObject(UiSelector().text("Select collection"))
.exists()
.exists(),
)
assertTrue(
mDevice.findObject(UiSelector().resourceId("$packageName:id/collections_list"))
.exists()
.exists(),
)
assertTrue(
mDevice.findObject(UiSelector().text("Add new collection"))
.exists()
.exists(),
)
}
@ -50,14 +54,15 @@ class CollectionRobot {
fun verifyCollectionNameTextField() {
assertTrue(
mainMenuEditCollectionNameField().waitForExists(waitingTime)
mainMenuEditCollectionNameField().waitForExists(waitingTime),
)
}
// names a collection saved from tab drawer
fun typeCollectionNameAndSave(collectionName: String) {
collectionNameTextField().text = collectionName
mDevice.findObject(UiSelector().textContains("OK")).click()
addCollectionButtonPanel.waitForExists(waitingTime)
addCollectionOkButton.click()
}
fun verifyTabsSelectedCounterText(numOfTabs: Int) {
@ -79,12 +84,13 @@ class CollectionRobot {
if (visible) {
scrollToElementByText(title)
assertTrue(
collectionListItem(title).waitForExists(waitingTime)
collectionListItem(title).waitForExists(waitingTime),
)
} else
} else {
assertTrue(
collectionListItem(title).waitUntilGone(waitingTime)
collectionListItem(title).waitUntilGone(waitingTime),
)
}
}
fun verifyCollectionTabUrl(visible: Boolean, url: String) {
@ -152,11 +158,11 @@ class CollectionRobot {
fun verifyCollectionItemRemoveButtonIsVisible(title: String, visible: Boolean) {
if (visible) {
assertTrue(
removeTabFromCollectionButton(title).exists()
removeTabFromCollectionButton(title).exists(),
)
} else {
assertFalse(
removeTabFromCollectionButton(title).exists()
removeTabFromCollectionButton(title).exists(),
)
}
}
@ -183,13 +189,13 @@ class CollectionRobot {
fun swipeToBottom() =
UiScrollable(
UiSelector().resourceId("$packageName:id/sessionControlRecyclerView")
UiSelector().resourceId("$packageName:id/sessionControlRecyclerView"),
).scrollToEnd(3)
class Transition {
fun collapseCollection(
title: String,
interact: HomeScreenRobot.() -> Unit
interact: HomeScreenRobot.() -> Unit,
): HomeScreenRobot.Transition {
try {
collectionTitle(title).waitForExists(waitingTime)
@ -206,7 +212,7 @@ class CollectionRobot {
// names a collection saved from the 3dot menu
fun typeCollectionNameAndSave(
name: String,
interact: BrowserRobot.() -> Unit
interact: BrowserRobot.() -> Unit,
): BrowserRobot.Transition {
mainMenuEditCollectionNameField().waitForExists(waitingTime)
mainMenuEditCollectionNameField().text = name
@ -221,7 +227,7 @@ class CollectionRobot {
fun selectExistingCollection(
title: String,
interact: BrowserRobot.() -> Unit
interact: BrowserRobot.() -> Unit,
): BrowserRobot.Transition {
collectionTitle(title).waitForExists(waitingTime)
collectionTitle(title).click()
@ -248,7 +254,7 @@ fun collectionRobot(interact: CollectionRobot.() -> Unit): CollectionRobot.Trans
private fun collectionTitle(title: String) =
mDevice.findObject(
UiSelector()
.text(title)
.text(title),
)
private fun collectionThreeDotButton(rule: ComposeTestRule) =
@ -258,27 +264,27 @@ private fun collectionListItem(title: String) = mDevice.findObject(UiSelector().
private fun shareCollectionButton() =
mDevice.findObject(
UiSelector().description("Share")
UiSelector().description("Share"),
)
private fun removeTabFromCollectionButton(title: String) =
mDevice.findObject(
UiSelector().text(title)
UiSelector().text(title),
).getFromParent(
UiSelector()
.description("Remove tab from collection")
.description("Remove tab from collection"),
)
// collection name text field, opened from tab drawer
private fun collectionNameTextField() =
mDevice.findObject(
UiSelector().resourceId("$packageName:id/collection_name")
UiSelector().resourceId("$packageName:id/collection_name"),
)
// collection name text field, when saving from the main menu option
private fun mainMenuEditCollectionNameField() =
mDevice.findObject(
UiSelector().resourceId("$packageName:id/name_collection_edittext")
UiSelector().resourceId("$packageName:id/name_collection_edittext"),
)
private fun addNewCollectionButton() =
@ -286,5 +292,9 @@ private fun addNewCollectionButton() =
private fun backButton() =
mDevice.findObject(
UiSelector().resourceId("$packageName:id/back_button")
UiSelector().resourceId("$packageName:id/back_button"),
)
private val addCollectionButtonPanel =
itemWithResId("$packageName:id/buttonPanel")
private val addCollectionOkButton = onView(withId(android.R.id.button1)).inRoot(RootMatchers.isDialog())

Some files were not shown because too many files have changed in this diff Show More