-
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 limited run file for Tab spec #38426
base: release
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request modifies the 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
|
/ci-test-limit-count run_count=50 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/12556580806. |
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
🧹 Nitpick comments (1)
app/client/cypress/limited-tests.txt (1)
Line range hint
1-6
: Configuration change looks good.The update to run Tab widget tests instead of JS Editor tests is straightforward and maintains the correct format.
Consider adding a comment explaining why this specific test was chosen for the limited run to help other developers understand the testing strategy.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/client/cypress/limited-tests.txt
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
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.
@@ -1,5 +1,5 @@ | |||
# To run only limited tests - give the spec names in below format: | |||
cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js | |||
cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_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.
💡 Codebase verification
Test file needs the following improvements
- Replace
cy.wait(3000)
with proper assertions or intercepts for tab content loading - Remove empty
afterEach
block if no cleanup is needed - Avoid using
force: true
in click events - fix element visibility instead - Consider adding error handling for modal interactions
The test follows most Cypress practices with proper visibility assertions, but these changes will make it more robust and maintainable.
🔗 Analysis chain
Verify the new test specification exists and follows guidelines.
Let's verify the existence and content of the new test file:
Test file needs improvements to follow Cypress best practices
The test file contains practices that should be avoided:
- Usage of
cy.wait(3000)
which introduces flaky tests. Replace withcy.intercept()
or appropriate assertions - Contains
afterEach
block which may need review for cleanup approach
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if the new test file exists and analyze its content
if [ -f "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js" ]; then
echo "File exists. Analyzing content..."
# Check for prohibited practices
echo "Checking for prohibited practices..."
rg -i "cy\.wait|cy\.pause|agHelper\.sleep|it\.only|after\(|afterEach\(" "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js"
# Check for selector patterns
echo "Checking selector patterns..."
rg -i "\.btn\.submit|button\[type=submit\]|\$\('" "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js"
# Check for xpath usage
echo "Checking for XPath usage..."
rg -i "xpath|cy\.xpath" "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js"
else
echo "ERROR: Test file not found!"
fi
Length of output: 827
Script:
#!/bin/bash
# Let's check the full content of the test file to provide specific guidance
echo "Test file content:"
cat "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js"
# Check for better practices like intercept usage
echo -e "\nChecking for recommended practices:"
rg -i "cy\.intercept|\.should\(|\.contains\(" "app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_new_scenario_spec.js"
Length of output: 2236
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12556580806.
|
/ci-test-limit-count run_count=50 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/12583374300. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12583374300.
|
Summary by CodeRabbit