[POC] Converted JS test to TS
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 #Issue Number
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.All"
:mag: Cypress test results
[!CAUTION] 🔴 🔴 🔴 Some tests have failed. Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10574105422 Commit: 2ae2413bd4446cbe8c1f3d0b9a853d1d0bf453d9 Cypress dashboard. Tags: @tag.All Spec: The following are new failures, please fix them before merging the PR:
List of identified flaky tests.
- cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.ts
- cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.ts
- cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.ts
- cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts
- cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts
- cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.ts
- cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.ts
- cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts
Tue, 27 Aug 2024 09:12:12 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
Summary by CodeRabbit
-
New Features
- Enhanced flexibility in the
hideAndVerifyPropertiesfunction by making theresolveFieldValueparameter optional, allowing for more versatile use in test scenarios. - Expanded GitHub Actions workflow to trigger on pull requests targeting the
masterbranch, improving integration and testing capabilities.
- Enhanced flexibility in the
-
Bug Fixes
- Improved usability of the function without compromising its core functionality, ensuring consistent behavior across various contexts.
Walkthrough
The changes involve modifying the hideAndVerifyProperties function in two test specification files by making the resolveFieldValue parameter optional. This adjustment allows the function to be invoked without needing to provide a value for this parameter, enhancing its flexibility while maintaining the existing logic of the function. Additionally, a modification to the GitHub Actions workflow has been made to include the master branch for pull request triggers.
Changes
| File(s) | Change Summary |
|---|---|
app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.ts, app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.ts |
Changed resolveFieldValue parameter from required to optional in hideAndVerifyProperties function. |
.github/workflows/pr-automation.yml |
Added master branch to the trigger conditions for pull requests in GitHub Actions workflow. |
Poem
In code we dance, with changes bright,
A function's form, now feels just right.
Optional paths, we weave with glee,
Flexibility blooms, as it should be.
With every test, our spirits soar,
In logic's embrace, we explore once more! 🐇✨
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>. -
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 generate interesting stats about this repository and render them as a table. -
@coderabbitai show all the console.log statements in this repository. -
@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 as 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.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
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.