Page MenuHomePhabricator

Add a handful of tests back to App.test
ClosedPublic

Authored by dish on Fri, Oct 30, 7:53 PM.

Details

Summary

Use Apollo mocking and MemoryRouter to add a few route tests to App.test, to replace what were previously snapshots.

Also fix a mutation-of-readonly-thing error that surfaced during testing.

Test Plan

Buildkite

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

js_modules/dagit/src/App.tsx
86

By separating AppContent into its own component, we can use MemoryRouter to test route-based rendering.

dish requested review of this revision.Fri, Oct 30, 8:00 PM
bengotow added inline comments.
js_modules/dagit/src/SidebarSolidDefinition.tsx
175

Good catch ๐Ÿ‘

This revision is now accepted and ready to land.Fri, Oct 30, 8:22 PM
This revision was automatically updated to reflect the committed changes.