Allow testing Moments Pages via ASRouter devtools or about:messagepreview
Categories
(Firefox :: Messaging System, task)
Tracking
()
People
(Reporter: aminomancer, Unassigned)
References
(Blocks 1 open bug)
Details
We don't have an easy way to test Moments Pages currently. Approaches include temporarily adding them to a local message provider in a local build; or uploading them to RS stage environment and connecting to it, e.g. with the remote settings devtools addon. Both very sluggish compared to ASRouter devtools or about:messagepreview.
The reason is the Moments Page surface isn't designed to be invoked by ASRouter; rather, it runs its own code independently on launch, and requests a message from ASRouter. We have a similar bug for Feature Callout, because it has a similar architecture.
Ultimately we can't test this surface on-demand since all it does is set the home page override pref. But we can test that the message JSON is compatible with all the logic and results in a valid URL, and we can open a new tab with that URL. So we can basically make a testing-only method that runs the message through all the moments page logic and opens it through a different mechanism.
| Reporter | ||
Comment 1•3 years ago
|
||
Actually this is all wrong. You can test moments pages from the devtools, you just need to restart Firefox with the same profile.
Description
•