Skip to content

Instantly share code, notes, and snippets.

@kapral18
Last active January 3, 2026 11:13
Show Gist options
  • Select an option

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

Select an option

Save kapral18/0eac8d23e2a822af0259f616e7cc13d7 to your computer and use it in GitHub Desktop.
Snapshot & Restore: Jest test titles (before vs after RTL migration)
FILE BEFORE AFTER
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/home.test.ts each row should have a link to the repository each row should have a link to the repository
should detail the failure for each index should detail the failure for each index
should display a loading while fetching the repositories should display a loading while fetching the repositories
should display a message when snapshot created successfully should display a message when snapshot created successfully
should display a message when snapshot in progress should display a message when snapshot in progress
should display an empty prompt should display an empty prompt
should display an empty prompt should display an empty prompt
should display an empty prompt should display an empty prompt
should display the failed indices should display the failed indices
should have 2 tabs should have 2 tabs
should have 4 tabs should have 4 tabs
should have a button to close the detail panel should have a button to close the detail panel
should have a button to register a new repository should have a button to register a new repository
should have a button to reload the repositories should have a button to reload the repositories
should have a button to reload the snapshots should have a button to reload the snapshots
should have a button to verify the status of the repository should have a button to verify the status of the repository
should have a link to show the repository detail should have a link to show the repository detail
should have a link to the documentation should have a link to the documentation
should have a link to the documentation should have a link to the documentation
should have a link to the snapshot documentation should have a link to the snapshot documentation
should have action buttons on each row to edit and delete a repository should have action buttons on each row to edit and delete a repository
should have the default tab set on "Summary" should have the default tab set on "Summary"
should indicate the different snapshot states should indicate the different snapshot states
should indicate the number of snapshots found should indicate the number of snapshots found
should invite the user to first register a repository should invite the user to first register a repository
should list them in the table should list them in the table
should list them in the table should list them in the table
should navigate to snapshot list tab should navigate to snapshot list tab
should send the correct HTTP request to delete repository should send the correct HTTP request to delete repository
should set the correct app title should set the correct app title
should set the correct repository settings should set the correct repository settings
should set the correct summary values should set the correct summary values
should set the correct title should set the correct title
should set the correct title should set the correct title
should show a confirmation when clicking the delete repository button should show a confirmation when clicking the delete repository button
should show a generic error prompt if snapshots request fails while still showing the search bar should show a generic error prompt if snapshots request fails while still showing the search bar
should show a loading state while fetching the repository should show a loading state while fetching the repository
should show a loading while fetching the snapshot should show a loading while fetching the snapshot
should show a repository error prompt if snapshots request fails due to repository exception while still showing the search bar should show a repository error prompt if snapshots request fails due to repository exception while still showing the search bar
should show a warning if one repository contains errors should show a warning if one repository contains errors
should show feature states if include global state is enabled should show feature states if include global state is enabled
should show the detail when clicking on a repository should show the detail when clicking on a repository
should show the detail when clicking on a snapshot should show the detail when clicking on a snapshot
should update the tab label should update the tab label
shows error when success fails shows error when success fails
shows results when request succeeds shows results when request succeeds
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/policy_add.test.ts Enabling include global state enables include feature state Enabling include global state enables include feature state
feature states dropdown is only shown when include feature states is enabled feature states dropdown is only shown when include feature states is enabled
include all features by default include all features by default
include no features include no features
include some features include some features
should correctly indicate data streams with a badge should correctly indicate data streams with a badge
should not allow negative values for the delete after, minimum and maximum counts should not allow negative values for the delete after, minimum and maximum counts
should not allow the minimum count be greater than the maximum count should not allow the minimum count be greater than the maximum count
should not let the user go to the next step if required fields are missing should not let the user go to the next step if required fields are missing
should not show repository-not-found warning should not show repository-not-found warning
should require a policy name should require a policy name
should require a schedule should require a schedule
should require a snapshot name that is lowercase should require a snapshot name that is lowercase
should require at least one index if no data streams are provided should require at least one index if no data streams are provided
should send the correct payload should send the correct payload
should set the correct page title should set the correct page title
should surface the API errors from the put HTTP request should surface the API errors from the put HTTP request
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/policy_edit.test.ts should block navigating to next step should block navigating to next step
should disable the policy name field should disable the policy name field
should disable the repo and snapshot fields for managed policies should disable the repo and snapshot fields for managed policies
should provide a default time unit value for retention should provide a default time unit value for retention
should send the correct payload with changed values should send the correct payload with changed values
should set the correct page title should set the correct page title
should show repository-not-found warning should show repository-not-found warning
should use the same Form component as the "<PolicyAdd />" section should use the same Form component as the "<PolicyAdd />" section
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/policy_list.test.tsx should show feature states if include global state is enabled should show feature states if include global state is enabled
should show the detail flyout when clicking on a policy should show the detail flyout when clicking on a policy
When it only has include globalState summary should also mention that it includes all features When it only has include globalState summary should also mention that it includes all features
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/repository_add.test.ts should correctly set the intelligent_tiering storage class should correctly set the intelligent_tiering storage class
should correctly set the onezone_ia storage class should correctly set the onezone_ia storage class
should have 1 card for each repository type should have 1 card for each repository type
should indicate that the repository types are loading should indicate that the repository types are loading
should not allow invalid characters should not allow invalid characters
should not allow spaces in the name should not allow spaces in the name
should not let the user go to the next step if some fields are missing should not let the user go to the next step if some fields are missing
should send the correct payload should send the correct payload
should send the correct payload for Azure repository should send the correct payload for Azure repository
should send the correct payload for FS repository should send the correct payload for FS repository
should send the correct payload for GCS repository should send the correct payload for GCS repository
should send the correct payload for HDFS repository should send the correct payload for HDFS repository
should send the correct payload for S3 repository should send the correct payload for S3 repository
should set the correct page title should set the correct page title
should show an error callout should show an error callout
should surface the API errors from the "save" HTTP request should surface the API errors from the "save" HTTP request
should validate required repository settings should validate required repository settings
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/repository_edit.test.tsx azure repository azure repository
azure repository azure repository
fs repository fs repository
gcs repository gcs repository
gcs repository gcs repository
hdfs repository hdfs repository
readonly repository readonly repository
s3 repository s3 repository
s3 repository s3 repository
should set the correct page title should set the correct page title
should use the same Form component as the "<RepositoryAdd />" section should use the same Form component as the "<RepositoryAdd />" section
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/restore_snapshot.test.ts -> x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/restore_snapshot.test.tsx does not allow navigation when the step is invalid does not allow navigation when the step is invalid
hides the data streams warning when the snapshot has data streams hides the data streams warning when the snapshot has data streams
is sent to the API is sent to the API
shows an extra info callout when includeFeatureState is enabled and we have featureStates present in snapshot shows an extra info callout when includeFeatureState is enabled and we have featureStates present in snapshot
shows the data streams warning when the snapshot has data streams shows the data streams warning when the snapshot has data streams
when no feature states hide dropdown and show no features callout when no feature states hide dropdown and show no features callout
x-pack/platform/plugins/private/snapshot_restore/__jest__/client_integration/snapshot_list.test.tsx doesn't allow more than 1 clauses in the query doesn't allow more than 1 clauses in the query
doesn't allow more than 1 terms in the query doesn't allow more than 1 terms in the query
doesn't allow unknown properties in the query doesn't allow unknown properties in the query
exact policy search is parsed exact policy search is parsed
exact repository search is parsed exact repository search is parsed
exact snapshot search is parsed exact snapshot search is parsed
exact state search is parsed exact state search is parsed
excluding exact policy search is parsed excluding exact policy search is parsed
excluding exact repository search is parsed excluding exact repository search is parsed
excluding exact snapshot search is parsed excluding exact snapshot search is parsed
excluding exact state search is parsed excluding exact state search is parsed
excluding partial policy search is parsed excluding partial policy search is parsed
excluding partial repository search is parsed excluding partial repository search is parsed
excluding partial snapshot search is parsed excluding partial snapshot search is parsed
excluding partial state search is parsed excluding partial state search is parsed
excluding term search is converted to partial excluding snapshot search excluding term search is converted to partial excluding snapshot search
partial policy search is parsed partial policy search is parsed
partial repository search is parsed partial repository search is parsed
partial snapshot search is parsed partial snapshot search is parsed
partial state search is parsed partial state search is parsed
query is not updated with unknown params from the url query is not updated with unknown params from the url
query is updated with repository name from the url query is updated with repository name from the url
query is updated with snapshot policy name from the url query is updated with snapshot policy name from the url
renders snapshots from non-managed repositories correctly renders snapshots from non-managed repositories correctly
renders snapshots when there is no managed repository renders snapshots when there is no managed repository
renders snapshots with isLastSuccessfulSnapshot flag correctly renders snapshots with isLastSuccessfulSnapshot flag correctly
term search is converted to partial snapshot search term search is converted to partial snapshot search
term search with a date is parsed term search with a date is parsed
waits after input to update list params for search waits after input to update list params for search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment