-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: Add pending tests for side by side #38881
Conversation
Warning Rate limit exceeded@hetunandu has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 38 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughThis pull request introduces enhancements to the Cypress test suite, focusing on improving test coverage for JavaScript objects, debugger functionality, and canvas view modes. The changes include adding new test cases, implementing methods for deleting JS objects, and expanding assertions for UI element rendering across different screen modes. Changes
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
|
…ommand_Click_Navigation_spec.js
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: 1
🔭 Outside diff range comments (1)
app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_View_mode.ts (1)
Line range hint
32-69
: Replace implicit cy.wait with better alternativesThe
assertTooltipPresence
likely uses cy.wait internally. Per coding guidelines, avoid using cy.wait.Consider using cy.intercept() with cy.should() for assertions instead.
🧹 Nitpick comments (6)
app/client/cypress/e2e/Regression/ClientSide/Debugger/JSObjects_navigation_spec.ts (1)
47-76
: Extract JS_OBJECT_BODY to avoid duplicationThe JS_OBJECT_BODY is duplicated from the previous test case. Consider extracting it to a shared constant.
+const COMMON_JS_OBJECT_BODY = `export default { + myVar1: [], + myVar2: {}, + myFun1 () { + // write code here + // this.myVar1 = [1,2,3] + let testing = test + "test"; + }, + async myFun2 () { + return [] + // use async-await or promises + // await storeValue('varName', 'hello world') + } +}`;app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx (1)
214-217
: Consider adding linter tab assertion for consistency.The split screen mode is missing the linter tab assertion that exists in the full screen test.
getByRole("tab", { name: /response/i }); getByRole("tab", { name: /logs/i }); + getByRole("tab", { name: /linter/i });
app/client/cypress/support/Pages/JSEditor.ts (1)
244-249
: Add error handling for deletion failures.The method should handle cases where the delete operation might fail.
public DeleteJSObjectFromContextMenu() { - cy.get(this.contextMenuTriggerLocator).click(); - cy.contains("Delete").should("be.visible").click(); - cy.contains("Are you sure?").should("be.visible").click(); + cy.get(this.contextMenuTriggerLocator) + .should("exist") + .click() + .then(() => { + cy.contains("Delete") + .should("be.visible") + .click() + .then(() => { + cy.contains("Are you sure?") + .should("be.visible") + .click(); + cy.get("body").should("not.contain", "Error deleting object"); + }); + }); }app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx (3)
226-234
: Consider adding logs and linter tab assertions for consistency.The split screen mode is missing some tab assertions that exist in the full screen test.
expect(getAllByRole("tab", { name: /headers/i })).toHaveLength(2); + getByRole("tab", { name: /logs/i }); + getByRole("tab", { name: /linter/i });
437-442
: Consider adding logs and linter tab assertions for consistency.The split screen mode is missing some tab assertions that exist in the full screen test.
getByRole("tab", { name: /datasource/i, selected: true }); getByRole("tab", { name: /response/i }); + getByRole("tab", { name: /logs/i }); + getByRole("tab", { name: /linter/i });
643-648
: Consider adding logs and linter tab assertions for consistency.The split screen mode is missing some tab assertions that exist in the full screen test.
getByRole("tab", { name: /datasource/i, selected: true }); getByRole("tab", { name: /response/i }); + getByRole("tab", { name: /logs/i }); + getByRole("tab", { name: /linter/i });
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/client/cypress/e2e/Regression/ClientSide/Debugger/JSObjects_navigation_spec.ts
(2 hunks)app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_View_mode.ts
(2 hunks)app/client/cypress/support/Pages/JSEditor.ts
(1 hunks)app/client/cypress/support/index.d.ts
(1 hunks)app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx
(2 hunks)app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx
(9 hunks)app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
app/client/cypress/support/index.d.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/support/Pages/JSEditor.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/Regression/ClientSide/Debugger/JSObjects_navigation_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/Regression/ClientSide/IDE/Canvas_View_mode.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.
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: perform-test / rts-build / build
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-lint / client-lint
- GitHub Check: client-build / client-build
🔇 Additional comments (7)
app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_View_mode.ts (1)
17-28
: Verify type handling for inputValue changesThe change from numeric (0) to string ("Hello") type in
inputValue
could cause type-related issues in dependent code.app/client/cypress/support/index.d.ts (1)
310-311
: LGTM!The new
updateCodeInput
method signature is well-defined and follows TypeScript best practices.app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx (1)
Line range hint
165-206
: LGTM! Well-structured test improvementsGood use of React Testing Library best practices:
- Proper use of act() for state updates
- Using getByRole for better accessibility testing
- Clear test assertions
app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx (1)
162-166
: LGTM! Good test coverage for bottom tabs.The added assertions verify the presence of essential UI elements in full screen mode.
app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx (3)
173-180
: LGTM! Comprehensive test coverage for API route bottom tabs.The assertions properly verify all required tabs in full screen mode.
382-389
: LGTM! Good test coverage for Postgres route bottom tabs.The assertions properly verify all required tabs in full screen mode.
587-594
: LGTM! Good test coverage for Google Sheets route bottom tabs.The assertions properly verify all required tabs in full screen mode.
Description
Automate pending manual tests for side by side mode
Automation
/ok-to-test tags="@tag.IDE, @tag.JS"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13025650575
Commit: ede2815
Cypress dashboard.
Tags:
@tag.All
Spec:
Wed, 29 Jan 2025 07:49:49 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Tests
Chores