-
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: analyse TBP failure EnableGoogleSheet #37335
Conversation
/ci-test-limit-count run_count=100 |
WalkthroughThe changes involve updating 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
|
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/11793400879. |
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
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 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/Templates/Fork_Template_spec.js | |||
cypress/e2e/Regression/ClientSide/Google/EnableGoogle_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
Cypress test spec needs improvements to follow best practices
The test spec contains multiple instances of hard-coded waits (cy.wait
) which is against Cypress best practices. These should be replaced with proper assertions or cy.waitUntil
with specific conditions.
- Replace
cy.wait(2000)
on lines with proper assertions orwaitUntil
conditions - Consider using
agHelper.WaitUntilToastDisappear()
oragHelper.WaitUntilEleAppear()
instead of arbitrary waits - Review usage of
cy.waitUntil(() => cy.get(homePage.profileMenu))
to ensure it's the most appropriate approach
🔗 Analysis chain
Verify the EnableGoogle test spec existence and implementation.
The change aligns with the PR objective to analyze TBP failure related to EnableGoogleSheet functionality.
Let's verify the test spec existence and its implementation:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the existence of EnableGoogle_spec.js and check its implementation
# for compliance with Cypress best practices
# Check if the spec file exists
if ! fd "EnableGoogle_spec.js" app/client/cypress/; then
echo "ERROR: Test spec not found"
exit 1
fi
# Check for prohibited practices in the spec file
echo "Checking for prohibited practices..."
rg -i "cy\.wait|cy\.pause|agHelper\.sleep|it\.only|after\(|afterEach\(" \
app/client/cypress/e2e/Regression/ClientSide/Google/EnableGoogle_spec.js || true
# Check for proper selector usage
echo "Checking selector patterns..."
rg -i "\.btn\.|button\[|xpath\=|\.submit" \
app/client/cypress/e2e/Regression/ClientSide/Google/EnableGoogle_spec.js || true
Length of output: 1033
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11793400879.
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
This PR has been closed because of inactivity. |
Summary by CodeRabbit