-
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
test: fix DataSourceScheme #36339
test: fix DataSourceScheme #36339
Conversation
WalkthroughThe pull request introduces several modifications to the Cypress testing framework, particularly focusing on the Changes
Possibly related PRs
Suggested labels
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
|
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: 0
Outside diff range and nitpick comments (1)
app/client/cypress/support/Pages/DataSources.ts (1)
Line range hint
1376-1381
: Consider using a more reliable waiting mechanism.Instead of using fixed sleep durations like
this.agHelper.Sleep(2500)
andthis.agHelper.Sleep(1000)
, it would be better to wait for specific elements to appear or network requests to complete. This would make the test more resilient to timing variations.For example, you could wait for the query editor to be visible using
this.agHelper.AssertElementVisibility
and wait for the search results to load by intercepting the relevant network request.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts (4 hunks)
- app/client/cypress/limited-tests.txt (1 hunks)
- app/client/cypress/support/Pages/DataSources.ts (2 hunks)
Additional context used
Path-based instructions (3)
app/client/cypress/limited-tests.txt (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/BugTests/DatasourceSchema_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/support/Pages/DataSources.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 not posted (7)
app/client/cypress/limited-tests.txt (1)
2-2
: Good work on updating the limited tests path!The change in the limited tests path from
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
tocypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts
is appropriate. It correctly shifts the focus to testing the "Datasource Schema" functionality within the BugTests category.Keep up the great work in maintaining the Cypress tests!
app/client/cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts (5)
6-6
: Excellent work!The import statement for
locators
is correctly added and follows the established pattern. Keep up the good work!
50-51
: Good job skipping the test case!Skipping the test case due to the known bug is the right approach. The comment clearly explains the reason and references the bug number. Well done!
75-81
: Great job with the schema verification!The code segment follows the best practices by using locator variables and data-* attributes for selectors. The assertion for the absence of the loading spinner is a smart move to ensure the UI is ready. The filtering and verification of the datasource schema is implemented correctly. Keep up the excellent work!
93-94
: Nice work with the schema tab interaction!Clicking on the schema tab before filtering and verifying the datasource schema is a good practice. It ensures that the schema is visible and ready for verification. The code segment follows the guidelines by using locator variables and data-* attributes for selectors. Well done!
99-99
: Excellent work with the schema refresh verification!Filtering and verifying the datasource schema after refreshing is a great way to ensure that the schema is still shown correctly. The code segment adheres to the guidelines by using locator variables and data-* attributes for selectors. Keep up the fantastic work!
app/client/cypress/support/Pages/DataSources.ts (1)
204-204
: Great work declaring the_dsTabSchema
property!Assigning the CSS selector for the schema tab element to a private property is a good practice. It encapsulates the selector within the
DataSources
class, preventing unintended modifications from outside the class.
/ci-test-limit-count run_count=25 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/10880719238. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10880719238.
|
test: Fixing DataSourceScheme test EE PR: https://github.com/appsmithorg/appsmith-ee/pull/5155 Improved reliability of data source schema tests by ensuring correct UI interactions and logical flow. Enhanced verification process by checking for the absence of loading spinners before data verification. **Bugs Raised as part of fixing the spec:** appsmithorg#36349 Test Skipped: appsmithorg#36348 /ok-to-test tags="@tag.All" <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10885399399> > Commit: 12ca3b6 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10885399399&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Mon, 16 Sep 2024 15:08:37 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **Bug Fixes** - Skipped a test case for schema fetching due to a known bug, improving test reliability. - **New Features** - Enhanced search functionality within the datasource structure, ensuring previous inputs do not interfere with new searches. - Improved interaction with the schema tab in the user interface for better testing. - **Documentation** - Updated the path for limited tests to focus on the "Datasource Schema" functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “NandanAnantharamu” <“[email protected]”>
test:
Fixing DataSourceScheme test
EE PR: https://github.com/appsmithorg/appsmith-ee/pull/5155
Improved reliability of data source schema tests by ensuring correct UI interactions and logical flow.
Enhanced verification process by checking for the absence of loading spinners before data verification.
Bugs Raised as part of fixing the spec:
#36349
Test Skipped: #36348
/ok-to-test tags="@tag.All"
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10885399399
Commit: 12ca3b6
Cypress dashboard.
Tags:
@tag.All
Spec:
Mon, 16 Sep 2024 15:08:37 UTC
Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
New Features
Documentation