-
Notifications
You must be signed in to change notification settings - Fork 600
Improve & test the cross stack reactivity #8370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Introduce createMockBranchDetails function to simplify creating customized mock BranchDetails objects in tests. This improves test readability and reduces duplication by allowing overrides of default mock data.
Add a description to the ‘lots of file changes’ scenario
Only fetch the changes when mounting the files split view. This improves things in the following ways: - Ensures that only if the actual snippet is rendered, the information is fetched and subscribed to. - It correctly reacts to changing of parameters - It uses the correct stack and project Id. Important since this component is within a ReduxResult, so the stack IDs might be out of sync in between changes
- Replace all usages of 'uncommitted-changes-file-list-item' with 'file-list-item' in test files and FileListItemWrapper.svelte - Update testIds.ts to reflect the new unified test id - Update affected Cypress tests to use the new test id This change standardizes the test id for file list items, making tests and components more consistent and maintainable.
… root div - Allow passing a testId prop to ChangedFiles.svelte - Apply the testId to the root element for improved test targeting This enables more flexible and robust test selectors for changed files lists.
- Import TestId and set data-testid={TestId.StackTab} on StackTab button - Improves testability and selector consistency for stack tab elements
- Add new Cypress test to verify drawer and file list update when changing stack selection - Uses new test ids for stack tab and file list item - Mocks backend to provide multiple stacks with different file changes Ensures UI updates correctly when switching between stacks with different changes.
- Add GetBranchChangesParams type and isGetBranchChangesParams type guard - Support for mocking branch changes in backend This enables more robust mocking of branch-specific file changes for tests.
- Add branchChanges map to MockBackend for storing per-branch file changes - Implement getBranchChanges and getBranchChangesFileNames methods - Update types for StackId, CommitId, BranchName, BranchChanges This allows mocking and retrieval of file changes for specific branches and stacks, supporting more advanced test scenarios.
… file changes - Add BranchesWithChanges mock scenario with three stacks, each having unique file changes - Sets up stack details and branch changes for each stack - Used in selection.cy.ts to test cross-stack reactivity This enables robust testing of UI behavior when switching between stacks with different file changes.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
Description
This PR improves and tests the cross-stack reactivity with the following key changes:
⧓ Review in Butler Review
#2GVXU8Bud
Improve & test the cross stack reactivity
Description
This PR improves and tests the cross-stack reactivity with the following key changes:
11 commit series (version 2)
Please leave review feedback in the Butler Review