Skip to content

reverting a change#38377

Closed
ankitakinger wants to merge 1 commit intoreleasefrom
temp-testing
Closed

reverting a change#38377
ankitakinger wants to merge 1 commit intoreleasefrom
temp-testing

Conversation

@ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Dec 26, 2024

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Updated test specifications to include new server-side and client-side visual tests.
    • Introduced a new layout structure in the CommonEditorForm component, consolidating functionality into a single RequestTabs component.
    • Enhanced vertical scrolling capability in the UQIEditorForm component.
  • Bug Fixes

    • Adjusted tooltip positioning for improved visual alignment.
  • Chores

    • Removed outdated styled components related to the previous tabbed interface.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2024

Walkthrough

This pull request encompasses modifications across multiple files in the client-side application, primarily focusing on restructuring the PluginActionEditor components and updating the Cypress test specifications. The changes involve simplifying the UI layout, removing tabbed interfaces, adjusting component styling, and modifying the set of tests to be executed in limited test runs.

Changes

File Change Summary
app/client/cypress/limited-tests.txt Removed client-side template test, added server-side API and client-side visual tests
app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx Changed Flex component's overflow from "auto" to "hidden"
app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/CommonEditorForm.tsx Significant restructuring of component, removing tabs and introducing RequestTabs
app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/styles.ts Removed FormHeader, Tabs, and TabPanel styled components
app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/UQIEditorForm.tsx Added overflowY="scroll" to Flex component

Possibly related PRs

Suggested labels

Bug, IDE Product, Task, IDE Pod, ok-to-test

Suggested reviewers

  • ApekshaBhosale

Poem

🧩 Code refactors, tests realign,
Components dance, their borders redesign
Tabs dissolve, new flows emerge
In pixels and logic, changes converge
A software symphony, elegantly defined! 🚀


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?

❤️ Share
🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

@ankitakinger
Copy link
Contributor Author

/ci-test-limit

@github-actions
Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (2)
app/client/cypress/limited-tests.txt (1)

Line range hint 1-7: Document the rationale for test selection

Consider adding comments explaining why these specific tests were selected for the limited test suite, especially since they replace the previous template test.

 # To run only limited tests - give the spec names in below format:
+# API_Edit_spec.js: Tests server-side API functionality
 cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js
+# JSEditorIndent_spec.js: Validates JS editor visual formatting
 cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js
app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx (1)

15-15: Potential usability concern with hidden overflow
Switching from overflow="auto" to overflow="hidden" may cause out-of-view content to become inaccessible. Consider using overflow="auto" or overflowY="scroll" to maintain scrollability.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6905aa9 and 17d3734.

📒 Files selected for processing (6)
  • app/client/cypress/limited-tests.txt (1 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx (1 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/CommonEditorForm.tsx (3 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/components/EmbeddedDatasourcePathField.tsx (2 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/styles.ts (0 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/UQIEditorForm.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/styles.ts
✅ Files skipped from review due to trivial changes (1)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/components/EmbeddedDatasourcePathField.tsx
🧰 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.
📓 Learnings (1)
app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/CommonEditorForm.tsx (1)
Learnt from: hetunandu
PR: appsmithorg/appsmith#36380
File: app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/RequestTabs.tsx:32-58
Timestamp: 2024-11-12T08:11:25.417Z
Learning: The tab rendering logic of the `RequestTabs` component will be extracted into separate components in a future PR.
🔇 Additional comments (6)
app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/CommonEditorForm.tsx (5)

2-2: New import usage is appropriate
No issues found using Flex from @appsmith/ads.


9-9: RequestTabs import
Importing RequestTabs centralizes request-related logic. This appears to be a clean approach to modularity.


22-22: Prop destructuring
The destructuring of action is concise and consistent with the usage below.


34-40: Container layout
Using Flex to manage layout is fine. Consider verifying that the potential content overflow or resizing behavior is managed well across different screen sizes.


42-65: Component composition
Combining InfoFields, HintMessages, and RequestTabs into a single layout is coherent. Ensure that RequestTabs receives any necessary props for consistent behavior, such as asynchronous validations or error handling, if required by the business logic.

app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/UQIEditorForm.tsx (1)

26-26: Review scrolling behavior
Setting overflowY="scroll" is valid for large content. Verify that there is a consistent scrolling experience if this component is nested inside other containers with limited height.

Comment on lines +2 to +3
cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js
cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing test files referenced in limited-tests.txt

The test files specified in limited-tests.txt do not exist in the codebase:

  • cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js
  • cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js
🔗 Analysis chain

Verify the existence and implementation of the new test files

Let's ensure the new test files exist and follow the Cypress testing guidelines.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of the new test files

# Check if the files exist
echo "Checking if test files exist..."
for file in "cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js" "cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js"; do
  if [ -f "$file" ]; then
    echo "Found: $file"
    
    # Check for prohibited practices
    echo "Checking $file for best practices..."
    
    # Check for cy.wait usage
    rg "cy\.wait" "$file" || echo "✓ No cy.wait found"
    
    # Check for cy.pause usage
    rg "cy\.pause" "$file" || echo "✓ No cy.pause found"
    
    # Check for agHelper.sleep usage
    rg "agHelper\.sleep" "$file" || echo "✓ No agHelper.sleep found"
    
    # Check for it.only usage
    rg "it\.only" "$file" || echo "✓ No it.only found"
    
    # Check for after/afterEach hooks
    rg "after(Each)?\s*\(" "$file" || echo "✓ No after/afterEach hooks found"
    
    echo "---"
  else
    echo "Missing: $file"
  fi
done

Length of output: 833

@sagar-qa007
Copy link
Contributor

/ci-test-limit-count run_count=5 update_snapshot=false specs_to_run=cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js,cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js

@github-actions
Copy link

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12503298486.
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: 65 Total Passed: 60 Total Failed: 0 Total Skipped: 0 *****************************

@alex-golovanov alex-golovanov self-requested a review December 26, 2024 12:13
Copy link
Contributor

@alex-golovanov alex-golovanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not merge this, as it will revert a bug fix in favor of fixing a test. I will have a PR fixing the test, shortly.

@ankitakinger
Copy link
Contributor Author

/ci-test-limit-count run_count=1 update_snapshot=false

@github-actions
Copy link

@ankitakinger ankitakinger deleted the temp-testing branch December 27, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants