-
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 flaky case for forkapp #35376
Conversation
WalkthroughThe recent changes enhance the ForkApplication test suite by integrating a new dependency, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant DataSources
User->>App: Initiate ForkApplication
App->>DataSources: Wait for _saveDs element
DataSources-->>App: _saveDs element ready
App->>User: Proceed to SkipToAppBtn
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts (2 hunks)
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_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.
Additional comments not posted (2)
app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts (2)
17-17
: Import statement fordataSources
looks good.The import statement follows the correct syntax and is placed appropriately.
114-116
: Good use ofagHelper.WaitUntilEleAppear
fordataSources._saveDs
.This addition ensures that the necessary data source element is available before proceeding, which improves the reliability of the test.
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/client/cypress/e2e/Regression/ClientSide/Fork/ForkApplication_spec.ts
Description
Fix case with adding one more assertion with wait.
RCA:
The issue was not with the function itself but rather with the flaky behavior of the Cypress code. The modal was opening, and our code was attempting to click the “Skip to Application” button too quickly. The actual validation was only for SkipToAppBtn, but in the application, the modal was still loading, causing Cypress to perform the action prematurely, which led to failures. To address this, I added an additional wait for another element, and this resolved the issue.
Fixes #
35375
Automation
/ok-to-test tags="@tag.Fork"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10279433214
Commit: 748f4f7
Cypress dashboard.
Tags:
@tag.Fork
Spec:
Wed, 07 Aug 2024 07:08:45 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes