-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Automation test cases added for shared drive gsheet #38341
base: release
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
app/client/cypress/e2e/GSheet/SharedDrive_SelectedSheet_Access_Spec.ts (1)
363-367
: Avoid usingafter
hook in Cypress tests
The coding guidelines discourage the use ofafter
orafterEach
for 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
Avoidafter
hooks. 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.skip
might 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.skip
usage
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ 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 logic
Also applies to: 328-328
"Deleted row successfully!", | ||
); | ||
}); | ||
agHelper.Sleep(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ 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 condition
Committable suggestion skipped: line range outside the PR's diff.
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 #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
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12600683395
Commit: da06642
Cypress dashboard.
Tags:
@tag.Datasource
Spec:
Fri, 03 Jan 2025 17:12:50 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit