Skip to content
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

fix: Inline editing flaky test fix #36366

Merged
merged 13 commits into from
Sep 20, 2024
Merged

fix: Inline editing flaky test fix #36366

merged 13 commits into from
Sep 20, 2024

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Sep 17, 2024

Description

EE PR: Appsmith EE Pull Request #5158

Root Cause Analysis (RCA):
The updateCodeInput function was identified as a source of flakiness due to improper execution. Additionally, the SaveLocalStorageCache caused issues by retaining the reset button after the 6th test case, resulting in a duplicate button in the 7th test case, which led to test failures.

Solution:
Replaced updateCodeInput with EnterJSContext from agHelper for more reliable execution. For the second flaky step, a new page was created, and a table with relevant data was added. This resolved the issue without requiring significant changes to the test case or workflow.

Fixes #36365

Automation

/ok-to-test tags="@tag.ImportExport"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10940196158
Commit: 32d1be4
Cypress dashboard.
Tags: @tag.ImportExport
Spec:


Thu, 19 Sep 2024 12:01:32 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Adjusted the inline editing test suite for the table widget to improve state management between tests.
  • New Features

    • Updated the limited tests to focus on inline editing functionality, enhancing testing priorities for the Table V2 widget.
    • Introduced new properties in the widget locators to enhance UI interactions, including selectors for various controls and elements within the property pane and cell editing functionalities.
    • Added a new JavaScript toggle selector to facilitate interactions in tests.

Copy link
Contributor

coderabbitai bot commented Sep 17, 2024

Walkthrough

The pull request enhances the test suite for the inline editing functionality of the Table V2 widget. It introduces a new test case for multi-row updates, replaces a test file in limited tests to focus on inline editing, and adds new locators for UI elements in the widget. Additionally, it updates the PROPERTY_SELECTOR object to include a new JavaScript toggle selector, thus broadening the testing capabilities.

Changes

Files Change Summary
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/Inline_editing_2_spec.js Expanded test case for multi-row updates; added import for PageList; improved onClick property setup.
app/client/cypress/limited-tests.txt Replaced Fork_Template_spec.js with Inline_editing_2_spec.js for limited tests.
app/client/cypress/locators/WidgetLocators.ts Added jsToggle property to PROPERTY_SELECTOR for JavaScript toggle element.
app/client/cypress/locators/Widgets.json Added new properties: propertyPaneSaveButton, firstEditInput, cellControlSwitch, and propertyControlLabel.

Assessment against linked issues

Objective Addressed Explanation
Fix inline_editing_2_spec test (#36365)

Possibly related PRs

Suggested labels

Test, Widgets & Accelerators Pod, Integrations Pod General

Suggested reviewers

  • ApekshaBhosale
  • sagar-qa007
  • jsartisan

In the realm of code, a change takes flight,
Tests now dance in the soft moonlight.
Inline editing, a focus anew,
With local storage, we bid adieu.
A test suite refined, let’s cheer and sing,
For every line of code, joy it brings! 🎉


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Sep 17, 2024
@sagar-qa007
Copy link
Contributor Author

/ci-test-limit-count run_count=20

@github-actions github-actions bot added the Bug Something isn't working label Sep 17, 2024
Copy link

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10900231806.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:
To know the list of identified flaky tests - Refer here

***** Repeat Run Summary ***** Total Tests with repeat: 140 Total Passed: 140 Total Failed: 0 Total Skipped: 0 *****************************

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Sep 17, 2024
@sagar-qa007
Copy link
Contributor Author

/ci-test-limit-count run_count=25

Copy link

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10906464883.
Cypress dashboard url: Click here!
All Cypress tests have passed 🎉🎉🎉

***** Repeat Run Summary ***** Total Tests with repeat: 175 Total Passed: 168 Total Failed: 7 Total Skipped: 0 *****************************

@sagar-qa007
Copy link
Contributor Author

/ci-test-limit-count run_count=25

Copy link

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10927356629.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:
To know the list of identified flaky tests - Refer here

***** Repeat Run Summary ***** Total Tests with repeat: 175 Total Passed: 175 Total Failed: 0 Total Skipped: 0 *****************************

@sagar-qa007
Copy link
Contributor Author

/ci-test-limit-count run_count=25

Copy link

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10935993873.
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:
To know the list of identified flaky tests - Refer here

***** Repeat Run Summary ***** Total Tests with repeat: 175 Total Passed: 175 Total Failed: 0 Total Skipped: 0 *****************************

@sagar-qa007
Copy link
Contributor Author

@ApekshaBhosale Changes are reverted for limited test. Please review now.

@yatinappsmith yatinappsmith merged commit 1cf043c into release Sep 20, 2024
42 checks passed
@yatinappsmith yatinappsmith deleted the fix/inlinefailedcase branch September 20, 2024 07:14
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Sep 26, 2024
## Description

EE PR: [Appsmith EE Pull Request
appsmithorg#5158](https://github.com/appsmithorg/appsmith-ee/pull/5158)

Root Cause Analysis (RCA):
The `updateCodeInput` function was identified as a source of flakiness
due to improper execution. Additionally, the `SaveLocalStorageCache`
caused issues by retaining the reset button after the 6th test case,
resulting in a duplicate button in the 7th test case, which led to test
failures.

Solution:
Replaced `updateCodeInput` with `EnterJSContext` from `agHelper` for
more reliable execution. For the second flaky step, a new page was
created, and a table with relevant data was added. This resolved the
issue without requiring significant changes to the test case or
workflow.

Fixes #`36365`  

## Automation

/ok-to-test tags="@tag.ImportExport"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10940196158>
> Commit: 32d1be4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10940196158&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.ImportExport`
> Spec:
> <hr>Thu, 19 Sep 2024 12:01:32 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Bug Fixes**
- Adjusted the inline editing test suite for the table widget to improve
state management between tests.

- **New Features**
- Updated the limited tests to focus on inline editing functionality,
enhancing testing priorities for the Table V2 widget.
- Introduced new properties in the widget locators to enhance UI
interactions, including selectors for various controls and elements
within the property pane and cell editing functionalities.
- Added a new JavaScript toggle selector to facilitate interactions in
tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai coderabbitai bot mentioned this pull request Dec 9, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants