fix:Unpredictable movements of the dates in the date picker included
β¦in the table widget; are decreased by 1 day #25081
Description
[!TIP]
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #25081
or
Fixes https://github.com/appsmithorg/appsmith/issues/25081
[!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.Table"
:mag: Cypress test results
[!TIP] π’ π’ π’ All cypress tests have passed! π π π Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10738431328 Commit: 73bbacc535844a362475cf43d5e42685a3b21504 Cypress dashboard. Tags:
@tag.TableSpec:
Fri, 06 Sep 2024 13:15:17 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
SCREENSHOTS:
Summary by CodeRabbit
-
New Features
- Introduced new test logic for Table Widget V2 to handle adding new rows and editing date columns.
- Added new test suites to validate the functionality of the Date column in Table Widget V2, ensuring robust interaction and correct date formatting.
-
Bug Fixes
- Improved date handling in Table Widget V2 to ensure proper formatting and consistency when new rows are added.
Walkthrough
These changes enhance the testing framework for the Table Widget V2, specifically focusing on the addition of new rows and editing date columns. The modifications improve interactions with date pickers and ensure data consistency. Additionally, the DateCell.tsx file has been optimized for better management of the formattedDate assignment during the processing of new rows.
Changes
| Files | Summary |
|---|---|
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/AddNewRowEditColumn_spec.ts |
Introduced test logic for Table Widget V2 to add new rows and edit date columns, including setup, property toggling, editing columns, and data verification. |
app/client/src/widgets/TableWidgetV2/component/cellComponents/DateCell.tsx |
Refactored the onDateSelected function to initialize formattedDate early and updated calls to updateNewRowValues to ensure correct date formatting. |
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/DateColumnAddNewRow_EditRow_spec.ts |
Added a test suite to validate the Date column functionality, including adding new rows, editing date values, and verifying correct date display. |
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/DateColumn_ISOFormat_AddNewRow_EditRow_spec.ts |
Introduced a test suite focused on validating the Date column's ISO format during new row addition and editing, ensuring correct date handling. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant TableWidget
participant AddRowTest
participant DateCell
User->>+TableWidget: Initiate adding new row
TableWidget->>AddRowTest: Setup before tests
AddRowTest->>TableWidget: Toggle properties and edit column
User->>+TableWidget: Enter values and interact with date picker
TableWidget->>+DateCell: onDateSelected(date)
DateCell->>DateCell: Initialize formattedDate
DateCell->>TableWidget: updateNewRowValues with formattedDate
TableWidget->>User: Display updated table with new row and formatted dates
User->>+AddRowTest: Verify data consistency
AddRowTest->>User: Confirm test passed
Possibly related issues
-
appsmithorg/appsmith#35146: The changes in this PR may help address the flakiness in the
mysql_spec.tstests by enhancing the stability of date handling in the Table Widget V2.
Poem
In the realm of widgets, where dates take flight,
New rows are added, and all feels right.
With tests that dance and data that gleams,
A coder's delight, fulfilling their dreams.
Each click and toggle, a symphony plays,
In the world of code, we celebrate the ways!
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?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
--
I pushed a fix in commit <commit_id>, please review it.--Generate unit testing code for this file.-
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples: --@coderabbitai generate unit testing code for this file.--@coderabbitai modularize this function. - PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: --@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.--@coderabbitai read src/utils.ts and generate unit testing code.--@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.--@coderabbitai help me debug CodeRabbit configuration file.
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)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@somangshu this is new spec , we need to check for flakiness as well. we need to run this spec on EE at least 10 times to make sure there is no flakiness once it passes on CE. One can do this with adding new spec file path to "limited-test.txt" file and running with /ci-test-limit
@ApekshaBhosale that seems really cumbersome.
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.
/build-deploy-preview skip-tests=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10523912551.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 34314.
recreate: .
Deploy-Preview-URL: https://ce-34314.dp.appsmith.com
@somangshu Test are failing and can you please share me contributor PR in desc or here?
not sure.
@rahulbarwal has been managing this, probably he knows.
Otherwise, the branch name is Issue-25081-fix/Unpredictable-movements-of-the-dates-in-the-date-picker-included-in-the-table-widget-are-decreased-by-1-day
This should allow you to search the PR
@sagar-qa007 we have taken the ownership of this PR. I'll be taking care of the failing specs.
This issue is addressed in this PR - #36455