-
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: flaky check for published Spec #38427
Conversation
WalkthroughThe pull request involves modifying a Cypress test suite in the Changes
Suggested labels
Suggested reviewers
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)Pattern
🔇 Additional comments (3)
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/12556594028. |
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
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.
app/client/cypress/limited-tests.txt
Outdated
@@ -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/PublishedApps/PublishedModeToastToggle_Spec.ts |
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
agHelper.Sleep()
usage
The test implementation follows Cypress best practices except for one issue:
- Line 89:
_.agHelper.Sleep(2000)
should be replaced with a proper wait condition using assertions or intercepts.
🔗 Analysis chain
LGTM! Verify the new test implementation.
The change follows the correct format for specifying limited tests.
Let's verify the new test file exists and follows the Cypress guidelines:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the new test file exists and follows guidelines
# Check if the test file exists
fd "PublishedModeToastToggle_Spec.ts" app/client/cypress
# 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/PublishedApps/PublishedModeToastToggle_Spec.ts" || echo "No prohibited practices found"
# Check selector usage
echo "Checking selector patterns..."
rg "\.btn\.submit|button\[type=submit\]|\$\('" "app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts" || echo "No prohibited selectors found"
Length of output: 710
Script:
#!/bin/bash
# Let's examine the test file content to verify test structure and patterns
cat "app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts"
Length of output: 3621
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12556594028.
|
/ci-test-limit-count run_count=1 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/12580018769. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12580018769.
|
/ok-to-test tags="@tag.Sanity"
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12592573790
Commit: a174b8a
Cypress dashboard.
Tags:
@tag.Sanity
Spec:
Fri, 03 Jan 2025 06:17:34 UTC