chore: Automation test cases added for shared drive gsheet#38341
chore: Automation test cases added for shared drive gsheet#38341sagar-qa007 merged 3 commits intoreleasefrom
Conversation
|
/build-deploy-preview skip-tests=true |
WalkthroughThe pull request involves modifications to Cypress end-to-end test suites for Google Sheets functionality. Multiple test files in the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/12478237255. |
|
Deploy-Preview-URL: https://ce-38341.dp.appsmith.com |
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
983ba09 to
94922d2
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
app/client/cypress/e2e/GSheet/SharedDrive_SelectedSheet_Access_Spec.ts (1)
363-367: Avoid usingafterhook in Cypress tests
The coding guidelines discourage the use ofafterorafterEachfor cleanup in e2e tests. Consider using a dedicated cleanup step within each test or a shared utility instead.-after("Delete app", function () { +// Perform cleanup within the relevant tests or an alternative approach (e.g., a custom command) instead of after()app/client/cypress/e2e/GSheet/WidgetBinding_SharedDrive_SelectedSheet_Access_Spec.ts (1)
86-110: Follow Cypress guidelines for cleanup
Avoidafterhooks. Instead, consolidate cleanup logic within each test or use a dedicated pre-test setup that ensures a clean environment.-after("Delete app", function () { +// Move this cleanup logic into a custom command or inside test body if truly necessary
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts(1 hunks)app/client/cypress/e2e/GSheet/SharedDrive_SelectedSheet_Access_Spec.ts(1 hunks)app/client/cypress/e2e/GSheet/WidgetBinding_SelectedAccess_Spec.ts(1 hunks)app/client/cypress/e2e/GSheet/WidgetBinding_SharedDrive_SelectedSheet_Access_Spec.ts(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- app/client/cypress/e2e/GSheet/SelectedSheet_Access_Spec.ts
- app/client/cypress/e2e/GSheet/WidgetBinding_SelectedAccess_Spec.ts
🧰 Additional context used
📓 Path-based instructions (2)
app/client/cypress/e2e/GSheet/SharedDrive_SelectedSheet_Access_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.
app/client/cypress/e2e/GSheet/WidgetBinding_SharedDrive_SelectedSheet_Access_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/GSheet/SharedDrive_SelectedSheet_Access_Spec.ts (1)
19-24: Avoid skipping essential tests
Disabling the entire test suite usingdescribe.skipmight hide regressions. If these tests must be skipped, consider referencing a tracking ticket and reactivating them as soon as possible.app/client/cypress/e2e/GSheet/WidgetBinding_SharedDrive_SelectedSheet_Access_Spec.ts (1)
24-28: Revisitdescribe.skipusage
Skipping the entire suite might obscure critical coverage. If necessary, leave a clear TODO or reference ticket to ensure re-enablement when stable.
| "Deleted row successfully!", | ||
| ); | ||
| }); | ||
| agHelper.Sleep(500); |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Remove agHelper.Sleep() calls
Using agHelper.Sleep(…) violates the Cypress best practice of avoiding arbitrary sleeps. Cypress provides hooks to wait for specific elements or requests using aliases (e.g., cy.wait("@alias")) or queries (cy.get(selector)).
- agHelper.Sleep(500);
...
- agHelper.Sleep();
+ // Replace these sleeps with an appropriate assertion or wait logicAlso applies to: 328-328
| "Deleted row successfully!", | ||
| ); | ||
| }); | ||
| agHelper.Sleep(500); |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Eliminate reliance on agHelper.Sleep(500)
Using hard-coded sleeps may cause flaky tests. Prefer waiting on deterministic events or specific conditions.
- agHelper.Sleep(500);
+ // Replace with an explicit wait on a DOM element, network call, or custom conditionCommittable suggestion skipped: line range outside the PR's diff.
…rg#38341) ## Description This PR adds automation test cases for Google sheet shared drive support feature. Skipping the cases due to chrome crash. Run success : https://github.com/appsmithorg/appsmith/actions/runs/12599681652/job/35117116909 Fixes appsmithorg#37916 _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.Datasource" ### 🔍 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/12600683395> > Commit: da06642 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12600683395&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Datasource` > Spec: > <hr>Fri, 03 Jan 2025 17:12:50 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 - **Tests** - Skipped multiple Cypress test suites for Google Sheets functionality - Added a new test suite for Google Sheets widget binding with selected sheet access - Disabled existing test suites for GSheet functional tests and widget binding <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Sagar Khalasi <sagar@appsmith.com>
Description
This PR adds automation test cases for Google sheet shared drive support feature. Skipping the cases due to chrome crash.
Run success : https://github.com/appsmithorg/appsmith/actions/runs/12599681652/job/35117116909
#38477
Fixes #37916
or
Fixes
Issue URLWarning
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.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12600683395
Commit: da06642
Cypress dashboard.
Tags:
@tag.DatasourceSpec:
Fri, 03 Jan 2025 17:12:50 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit