Conversation
…o chore/remove-ff-entity-item-usage
WalkthroughThis pull request applies widespread updates across Cypress locators, test files, and related DSL definitions. Key modifications include refactoring the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Cypress Test
participant Helper as AggregateHelper (TypeText)
participant Input as Entity Input Field
Test->>Helper: Call TypeText(selector, newName, { clear: true })
alt clear flag is true
Helper->>Input: Execute clear()
end
Helper->>Input: Type newName
Test->>Input: Verify attribute data-selected="true"
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🔇 Additional comments (2)
🪧 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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/client/src/pages/Editor/IDE/EditorPane/UI/List.tsx (1)
54-93: Consider simplifying the nested conditional rendering.The component has multiple nested conditional renders (
!widgetsExist,canManagePages,widgetsExist). Consider extracting these into separate components or using early returns to improve readability.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
app/client/src/ce/entities/FeatureFlag.ts(0 hunks)app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx(0 hunks)app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx(0 hunks)app/client/src/ee/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx(0 hunks)app/client/src/ee/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx(0 hunks)app/client/src/pages/Editor/Explorer/Widgets/OldWidgetEntityList.tsx(0 hunks)app/client/src/pages/Editor/Explorer/Widgets/WidgetContextMenu.tsx(0 hunks)app/client/src/pages/Editor/Explorer/Widgets/WidgetEntity.tsx(0 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/UI/List.tsx(1 hunks)
💤 Files with no reviewable changes (8)
- app/client/src/ee/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx
- app/client/src/ee/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx
- app/client/src/pages/Editor/Explorer/Widgets/WidgetContextMenu.tsx
- app/client/src/ce/entities/FeatureFlag.ts
- app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx
- app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx
- app/client/src/pages/Editor/Explorer/Widgets/WidgetEntity.tsx
- app/client/src/pages/Editor/Explorer/Widgets/OldWidgetEntityList.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-lint / client-lint
- GitHub Check: client-build / client-build
🔇 Additional comments (3)
app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx (1)
61-72: LGTM! Clean and simplified rendering logic.The direct rendering of
EntityGroupsListwith mapped groups and items improves code readability and maintainability.app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx (1)
69-80: LGTM! Clean and simplified rendering logic.The direct rendering of
EntityGroupsListwith mapped groups and items improves code readability. Good handling of the "NA" group case.app/client/src/pages/Editor/IDE/EditorPane/UI/List.tsx (1)
22-27: Verify if the license feature flag is still required.The component still uses
FEATURE_FLAG.license_gac_enabled. Let's verify if this feature flag is still needed.✅ Verification successful
🏁 Script executed:
#!/bin/bash # Search for other usages of the license feature flag rg "license_gac_enabled" -A 5Length of output: 45237
License Feature Flag Usage Confirmed as Required
Our search confirms that
FEATURE_FLAG.license_gac_enabledis widely used across the codebase, including in theList.tsxfile. Its continued presence in multiple modules and permission checks indicates that it remains essential for current logic.
- The flag is actively used in various permission and feature check contexts.
- No redundant or obsolete usage was identified.
…o chore/remove-ff-entity-item-usage
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx (1)
11-13: Simplify the boolean condition.The
Booleancast is redundant as the expression will be automatically coerced to a boolean.- if (Boolean(jsAction?.isMainJSCollection)) { + if (jsAction?.isMainJSCollection) {🧰 Tools
🪛 Biome (1.9.4)
[error] 11-11: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/AppJSContextMenuItems.tsx (1)
38-40: Simplify the boolean condition.The
Booleancast is redundant as the expression will be automatically coerced to a boolean.- if (Boolean(jsAction?.isMainJSCollection)) { + if (jsAction?.isMainJSCollection) {🧰 Tools
🪛 Biome (1.9.4)
[error] 38-38: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx (1)
31-33: Simplify the boolean condition.The
Booleancast is redundant as the expression will be automatically coerced to a boolean.- if (Boolean(jsCollection?.isMainJSCollection)) { + if (jsCollection?.isMainJSCollection) {🧰 Tools
🪛 Biome (1.9.4)
[error] 31-31: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx (1)
51-54: Simplify the boolean condition and approve the computed property.The computed property improves code organization, but the
Booleancast is redundant.const canEdit = useMemo( - () => canManageJSAction && !Boolean(jsAction?.isMainJSCollection), + () => canManageJSAction && !jsAction?.isMainJSCollection, [canManageJSAction, jsAction?.isMainJSCollection], );🧰 Tools
🪛 Biome (1.9.4)
[error] 52-52: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx(1 hunks)app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx(1 hunks)app/client/src/ce/entities/FeatureFlag.ts(0 hunks)app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/AppJSContextMenuItems.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx(3 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx(3 hunks)app/client/src/pages/Editor/IDE/EditorPane/components/EntityContextMenu.tsx(2 hunks)app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- app/client/src/ce/entities/FeatureFlag.ts
✅ Files skipped from review due to trivial changes (1)
- app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx
🧰 Additional context used
🪛 Biome (1.9.4)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/AppJSContextMenuItems.tsx
[error] 38-38: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx
[error] 31-31: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx
[error] 11-11: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx
[error] 52-52: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
🔇 Additional comments (9)
app/client/src/pages/Editor/IDE/EditorPane/components/EntityContextMenu.tsx (2)
10-13: LGTM! Props interface improvements.The changes improve type safety by making
childrenrequired and enhance testability with the optionaldataTestId.
28-35: LGTM! Improved Button component testability.Good practice to make the test ID configurable through props instead of hardcoding it.
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx (1)
68-71: LGTM! Added data-testid for better test stability.The addition of the dataTestId prop follows a consistent pattern and improves test maintainability.
app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx (1)
69-80: LGTM! Simplified rendering logic by removing feature flag.The code is now cleaner and more maintainable with the removal of conditional rendering based on feature flags.
app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx (1)
110-112: LGTM! Improved consistency in component identification and selection.The changes improve consistency by:
- Adding dataTestId following the established pattern
- Using item.key for selection state instead of action.id
app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx (1)
148-149: LGTM! Updated test assertions for better reliability.The test now uses data-selected attribute instead of class-based checks, making it more reliable and consistent with the component changes.
app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx (1)
159-160: LGTM! The changes align with the feature flag removal.The test assertions have been consistently updated to check the
data-selectedattribute instead of usingclassList.contains("active"). This change reflects the new implementation after removing the feature flag for the Entity Item component.Also applies to: 370-371, 574-575
app/client/src/pages/Editor/JSEditor/AppJSEditorContextMenu.tsx (1)
36-36: LGTM! Good addition of test ID.Adding
dataTestIdimproves testability.app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx (1)
100-103: LGTM! Good improvements to component props.The changes to className and isSelected props improve clarity and consistency.
…o chore/remove-ff-entity-item-usage
There was a problem hiding this comment.
Actionable comments posted: 3
🔭 Outside diff range comments (2)
app/client/cypress/support/Pages/EntityExplorer.ts (2)
83-83: Remove usage ofagHelper.Sleep().The code contains multiple instances of
agHelper.Sleep()which is against the coding guidelines. Instead, use Cypress's built-in retry-ability and wait for specific elements or conditions.Here's how to fix this:
- this.agHelper.Sleep(); + this.agHelper.WaitUntil(() => /* specific condition */); - this.agHelper.Sleep(1000); + cy.wait("@relevantAPICall"); // or + cy.get("selector").should("exist"); - this.agHelper.Sleep(500); + this.agHelper.WaitUntil(() => /* specific condition */);Also applies to: 92-92, 115-115, 146-146, 152-152, 190-190, 241-241, 281-281
87-91: Replace force clicks with proper element assertions.Using
force: truewith clicks should be avoided. Instead, ensure elements are properly visible and clickable.Here's how to improve this:
- cy.xpath(this._contextMenu(entityNameinLeftSidebar)) - .scrollIntoView() - .last() - .click({ force: true }); + cy.xpath(this._contextMenu(entityNameinLeftSidebar)) + .scrollIntoView() + .last() + .should("be.visible") + .should("be.enabled") + .click();Also applies to: 111-114
🧹 Nitpick comments (4)
app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx (1)
69-80: LGTM! Consider extracting group title transformation.The simplified rendering logic looks good and aligns with removing the feature flag.
Consider extracting the group title transformation to improve readability:
<EntityGroupsList groups={filteredItemGroups.map(({ group, items }) => { + const groupTitle = group === "NA" ? "" : group; return { - groupTitle: group === "NA" ? "" : group, + groupTitle, items: items, className: "", renderList: (item: EntityItem) => { return <JSEntity item={item} key={item.key} />; }, }; })} />app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx (1)
11-13: Simplify boolean expression by removing redundant Boolean cast.- if (Boolean(jsAction?.isMainJSCollection)) { + if (jsAction?.isMainJSCollection) {🧰 Tools
🪛 Biome (1.9.4)
[error] 11-11: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx (1)
51-54: Simplify boolean expression in canEdit computation.const canEdit = useMemo( - () => canManageJSAction && !Boolean(jsAction?.isMainJSCollection), + () => canManageJSAction && !jsAction?.isMainJSCollection, [canManageJSAction, jsAction?.isMainJSCollection], );🧰 Tools
🪛 Biome (1.9.4)
[error] 52-52: Avoid redundant
BooleancallIt is not necessary to use
Booleancall when a value will already be coerced to a boolean.
Unsafe fix: Remove redundantBooleancall(lint/complexity/noExtraBooleanCast)
app/client/cypress/support/Pages/EntityExplorer.ts (1)
168-202: Improve drag and drop implementation.The current implementation uses low-level mouse events which can be flaky. Consider using Cypress's drag-and-drop commands or a more reliable approach.
Consider using
@4tw/cypress-drag-dropplugin:- .trigger("dragstart", { force: true }) - .trigger("mousemove", x, y, { force: true }); + .drag(dropSelector, { + force: true, + target: { x, y } + });
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
app/client/cypress/support/Objects/CommonLocators.ts(3 hunks)app/client/cypress/support/Pages/EditorNavigation.ts(1 hunks)app/client/cypress/support/Pages/EntityExplorer.ts(1 hunks)app/client/cypress/support/Pages/IDE/LeftPane.ts(2 hunks)app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx(1 hunks)app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx(2 hunks)app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx(3 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
- app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx
- app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.tsx
- app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx
- app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx
- app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx
- app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx
🧰 Additional context used
📓 Path-based instructions (1)
`app/client/cypress/**/**.*`: Review the following e2e test ...
app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/support/Pages/EntityExplorer.tsapp/client/cypress/support/Pages/EditorNavigation.tsapp/client/cypress/support/Pages/IDE/LeftPane.tsapp/client/cypress/support/Objects/CommonLocators.ts
🪛 Biome (1.9.4)
app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx
[error] 11-11: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx
[error] 52-52: Avoid redundant Boolean call
It is not necessary to use Boolean call when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant Boolean call
(lint/complexity/noExtraBooleanCast)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-build / client-build
- GitHub Check: client-prettier / prettier-check
- GitHub Check: chromatic-deployment
- GitHub Check: chromatic-deployment
- GitHub Check: storybook-tests
🔇 Additional comments (4)
app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx (1)
98-112: LGTM! Clean implementation of EntityItem component.The component properly implements conditional editing, selection state, and navigation functionality.
app/client/cypress/support/Pages/EntityExplorer.ts (1)
71-71: LGTM: New entity add button selector added.The selector follows the data-testid pattern with a meaningful name.
app/client/cypress/support/Pages/IDE/LeftPane.ts (1)
91-98: LGTM! Well-structured method addition.The new selectedItem method is well-typed and follows the codebase patterns.
app/client/cypress/support/Objects/CommonLocators.ts (1)
339-345: LGTM! Well-structured locators using data-testid.The new module-related locators follow best practices by using data-testid attributes.
…o chore/remove-ff-entity-item-usage
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13257191139. |
|
Deploy-Preview-URL: https://ce-39093.dp.appsmith.com |
…Item/QueryEntityItem.tsx
…er/QuerySegmentList.tsx
…tTree/WidgetContextMenu.tsx
…dgetEntityList.tsx
…ithorg/appsmith into chore/remove-ff-entity-item-usage
…ist/UIList.test.tsx" This reverts commit 6eefeb4.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/client/src/pages/AppIDE/components/UIList/UIList.test.tsx (1)
349-350: Improved test query methodGood refactoring from
querySelectorwith ID selector togetByTestId. This follows React Testing Library best practices by:
- Using dedicated test IDs rather than implementation details
- Improving test stability against UI changes
- Better expressing test intent
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
app/client/src/pages/AppIDE/components/UIList/UIList.test.tsx(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-build / client-build
🔇 Additional comments (1)
app/client/src/pages/AppIDE/components/UIList/UIList.test.tsx (1)
96-96: Entity name selector updated correctlyThe change from
div.t--entity-nametospan.t--entity-namealigns with the Entity Item component structure changes after removing the feature flag.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/client/cypress/support/Pages/EntityExplorer.ts (1)
287-296:Details
❓ Verification inconclusive
Check if double PageList.ShowList() is necessary.
The code calls PageList.ShowList() twice consecutively, which seems redundant and could be problematic if the first call toggles the list open and the second toggles it closed.
else { if (entityType === EntityItems.Page) { PageList.ShowList(); cy.get(this.locator._entityTestId(entityName)).click(); - PageList.ShowList(); + // Only show list again if needed - consider adding a check here cy.get(this.locator._entityTestId(entityName)).dblclick(); } else { cy.get(this.locator._entityTestId(entityName)).dblclick(); } }
🏁 Script executed:
#!/bin/bash # Check if PageList.ShowList() is a toggle or always shows the list rg -A 5 "ShowList\(\)" app/client/cypress/support/Length of output: 6001
Action Required: Verify Necessity of Double
PageList.ShowList()Calls
- In
app/client/cypress/support/Pages/EntityExplorer.ts(lines 287-296), the code callsPageList.ShowList()before a click and again before a double-click.- The implementation in
PageList.tsindicates thatShowList()checks if the list is closed (via thedata-stateattribute) and only opens it if necessary.- If the click on the entity doesn't toggle the list closed, the second call may be redundant. However, if clicking causes the list to collapse, the second call ensures the list is visible for the subsequent double-click.
- Recommendation: Verify the actual behavior after the click event. If the list remains open post-click, consider removing or conditionally executing the second
PageList.ShowList()call to streamline the test.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (2)
app/client/cypress/support/Pages/EntityExplorer.ts(5 hunks)app/client/src/pages/AppIDE/components/QueryEntityItem/QueryEntityItem.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`app/client/cypress/**/**.*`: Review the following e2e test ...
app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/support/Pages/EntityExplorer.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-build / client-build
- GitHub Check: client-lint / client-lint
🔇 Additional comments (5)
app/client/src/pages/AppIDE/components/QueryEntityItem/QueryEntityItem.tsx (1)
53-56: Adding key and dataTestId to EntityContextMenu is a good practice.Adding a unique
keyprop usingaction.idhelps React efficiently update the DOM during reconciliation. ThedataTestIdattribute enhances testability by providing a consistent selector for automated tests.app/client/cypress/support/Pages/EntityExplorer.ts (4)
54-57: Replace XPath selector with data- attribute.*The selector still uses XPath with hardcoded HTML tags which violates the coding guidelines to avoid XPath selectors.
- "//span[text()='" + - entityNameinLeftSidebar + - "']/parent::div/following-sibling::div//button"; + `[data-cy="entity-context-menu-${entityNameinLeftSidebar}"]`;
71-71: Use data-testid for entity add button selector.The selector uses a class which is more brittle than data attributes.
- _entityAddButton = ".t--entity-add-btn"; + _entityAddButton = "[data-testid='t--entity-add-btn']";
121-124: Looks good.This change appropriately expands the tooltip validation message to include the restricted keyword scenario.
157-157: Good refactoring.Nice extraction of the repeated logic into a separate method.
## Description Just UI changes from appsmithorg#39093 Fixes appsmithorg#39556 ## Automation /ok-to-test tags="@tag.IDE" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13673781581> > Commit: b78e21d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13673781581&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.IDE` > Spec: > <hr>Wed, 05 Mar 2025 10:57:58 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced editable text components now support name normalization with dynamic ellipsis and improved tooltip handling. - Entity and widget list views now display names directly with updated expand/collapse icons and refined selection behavior. - Context menus reflect conditional interactivity by disabling options based on permissions and item types. - New identifiers for list items and context menus improve testing capabilities. - **Refactor** - Consolidated property handling and class name assignments across components for consistent behavior. - Streamlined data structures and conditional rendering in entity explorers and context menus to enhance clarity and maintainability. - Updated components to use direct property access for improved performance and readability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
… ADS templates (appsmithorg#39093) ## Description Removing the feature flag for using Entity Item component from ADS templates in the Entity Explorer in App Editor. Fixes [appsmithorg#39067](appsmithorg#39067) ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13804174182> > Commit: 8a4a200 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13804174182&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 12 Mar 2025 06:32:35 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved entity renaming: input fields now automatically clear previous text for smoother editing. - Enhanced page navigation: active selections are now verified more consistently, ensuring clearer context. - New feature flag added for enhanced entity item visibility. - Added new methods for improved entity selection and verification in tests. - Introduced `parentId` properties in widget definitions to enhance hierarchical structure. - Updated selectors for widget names and collapsible elements in tests for improved targeting. - **Bug Fixes** - Resolved issues with inconsistent element detection and state feedback for a more stable interface. - **Refactor** - Updated widget hierarchy and locator logic for improved layout rendering and overall UI consistency. - Modified locator strategies to enhance element targeting across various components. - Simplified method signatures for better clarity and maintainability. - Enhanced test selectors to improve reliability and maintainability. - Removed obsolete commands and streamlined interaction methods in tests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Hetu Nandu <hetunandu@gmail.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Description
Removing the feature flag for using Entity Item component from ADS templates in the Entity Explorer in App Editor.
Fixes #39067
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13804174182
Commit: 8a4a200
Cypress dashboard.
Tags:
@tag.AllSpec:
Wed, 12 Mar 2025 06:32:35 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
parentIdproperties in widget definitions to enhance hierarchical structure.Bug Fixes
Refactor