revert: change value to label in onItemSelect inside SelectCell of table widget#34872
Conversation
… of tabl…" This reverts commit b7853a9.
WalkthroughThis update focuses on refactoring test cases related to select options within a table widget in the Cypress test suite and updating the Changes
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 (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (4 hunks)
- app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx (1 hunks)
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (1)
Pattern
app/client/cypress/**/**.*: Follow best practices for Cypress code and e2e automation.
Avoid using cy.wait in code.
Avoid using cy.pause in code.
Use variables for locators, not strings.
Usedata-*attributes for selectors; avoid Xpaths and CSS attributes.
Avoid selectors like.btn.submitorbutton[type=submit].
Perform logins via API withLoginFromAPI.
Only interact with controlled sites/servers.
Ensure tests can run withit.onlyand are independent.
Usebefore,beforeEach,after,afterEachcorrectly; clean state before tests.
Check new specs for flakiness by running them 10 times on CI.
Use multiple assertions; don't treat Cypress as unit tests.
Use constants for strings.
Include datasource operations inbeforehooks.
Do not use duplicate filenames.
Additional comments not posted (5)
app/client/src/widgets/TableWidgetV2/component/cellComponents/SelectCell.tsx (1)
152-155: LGTM! The change aligns with the PR objective.The
onSelectfunction now correctly usesoption.valueinstead ofoption.label.app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts (4)
Line range hint
177-201:
Test case description update is accurate.The test case checks the accessibility of
currentRowin the select options.
Line range hint
202-267:
Test case description update is accurate.The test case checks the functionality of the "same select option in new row" property.
Line range hint
268-332:
Test case description update is accurate.The test case checks the functionality of the "new row select options" property.
Line range hint
333-358:
Test case description update is accurate.The test case checks the functionality of server-side filtering.
…ble widget (#34872) Reverts #34743 ## Automation /ok-to-test tags="@tag.Table" ### 🔍 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/9888593641> > Commit: eec3175 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9888593641&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Table` > Spec: > <hr>Thu, 11 Jul 2024 09:38:04 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved test cases for select options in the table widget for better clarity and organization. - Updated `SelectCell` component to use option values instead of labels for item selection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Reverts #34743
Automation
/ok-to-test tags="@tag.Table"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9888593641
Commit: eec3175
Cypress dashboard.
Tags:
@tag.TableSpec:
Thu, 11 Jul 2024 09:38:04 UTC
Summary by CodeRabbit
SelectCellcomponent to use option values instead of labels for item selection.