Add tests for custom review prompt navigation middleware
Categories
(Firefox for Android :: Experimentation and Telemetry, task)
Tracking
()
People
(Reporter: mkozinski, Assigned: mkozinski)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][group2])
We'd like to unit test action handling in CustomReviewPromptNavigationMiddleware. It works by emitting navigation events to a shared flow, so testing it is complicated, by the need to introduce a pattern for asserting expected emissions to a flow.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•9 months ago
|
||
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Comment 2•8 months ago
|
||
I got feedback from Polly. Based on this there's one thing I want to expand on in the doc. I need to address more explicitly the cost of learning a new (testing) API. We agreed it would be helpful to include an example comparison of a unit test with and without Turbine.
Additionally I think this uncovers that the reason I'm proposing to introduce this new testing pattern is because I introduced a new pattern in production code. I did this without a formal proposal, it just went through code review on Squad 2. I talked to Petru about this pattern I used and apparently Rahul pitched it at some point, but we never either accepted or rejected it. I should either try to revive Rahul's proposal (if we can find it) or start my own. A new navigation pattern in production code definitely deserves a formal proposal even more than just introducing a new test dependency.
Description
•