-
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: updated 3rd party API fr CommunityIssue Spec #36544
Conversation
/ci-test-limit-count run_count=25 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11037026424. |
WalkthroughThe changes in this pull request involve updates to test specifications within the Cypress testing framework. Specifically, the input value for a test case has been altered, and references to test files have been modified in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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/e2e/Regression/Apps/CommunityIssues_Spec.ts (1)
Line range hint
1-424
: Class, let's review our overall test strategy.While we've made a small but significant change to use a local testing environment, there are several areas where we can improve our test suite:
Avoid using cy.wait: I've noticed several instances of cy.wait in our code. Remember, explicit waits can make our tests brittle. Let's use Cypress's built-in retry-ability instead.
Use data-* attributes: We should update our selectors to use data-* attributes throughout the file. This will make our tests more resilient to UI changes.
Avoid XPaths and CSS paths: While we're doing well in this area, let's ensure we consistently use best practices for selectors.
Login via API: Consider using LoginFromAPI for authentication steps to speed up our tests.
Avoid it.only: Make sure we're not leaving any it.only statements in our code, as this can prevent other tests from running.
Let's work on refactoring this test suite to align with these best practices. Who would like to volunteer to start this important task?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts (1 hunks)
- app/client/cypress/limited-tests.txt (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
app/client/cypress/e2e/Regression/Apps/CommunityIssues_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/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.
🔇 Additional comments not posted (2)
app/client/cypress/limited-tests.txt (1)
2-2
: Class, let's examine this change carefully.Good morning, students! Today, we're going to analyze an important modification in our test specification. Can anyone tell me what's different? That's right! We've updated our test file from
Fork_Template_spec.js
toCommunityIssues_Spec.ts
.Now, who can tell me what this change might imply? Yes, you in the back! Correct, it suggests we're moving from JavaScript to TypeScript. And what about the path change? Excellent observation! We've reorganized our test structure from
Regression/ClientSide/Templates
toRegression/Apps
.This change aligns perfectly with our lesson plan - I mean, PR objectives - of updating the third-party API for CommunityIssue Spec. Well done, team!
Let's do a quick pop quiz to ensure we haven't missed anything:
app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts (1)
312-312
:⚠️ Potential issueClass, let's examine this change carefully.
The URL has been modified from a GitHub issue link to a local Docker URL. This alteration suggests a shift towards using a local environment for testing, which is a commendable approach. However, we must ensure this doesn't disrupt our existing test suite.
Let's run a quick check to see if this URL is used elsewhere in our codebase:
Additionally, we should verify if this change aligns with our Cypress best practices:
- Are we avoiding cy.wait? ✅
- Are we using data-* attributes for selectors? ❌ (We should consider updating this)
- Are we avoiding XPaths and CSS paths? ✅
To improve our test, let's consider updating our selector to use a data-* attribute:
- .type("http://host.docker.internal:5001"); + .invoke('attr', 'data-cy', 'issue-link-input') + .type("http://host.docker.internal:5001");Remember, class, using data-* attributes makes our tests more resilient to UI changes!
✅ Verification successful
Great job!
The replacement of the GitHub URL with the local Docker URL is consistent across the test suite and doesn't impact other parts of the codebase. This change aligns well with our testing environment setup and should not introduce any issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for other occurrences of the old and new URLs echo "Searching for the old GitHub URL:" rg "https://github.com/appsmithorg/appsmith/issues/12532" echo "Searching for the new Docker URL:" rg "http://host.docker.internal:5001"Length of output: 10018
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11037026424.
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
redundant hence closing |
We have skipped some unwanted tests which are redundant or they are covered elsewhere
/ok-to-test tags="@tag.Table"
Summary by CodeRabbit
Bug Fixes
Documentation