This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
Firefox Lite Development Guide (Draft)
Hao-Kuang Tsai edited this page May 9, 2019
·
4 revisions
Welcome to Firefox Lite development! We are happy to have you with us. This guide gives you the idea of our development guideline like naming convention, cooperation workflow etc. If not listed, just align standard Java/Android conventions (lint should handle most of the cases). Below document is for Java code.
- Good first bugs
- Commit message style:
Closes #BugNumber - Capital case describe your bug
- Mailing list: [email protected]
- To save build time, UI test won't always execute for every PR. If you want your PR tested with UI tests before landing, you can file another PR to ui_fullcheck (instead of master). With it, your patches will be executed with all UI tests.
- Use Robo pattern or reuse AndroidUtil methods. Don't use new
onView(withId(...))
check unless there's a good reason. - If you find duplicate view Ids, modify the production code to make
withId
check easier. -
Thread.sleep(...)
is only allowed inScreengrabOnly
tests since we haven't found a way to make Screengrab work with IdlingResource. - Only create new IdlingResource if you really need it. And besure to register/unregister within one method call so you other tests won't be affected.
- Rollback the state you've modified in the test. So later tests won't be affected.
- Some production code uses
View.Animation
api or Lottie hence it won't work with Espresso (Animation will still play). Modify production code by usingAnimator
api or useInject.java
to work around the issue.
- Class variable: Start from lower case and no prefix (e.g. m/s)
- UI Test class: Use the same package structure as main source set as possible.
- UI Test method: <testStepsWithCarmelCase_expectedResult>
- Add final as much as possible.
- Add @VisibleForTesting for code in the none-testing source set
- Add @CheckForResult on methods if the result is important to check/handle
- Commit message(TBD): : Description of this commit. Fix #. e.g. add2home: Update pin shortcut icon. Fix issue#1622.
(TBD)
(TBD)
(TBD)
(TBD)