Conversation
WalkthroughThis pull request introduces a new Cypress test suite for template functionality in a client-side application. The test suite focuses on validating data bindings and button actions within a template, specifically for a Vehicle Maintenance App. The tests verify template forking, widget interactions, page navigation, and ensure no error messages are present during these operations. Changes
Suggested labels
Suggested reviewers
Possibly related PRs
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 🪧 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
|
|
/ci-test-limit-count run_count=1 update_snapshot=true specs_to_run=cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts |
|
/ci-test-limit-count run_count=5 update_snapshot=true specs_to_run=cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts |
|
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/12463358784. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
app/client/cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts (3)
21-27: Consider using data- attribute for text-based clicks.*
Currently, you're clicking the string "Vehicle Maintenance App" (line 24). It's preferable to use a data-* locator for more robust and maintainable tests.- agHelper.ContainsNClick("Vehicle Maintenance App"); + agHelper.ClickElement(template.vehicleAppLocator); // Example using a data-* locator
30-34: Verify naming consistency for widget entities.
"Container2CopyCopy" might be a temporary or auto-generated name. For clarity and maintainability, consider assigning more descriptive labels to widgets.
53-53: Avoid using text-based selectors for "Open Menu".
Using text-based selectors can become brittle. Prefer referencing a data-* attribute or a dedicated locator from your JSON locators file.- agHelper.ClickButton("Open Menu"); + agHelper.ClickButton(template.openMenuBtn);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/client/cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts (1)
Pattern 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.
🔇 Additional comments (2)
app/client/cypress/e2e/Regression/ClientSide/Templates/Template_DataBindingFunctions_spec.ts (2)
1-8: No direct usage of forbidden Cypress commands detected.
It's good that you haven't used cy.wait, cy.pause, or agHelper.sleep in the test setup, in accordance with the project's Cypress guidelines.
70-74: Efficient handling of query actions and validations.
It's good that you're using dataSources.RunQuery() and dataSources.AssertQueryResponseHeaders(). Multiple assertions here ensure reliable test coverage.
|
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12463358784. |
## Description Added new test case for the template module. Fixes [Issue URL](https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38309) ## Automation /ok-to-test tags="@tag.Templates" ### 🔍 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/12463337741> > Commit: d7d11f8 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12463337741&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Templates` > Spec: > <hr>Mon, 23 Dec 2024 08:19:52 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new test suite for validating template functionality in the client-side application. - Added comprehensive test cases to verify data bindings and button actions within templates. - **Tests** - Enhanced the testing framework with checks for data source connections and user interactions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description Added new test case for the template module. Fixes [Issue URL](https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38309) ## Automation /ok-to-test tags="@tag.Templates" ### 🔍 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/12463337741> > Commit: d7d11f8 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12463337741&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Templates` > Spec: > <hr>Mon, 23 Dec 2024 08:19:52 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new test suite for validating template functionality in the client-side application. - Added comprehensive test cases to verify data bindings and button actions within templates. - **Tests** - Enhanced the testing framework with checks for data source connections and user interactions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Added new test case for the template module.
Fixes Issue URL
Automation
/ok-to-test tags="@tag.Templates"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12463337741
Commit: d7d11f8
Cypress dashboard.
Tags:
@tag.TemplatesSpec:
Mon, 23 Dec 2024 08:19:52 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Tests