[9.3] [Snapshot Restore] Migrate flaky repository_add integration test to unit tests (#258974)#260128
Merged
kapral18 merged 1 commit intoelastic:9.3from Mar 31, 2026
Merged
Conversation
511594f to
aedd836
Compare
…nit tests (elastic#258974) Closes elastic#248548 - Migrates flaky `repository_add` client integration test to focused unit tests spread across the source files that own the functionality. - Removes the legacy `__jest__/client_integration/repository_add.test.ts` integration test. - Unskips the previously flaky settings validation test (now a pure function test — no timeouts possible). - The old integration test rendered the full app through a router with async HTTP mock layers, causing flaky 5000ms timeouts on CI (issue - The new unit tests render components directly with minimal mocks, use synchronous `fireEvent`, and test validation as pure function calls. - [Integration → unit test mapping (gist)](https://gist.github.com/kapral18/b6ccde9cbf84bc18c35fc356861aba50) - `node scripts/check_changes.ts` — passed - `yarn test:jest x-pack/platform/plugins/private/snapshot_restore/public/application/services/validation/validate_repository.test.ts` — 24 passed - `yarn test:jest x-pack/platform/plugins/private/snapshot_restore/public/application/components/repository_form/step_one.test.tsx` — 10 passed - `yarn test:jest x-pack/platform/plugins/private/snapshot_restore/public/application/components/repository_form/repository_form.test.tsx` — 14 passed - `yarn test:jest x-pack/platform/plugins/private/snapshot_restore/public/application/sections/repository_add/repository_add.test.tsx` — 1 passed Assisted with Claude Code using Claude 4.6 Opus Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit 6b62324)
aedd836 to
ff66a4b
Compare
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
|
SoniaSanzV
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.3:Questions ?
Please refer to the Backport tool documentation