Skip to content

Instantly share code, notes, and snippets.

@kapral18
Last active March 22, 2026 16:12
Show Gist options
  • Select an option

  • Save kapral18/b6ccde9cbf84bc18c35fc356861aba50 to your computer and use it in GitHub Desktop.

Select an option

Save kapral18/b6ccde9cbf84bc18c35fc356861aba50 to your computer and use it in GitHub Desktop.
Integration → unit test mapping for snapshot_restore repository_add

Snapshot Restore: repository_add integration → unit test mapping (table)

Generated: 2026-03-22

Goal: For the deleted client integration test file, list every individual test (it/test) and map it to where the same behavior is now covered in unit tests (one row per mapping; duplicate rows allowed when a single old test is covered by multiple new tests).

Legend:

  • “Old test” column uses the exact it/test title from the deleted integration file.
  • “Now covered by” points to a unit test (file + unit it() title). If a behavior moved layers, the mapping points to the new layer that owns the behavior (validator, component, or container).

__jest__/client_integration/repository_add.test.ts

Old test Now covered by
should set the correct page title public/application/sections/repository_add/repository_add.test.tsxSHOULD set the correct page title
should not let the user go to the next step if some fields are missing public/application/components/repository_form/repository_form.test.tsxSHOULD not proceed to step 2 and show validation errors
should indicate that the repository types are loading public/application/components/repository_form/step_one.test.tsxSHOULD show a loading indicator
should show an error callout public/application/components/repository_form/step_one.test.tsxSHOULD show a no-repository-types error callout
should have 1 card for each repository type public/application/components/repository_form/step_one.test.tsxSHOULD render a card for each repository type
should not allow spaces in the name public/application/services/validation/validate_repository.test.tsSHOULD return a spaces-not-allowed error
should not allow invalid characters public/application/services/validation/validate_repository.test.tsSHOULD return an invalid-character error for "%s"
should validate required repository settings (skipped/flaky in integration suite) public/application/services/validation/validate_repository.test.ts → per-type settings validation (WHEN fs/url/s3/gcs/hdfs ... SHOULD return ... required error)
should send the correct payload for FS repository public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct payload (FS)
should send the correct payload for Azure repository public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct payload (Azure)
should send the correct payload for GCS repository public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct payload (GCS)
should send the correct payload for HDFS repository public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct payload (HDFS)
should send the correct payload for S3 repository public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct payload (S3)
should surface the API errors from the "save" HTTP request public/application/sections/repository_add/repository_add.test.tsxSHOULD surface API error when save fails
should send the correct payload (source-only) public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with delegateType in the payload
should correctly set the intelligent_tiering storage class public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct storageClass (intelligent_tiering)
should correctly set the onezone_ia storage class public/application/components/repository_form/repository_form.test.tsxSHOULD call onSave with the correct storageClass (onezone_ia)

New unit test suite overview (for quick sanity)

File Tests
public/application/services/validation/validate_repository.test.ts 24
public/application/components/repository_form/step_one.test.tsx 10
public/application/components/repository_form/repository_form.test.tsx 14
public/application/sections/repository_add/repository_add.test.tsx 4

Total: 52 tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment