-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: MaintainContext&Focus test #36581
Conversation
WalkthroughThe pull request introduces various modifications to the test file Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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
|
/ci-test-limit-count run_count=5 |
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: 4
🧹 Outside diff range and nitpick comments (1)
app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js (1)
Line range hint
1-207
: Class, let's review our overall progress on this test file.You've made some good improvements to this test suite. Your changes to selector usage and test organization are steps in the right direction. However, there's always room for improvement:
Consider using more data-* attributes for selectors throughout the file. This will make your tests more robust and easier to maintain.
Look for opportunities to use constants for repeated values or selectors. This will improve maintainability.
Consider breaking down large test cases into smaller, more focused ones. This will make it easier to identify and fix issues when they arise.
Add more descriptive comments before each test case explaining what specific functionality it's testing. This will help future developers understand the purpose of each test.
Review the use of
cy.wait()
andagHelper.Sleep()
in your tests. These can make tests flaky and slow. Consider using Cypress's built-in retry-ability instead.Keep up the good work, and remember: clear, maintainable tests are key to a healthy codebase!
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js (6 hunks)
- app/client/cypress/support/Pages/IDE/LeftPane.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js (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/IDE/LeftPane.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/IDE/MaintainContext&Focus_spec.js (2)
9-9
: Well done, class! You've added a new import.The addition of
PageLeftPane
to the imports is a good step. It shows you're preparing to use this module in your test cases. Remember, importing only what you need keeps your code tidy and efficient.
164-164
: Attention, class! We've had some changes in our test numbering.I see you've renumbered your test cases. This is good housekeeping! It keeps our test suite organized and easy to follow. However, I have a question for you:
Can you explain why the previous test case was removed? It's important to understand the reasoning behind such changes. Was it redundant, or has the functionality it was testing been removed from the application?
Please provide a brief explanation in a comment above the first renumbered test case. This will help future readers understand the change in numbering.
Also applies to: 173-173, 191-191
app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js
Show resolved
Hide resolved
app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js
Show resolved
Hide resolved
app/client/cypress/e2e/Regression/ClientSide/IDE/MaintainContext&Focus_spec.js
Show resolved
Hide resolved
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11066202121. |
/ci-test-limit-count run_count=5 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11067344437. |
/ci-test-limit-count run_count=5 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11071196831. |
/ci-test-limit-count run_count=5 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11099689761. |
Description
Fixes the long time skipped MaintainContext&Focus test by updating the method of switching segments
Also removes some old features that were being tested
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Warning
Tests have not run on the HEAD 89161b3 yet
Fri, 27 Sep 2024 08:35:24 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
Tests
MaintainContext&Focus_spec.js
test file to limited tests while commenting out theFork_Template_spec.js
file.selectSegment
method to prevent unnecessary clicks on already selected segments.