Create a shared mock data file and/or utility of sync data for use by consumers' tests
Categories
(Firefox :: Sync, enhancement, P2)
Tracking
()
People
(Reporter: sclements, Unassigned)
Details
In bug 1791851, there was a non-trivial change to the format of the lastUsed
field that flew under the radar during code review and caused a regression in Firefox View (see bug 1798692). In order to avoid future unexpected changes to the format and type of data that Sync provides, especially on such a visible UI, we probably need a more centralized or collaborative test solution to what we currently have.
The Firefox View tests for the Tab Pickup list relies on mocked sync data - based on last known assumptions of data format and type - and this failed to detect this change when the changes in bug 1791851 were made.
Perhaps a solution to guard against future changes that would affect consumers (aside from making these changes more explicit and broadly communicated) would be to have a centralized sync mock data file and/or API utility that is used in all tests that rely on sync data. Then any further changes to the API would need to include updates to that one file or utility by the sync team, as needed.
Open to other ideas or suggestions and to help with the legwork of implementing the solution, if needed :)
Comment 1•2 years ago
|
||
(In reply to Sarah Clements [:sclements] from comment #0)
In bug 1791851, there was a non-trivial change to the format of the
lastUsed
field that flew under the radar.
Oops :( We should probably revert the regression then revert that fix - other SyncedTabs consumers might be similarly broken. Sammy, can you please open a bug for that?
Re this bug: those .json payload fixtures would be perfect in the sync test directory, and we could add our local tests against some "well known" payloads.
Comment 2•2 years ago
|
||
(In reply to Sarah Clements [:sclements] from comment #0)
In bug 1791851, there was a non-trivial change to the format of the
lastUsed
field that flew under the radar during code review and caused a regression in Firefox View (see bug 1798692).
Definitely sorry about this. We filed a bug for this on our end: https://bugzilla.mozilla.org/show_bug.cgi?id=1799255 to investigate this further (though I generally agree with mark we should just revert it, but depending on the remaining callers -- it may be easier to just push forward with the new change.
Perhaps a solution to guard against future changes that would affect consumers (aside from making these changes more explicit and broadly communicated) would be to have a centralized sync mock data file and/or API utility that is used in all tests that rely on sync data. Then any further changes to the API would need to include updates to that one file or utility by the sync team, as needed.
This is a great solution, we've slowly been trying to refactor our tests on desktop to get away from mocking too much and trying to rely on a standard set of implementations. I think we'll bump the priority on this now that Firefox View uses quite a few of our APIs (and is much more visible obv).
Updated•2 years ago
|
Description
•