This diff adds high-level test coverage to the code in Dagit that converts pipelines to SVGs for display. The tests render the React components that generate the SVG and write actual SVG files to disk, allowing you to visually compare the expected and actual results as well as seeing the highlighted changed lines in the test output.
This diff also uses a different strategy than the rest of the tests to fetch / cache the "mock" data they require. Currently in the rest of the codebase you have to run dagit with a special env var, which prints a whole ton of GraphQL requests/responses on the page and then you copy-paste that into mockData.tsx. This is a little tough because that file is gigantic and re-generating it is a manual process. For these tests, the tests generate a refetch.sh shell script that is placed in the data folder. Running it curls the Dagit GraphQL endpoint and re-writes the JSON files on disk. I think we can switch the other tests to doing something like this soon for easier updating.