This test seems to be hacking at the binding between Fenix and the
BrowserToolbar to simulate toolbar events passing to the Fenix
interactor.
This is rather clumsy test that relies on the magic working of mockk
instead of following a general unit testing strategy that would commonly
require the class to be re-written to allow for better testing instead.
It is far safer to remove this test since we are not guaranteeing
anything in it and instead we see intermittent failures that make us
lose more time.
So therefore.. 🔥
The expectation is that replacing `return` with `answers` will compute
the return value for the extension function again in order to avoid the
error, "no answer found for: Settings".
This was moved to once per day in https://bugzilla.mozilla.org/show_bug.cgi?id=1628413 when Google Play reviews were very slow. That hasn't been a problem for awhile, and the less frequent nightlies are causing delays getting new Android Components bumps shipped out.
Theoretically, this should marginally decrease the duration of our unit
test suite. In my testing, for 1 iteration each (i.e. noise is very
possible), the duration changed from 9m 32s to 8m 21s – a 71s
improvement.
---
To identify tests that were running with robolectric that didn't need to
be, I removed the @RunWith(FenixRobo... from all relevant files:
sed -i '' "/@RunWith(FenixRobolectric/d" app/src/test/**/*.kt
I ran the tests and discovered which ones failed from the Classes tab of
the index.html test result file. Something like:
tests = document.querySelectorAll('table')[3].querySelectorAll('tr');
failureElements = tests.querySelectorAll('.failures');
// TODO: extract the test names
Then I copied these results to a text file and compared them to all the
files that had robolectric test runners to figure out which ones still
pass:
comm -1 -2 failures.txt changed_files.txt > robolectric_not_needed.txt
And undid the changes to the failing files:
for i in $(cat robolectric_not_needed.txt); do git checkout $i; done
Then I removed the import statements on those files:
for i in $(cut changed_files.txt); do sed -i '' "/import.*RunWith/d" $i; done
for i in $(cat changed_files.txt); do sed -i '' "/import.*RobolectricTestRunner/d" $i; done
* Navigate to home on toolbar click. Handle back press from search dialog
Update tests to show home behind search dialog. Remove unused test.
Jump back in show all button is clickable behind search dialog
Recently saved bookmarks show all button is clickable behind search dialog
* Add feature flag
* Past explorations show all button is clickable behind search dialog
Handle keyboard in controllers instead of viewholders. Update tests.
Allow collections to be visible behind search dialog
Dismiss keyboard and search dialog with navigateUp instead of just dismissing the keyboard
Verify navigateUp in tests
Adding ignore for flaky UI test
Only resize home behind search dialog
Add ignore for collection intermittent test
Cleanup