-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore: Adding specs/tests for space distribution and copy paste sagas #34063
Conversation
…o anvil-specs-space-distribution
…o anvil-specs-space-distribution
WalkthroughThe changes introduce new test cases and functionalities related to Anvil Sections and Zones, including verifying section removal and visual aspects of background-less zones. Additional utility functions for handling space distribution and mock data generation are also included. Import paths have been updated in various files to ensure correct references. Changes
Sequence Diagram(s) (Beta)Silently ignoring this section as the changes are too varied for a cohesive diagram. Assessment against linked issues
Possibly related issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…o anvil-specs-space-distribution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts (1)
Line range hint
11-57
: Remove generator syntax ifyield
is not intended.- export function* getDestinedParent( + export function getDestinedParent(
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilSectionsAndZones_spec.ts (2 hunks)
- app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilSpaceDistribution_spec.ts (2 hunks)
- app/client/cypress/support/Pages/Anvil/AnvilSectionsZonesHelper.ts (1 hunks)
- app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/index.ts (5 hunks)
- app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/pasteSagas.test.ts (1 hunks)
- app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/destinationUtils.test.ts (1 hunks)
- app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts (1 hunks)
- app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/mockData.helper.ts (1 hunks)
Files not reviewed due to errors (2)
- app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/destinationUtils.test.ts (no review received)
- app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/mockData.helper.ts (no review received)
Additional context used
Biome
app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts
[error] 11-57: This generator function doesn't contain yield. (lint/correctness/useYield)
Additional comments not posted (8)
app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilSectionsAndZones_spec.ts (1)
86-98
: The test case for removing a section through the property pane is clear and concise. It correctly uses thepropPane
object for interacting with the UI, aligning with the changes noted in the PR summary.app/client/cypress/support/Pages/Anvil/AnvilSectionsZonesHelper.ts (1)
32-46
: The addition ofmouseDownSpaceDistributionHandle
andmouseUpSpaceDistributionHandle
methods enhances the granularity of interaction tests by allowing precise control over mouse events on distribution handles. Ensure these methods are used in relevant test scenarios to fully leverage their functionality.Verification successful
The new methods
mouseDownSpaceDistributionHandle
andmouseUpSpaceDistributionHandle
are properly integrated into the test scenarios, as evidenced by their usage inAnvilSpaceDistribution_spec.ts
.
app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilSpaceDistribution_spec.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of mouse event handlers in tests. # Test: Search for the usage of the new methods in test files. Expect: Proper integration in test scenarios. rg --type typescript $'mouseDownSpaceDistributionHandle|mouseUpSpaceDistributionHandle'Length of output: 123
Script:
#!/bin/bash # Description: Verify the usage of mouse event handlers in tests. # Test: Search for the usage of the new methods in test files. Expect: Proper integration in test scenarios. rg --type ts $'mouseDownSpaceDistributionHandle|mouseUpSpaceDistributionHandle'Length of output: 770
app/client/src/layoutSystems/anvil/utils/paste/destinationUtils/index.ts (1)
7-9
: Update import paths to reflect new file structure.app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/index.ts (3)
Line range hint
6-21
: Update import paths to reflect new file structure.
53-53
: ExportingpasteWidgetSagas
enhances modularity and testability.
27-27
: Ensure the updated selector path is correct and accessible.Verification successful
The updated selector path is correct and accessible.
- The
getIsAnvilLayout
selector is correctly imported from"../../selectors"
in the fileapp/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/index.ts
.- The selector is defined in
app/client/src/layoutSystems/anvil/integrations/selectors.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the updated selector path is correct. # Test: Search for the selector usage. Expect: Only occurances of the new path. rg --type python $'getIsAnvilLayout'Length of output: 66
Script:
#!/bin/bash # Description: Verify the updated selector path is correct. # Test: Search for the selector usage. Expect: Only occurrences of the new path. rg --type ts 'getIsAnvilLayout'Length of output: 5786
app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilSpaceDistribution_spec.ts (1)
154-199
: New test case added for verifying visual aspects of background-less zones and resize indicators.app/client/src/layoutSystems/anvil/integrations/sagas/pasteSagas/pasteSagas.test.ts (1)
20-228
: Comprehensive tests added forpasteWidgetSagas
to ensure functionality across various scenarios.
…o anvil-specs-space-distribution
Description
Fixes #33739
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Anvil"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9443154667
Commit: 4a77067
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Tests