HomePhabricator

[Cashtab] Update snapshots without manual input

Description

[Cashtab] Update snapshots without manual input

Summary:
Related to T2088

Cashtab diffs are frequently pushed with un-updated snapshots causing avoidable teamcity errors.

This diff adds the -u flag to the jest npm test command, which auto-updates snapshots every time npm test is run (before, the user would have to wait for snapshot tests to fail, then push u).

Getting this automated will reduce admin burden and is a stepping stone toward including other cashtab linting in arc lint.

Test Plan:

  1. Edit the file Send.js by changing some of the rendered text, e.g. by changing the text "Switch to multiple recipients" to something else
  2. Run npm test
  3. Note that new snapshots are created automatically and tests do not fail.
  4. Revert your original changes to Send.js
  5. Run npm test
  6. Note that new snapshots are created automatically and tests do not fail (and they are equivalent to the previous snapshots)

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D10786

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Jan 7 2022, 14:05
bytesofmanPushed on Jan 13 2022, 17:14
Reviewer
Restricted Project
Differential Revision
D10786: [Cashtab] Update snapshots without manual input
Parents
rABC9f767b30dc74: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown