appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[POC] Converted JS test to TS

Open sagar-qa007 opened this issue 1 year ago • 1 comments

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:

  1. cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_1_spec.ts
  2. cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Property_Pane_2_spec.ts
  3. cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.ts
  4. cypress/e2e/Regression/ClientSide/Templates/CreateNewAppFromTemplates_spec.ts
  5. cypress/e2e/Regression/ClientSide/Templates/Filtering/TemplatesModal_filtering_spec.ts
  6. cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckboxGroup2_spec.ts
  7. cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_3_spec.ts
  8. cypress/e2e/Regression/ClientSide/Widgets/TableV2/columnTypes/Select1_spec.ts
List of identified flaky tests.
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 hideAndVerifyProperties function by making the resolveFieldValue parameter optional, allowing for more versatile use in test scenarios.
    • Expanded GitHub Actions workflow to trigger on pull requests targeting the master branch, improving integration and testing capabilities.
  • Bug Fixes

    • Improved usability of the function without compromising its core functionality, ensuring consistent behavior across various contexts.

sagar-qa007 avatar Aug 27 '24 07:08 sagar-qa007

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 @coderabbitai in 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 @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to 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.

coderabbitai[bot] avatar Aug 27 '24 07:08 coderabbitai[bot]