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

chore: zone and section snapshots #34639

Closed
wants to merge 1 commit into from

Conversation

jsartisan
Copy link
Contributor

@jsartisan jsartisan commented Jul 2, 2024

Summary by CodeRabbit

  • Tests
    • Added test cases for Anvil Zone and Section Widget functionality, ensuring proper behavior in Canvas, Preview, and Deploy modes.

Copy link
Contributor

coderabbitai bot commented Jul 2, 2024

Walkthrough

The new file AnvilZoneSectionWidgetSnapshot_spec.ts introduces end-to-end test cases to verify the functionality of the Anvil Zone and Section Widgets in different modes: Canvas, Preview, and Deploy. These tests ensure robust validation of interactions within the application's user interface.

Changes

File Summary
app/client/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts Introduced test cases for verifying the functionality of Anvil Zone and Section Widgets across different modes.

Sequence Diagram(s)

No sequence diagrams are necessary as the changes are related to testing functionalities rather than altering or adding new features or control flows.

Possibly related issues

  • appsmithorg/appsmith#33739: Implement E2E/Integration tests for Anvil Sections and Zones.

    • This PR adds E2E tests for Anvil Zone and Section Widgets, potentially addressing the objectives of this issue.
  • appsmithorg/appsmith#33981: Task: Tests for DnD sagas.

    • This PR strengthens the test coverage for Anvil Zone and Section Widgets which may overlap with objectives for testing DnD features.

Poem

In fields of code where widgets grow,
An Anvil's test begins to show,
From Canvas view to Deployment's glow,
Assurance in each click and flow.
🐰✨ Quality's beauty we bestow.


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@jsartisan jsartisan requested a review from KelvinOm July 2, 2024 10:42
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jul 2, 2024
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: 3

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 33325dd and 5d4c719.

Files ignored due to path filters (6)
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetCanvas.snap.png is excluded by !**/*.png
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetCanvasDark.snap.png is excluded by !**/*.png
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetDeployipad-2.snap.png is excluded by !**/*.png
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetDeployiphone-6.snap.png is excluded by !**/*.png
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetDeploymacbook-13.snap.png is excluded by !**/*.png
  • app/client/cypress/snapshots/AnvilZoneSectionWidgetSnapshot_spec.ts/anvilZoneSectionWidgetPreview.snap.png is excluded by !**/*.png
Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts (1 hunks)
  • app/client/cypress/fixtures/anvilZoneSectionWidget.json (1 hunks)
Files not summarized due to errors (1)
  • app/client/cypress/fixtures/anvilZoneSectionWidget.json: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
  • app/client/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts
Additional comments not posted (4)
app/client/cypress/fixtures/anvilZoneSectionWidget.json (4)

1221-1236: Ensure widget properties are correctly defined.

The properties for the "Section5" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.


3-12: Ensure widget properties are correctly defined.

The properties for the "MainContainer" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Verification successful

Widget properties are correctly defined.

The widgetId and other unique identifiers within the app/client/cypress/fixtures/anvilZoneSectionWidget.json file are unique and correctly defined.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161



Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique within the file `anvilZoneSectionWidget.json`.

# Test: Check for duplicate widgetIds within `anvilZoneSectionWidget.json`. Expect: No duplicates.
rg --type json '"widgetId":' app/client/cypress/fixtures/anvilZoneSectionWidget.json | sort | uniq -d

Length of output: 103


184-199: Ensure widget properties are correctly defined.

The properties for the "Section1" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Verification successful

Ensure widget properties are correctly defined.

The properties for the "Section1" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated within the app/client/cypress/fixtures/anvilZoneSectionWidget.json file.


Verified: Widget properties are correctly defined and unique.

The widgetId and other unique identifiers in the app/client/cypress/fixtures/anvilZoneSectionWidget.json file are correctly defined and do not have duplicates.

  • No duplicate widgetId values found in the file.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161



Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique within the anvilZoneSectionWidget.json file.

# Test: Check for duplicate widgetIds within the specific JSON file. Expect: No duplicates.
rg --type json '"widgetId":' app/client/cypress/fixtures/anvilZoneSectionWidget.json | sort | uniq -d

Length of output: 103


1081-1096: Ensure widget properties are correctly defined.

The properties for the "Section4" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Verification successful

Ensure widgetId values are unique and valid in anvilZoneSectionWidget.json.

The script output indicates that there are multiple instances of non-unique and invalid widgetId values across several JSON files. To specifically verify the widgetId values in app/client/cypress/fixtures/anvilZoneSectionWidget.json, please run the following script:


Widget properties are correctly defined and widgetId values are unique and valid.

The widgetId values in app/client/cypress/fixtures/anvilZoneSectionWidget.json are unique and valid, with no duplicates, empty strings, or boolean values found.

  • No duplicates found for widgetId.
  • No invalid values found for widgetId.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161



Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique and valid in `anvilZoneSectionWidget.json`.

# Test: Check for duplicate widgetIds and invalid values in `anvilZoneSectionWidget.json`. Expect: No duplicates, no empty strings, and no boolean values.
rg --type json '"widgetId":' app/client/cypress/fixtures/anvilZoneSectionWidget.json | sort | uniq -d
rg --type json '"widgetId": ""' app/client/cypress/fixtures/anvilZoneSectionWidget.json
rg --type json '"widgetId": true' app/client/cypress/fixtures/anvilZoneSectionWidget.json

Length of output: 285

Comment on lines +1443 to +1458
"needsErrorInfo": false,
"boxShadow": "NONE",
"mobileBottomRow": 10,
"widgetName": "Section5Copy",
"isCanvas": true,
"displayName": "Section",
"searchTags": [
"div",
"parent",
"group"
],
"topRow": 0,
"bottomRow": 10,
"parentRowSpace": 10,
"type": "SECTION_WIDGET",
"hideCard": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Duplicate and Invalid widgetId Values Detected

The verification process has identified multiple instances of duplicate and invalid widgetId values across various JSON files. This includes empty strings and true values, which are not valid identifiers.

  • Duplicate widgetId values: Ensure that each widgetId is unique across all JSON files.
  • Invalid widgetId values: Replace empty strings and true values with valid, unique identifiers.

Please address these issues to maintain the integrity of the widget configuration.

Analysis chain

Ensure widget properties are correctly defined.

The properties for the "Section6" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161

Comment on lines +559 to +574
"needsErrorInfo": false,
"boxShadow": "NONE",
"mobileBottomRow": 10,
"widgetName": "Section2",
"isCanvas": true,
"displayName": "Section",
"searchTags": [
"div",
"parent",
"group"
],
"topRow": 0,
"bottomRow": 10,
"parentRowSpace": 10,
"type": "SECTION_WIDGET",
"hideCard": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Duplicate and empty widgetId values detected.

The verification script identified multiple instances of duplicate and empty widgetId values across various JSON files. Each widgetId should be unique and non-empty to avoid potential conflicts and ensure proper functionality.

  • Ensure that all widgetId values are unique.
  • Replace empty widgetId values with valid, unique identifiers.

Files with issues:

  • app/client/cypress/fixtures/AllWidgetsDsl.json
  • app/client/cypress/fixtures/CommunityIssuesExport.json
  • app/client/cypress/fixtures/Bugs/CheckboxGroupInListWidgetDsl.json
  • app/client/cypress/fixtures/ButtonGroup_MenuButton_Width_dsl.json
  • app/client/cypress/fixtures/ContextSwitching.json
  • app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
  • app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
  • app/client/cypress/fixtures/JSObjOnLoadApp.json
  • app/client/cypress/fixtures/JSObjectMutationTestApp.json
  • app/client/cypress/fixtures/ListVulnerabilityDSL.json
  • app/client/cypress/fixtures/ListWidgetWithDataAndButtonDSL.json
  • app/client/cypress/fixtures/Listv2/ListWithInputForSelectedAndTriggerRow.json
  • app/client/cypress/fixtures/Listv2/nestedList.json
  • app/client/cypress/fixtures/Listv2/simpleList.json
  • app/client/cypress/fixtures/Listv2/simpleListWithInputAndButton.json
  • app/client/cypress/fixtures/Listv2/simpleListWithLargeData.json
  • app/client/cypress/fixtures/Listv2/simpleListWithTabsWidget.json
  • app/client/cypress/fixtures/PgAdmindsl.json
  • app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
  • app/client/cypress/fixtures/ResizeListDsl.json
  • app/client/cypress/fixtures/Table/TableFilterImportApp.json
  • app/client/cypress/fixtures/TableMigrationAppExported.json
  • app/client/cypress/fixtures/ThemeAppdsl.json
  • app/client/cypress/fixtures/anvilInlineButtonWidget.json
  • app/client/cypress/fixtures/anvilToolbarButtonWidget.json
  • app/client/cypress/fixtures/apiParallelDsl.json
  • app/client/cypress/fixtures/appNavigationTestingApp.json
  • app/client/cypress/fixtures/appNavigationTestingAppWithLongPageNamesAndTitle.json
  • app/client/cypress/fixtures/buttonGroupDsl.json
  • app/client/cypress/fixtures/conversionFrAutoLayoutDsl.json
  • app/client/cypress/fixtures/disabledWidgetsDsl.json
  • app/client/cypress/fixtures/dynamicHeightListDsl.json
  • app/client/cypress/fixtures/dynamicTabWidgetdsl.json
  • app/client/cypress/fixtures/editorContextdsl.json
  • app/client/cypress/fixtures/executeAction.json
  • app/client/cypress/fixtures/explorerHiddenWidgets.json
  • app/client/cypress/fixtures/exported-app.json
  • app/client/cypress/fixtures/exportedApp.json
  • app/client/cypress/fixtures/filePickerV2_reset_check_dsl.json
  • app/client/cypress/fixtures/forkedApp.json
  • app/client/cypress/fixtures/formWithtabdsl.json
  • app/client/cypress/fixtures/gitImport.json
  • app/client/cypress/fixtures/listRegression2Dsl.json
  • app/client/cypress/fixtures/listRegression3Dsl.json
  • app/client/cypress/fixtures/listRegressionDsl.json
  • app/client/cypress/fixtures/listV2ButtonsDsl.json
  • app/client/cypress/fixtures/listWidgetLintDsl.json
  • app/client/cypress/fixtures/listdsl.json
  • app/client/cypress/fixtures/listv2PaginationDsl.json
  • app/client/cypress/fixtures/menuButtonDsl.json
  • app/client/cypress/fixtures/modalWidgetTestApp.json
  • app/client/cypress/fixtures/one_postgres.json
  • app/client/cypress/fixtures/promisesBtnListDsl.json
  • app/client/cypress/fixtures/tabsDsl.json
  • app/client/cypress/fixtures/tabsWidgetDsl.json
  • app/client/cypress/fixtures/tabsWidgetReset.json
  • app/client/cypress/fixtures/tabsWithWidgetDsl.json
  • app/client/cypress/fixtures/videoWidgetApp.json
  • app/client/cypress/fixtures/widgetPopupDsl.json
  • app/client/cypress/fixtures/xmlParser.json
  • app/server/appsmith-git/src/test/resources/DSLWidget/AllWidgetsDSL.json
  • app/server/appsmith-git/src/test/resources/DSLWidget/TabWidgetNestedChildren.json
  • app/server/appsmith-server/src/main/resources/examples-organization.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/application.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/autocommit.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/git/ce-automation-test.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/imports/internal/faulty-dsl.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/migrations/application.json
  • app/server/appsmith-server/src/test/resources/test_assets/DSLMigration/PageDSLv83.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/building-block.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/invalid-application-without-pageId-action-collection.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-app-positioning.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-custom-themes.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-added.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-un-configured-datasource.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-action-collection.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-app-layout.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-navigation-theme-setting.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-theme.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application.json
Analysis chain

Ensure widget properties are correctly defined.

The properties for the "Section2" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161

Comment on lines +856 to +871
"needsErrorInfo": false,
"boxShadow": "NONE",
"mobileBottomRow": 10,
"widgetName": "Section3",
"isCanvas": true,
"displayName": "Section",
"searchTags": [
"div",
"parent",
"group"
],
"topRow": 0,
"bottomRow": 10,
"parentRowSpace": 10,
"type": "SECTION_WIDGET",
"hideCard": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Ensure widget properties are correctly defined.

The verification has revealed multiple issues with widgetId values across the JSON files:

  • Some widgetId values are empty.
  • Some widgetId values are set to true.
  • There are duplicate widgetId values.

Please correct the following issues:

  • Ensure all widgetId values are non-empty and valid strings.
  • Remove or replace any widgetId values set to true.
  • Ensure each widgetId is unique across all JSON files.

Locations to address:

  • app/client/cypress/fixtures/AllWidgetsDsl.json
  • app/client/cypress/fixtures/Bugs/CheckboxGroupInListWidgetDsl.json
  • app/client/cypress/fixtures/ButtonGroup_MenuButton_Width_dsl.json
  • app/client/cypress/fixtures/CommunityIssuesExport.json
  • app/client/cypress/fixtures/DynamicHeightListTextDsl.json
  • app/client/cypress/fixtures/IframeOnSrcDocChange.json
  • app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
  • app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
  • app/client/cypress/fixtures/JSObjOnLoadApp.json
  • app/client/cypress/fixtures/JSObjectMutationTestApp.json
  • app/client/cypress/fixtures/ListVulnerabilityDSL.json
  • app/client/cypress/fixtures/ListWidgetWithDataAndButtonDSL.json
  • app/client/cypress/fixtures/Listv2/ListWithInputForSelectedAndTriggerRow.json
  • app/client/cypress/fixtures/Listv2/nestedList.json
  • app/client/cypress/fixtures/Listv2/simpleList.json
  • app/client/cypress/fixtures/Listv2/simpleListWithInputAndButton.json
  • app/client/cypress/fixtures/Listv2/simpleListWithLargeData.json
  • app/client/cypress/fixtures/Listv2/simpleListWithTabsWidget.json
  • app/client/cypress/fixtures/PgAdmindsl.json
  • app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
  • app/client/cypress/fixtures/ResizeListDsl.json
  • app/client/cypress/fixtures/Table/TableFilterImportApp.json
  • app/client/cypress/fixtures/TableFilterImportApp.json
  • app/client/cypress/fixtures/TableMigrationAppExported.json
  • app/client/cypress/fixtures/ThemeAppdsl.json
  • app/client/cypress/fixtures/anvilInlineButtonWidget.json
  • app/client/cypress/fixtures/anvilToolbarButtonWidget.json
  • app/client/cypress/fixtures/apiParallelDsl.json
  • app/client/cypress/fixtures/appNavigationTestingApp.json
  • app/client/cypress/fixtures/appNavigationTestingAppWithLongPageNamesAndTitle.json
  • app/client/cypress/fixtures/buttonGroupDsl.json
  • app/client/cypress/fixtures/conversionFrAutoLayoutDsl.json
  • app/client/cypress/fixtures/disabledWidgetsDsl.json
  • app/client/cypress/fixtures/dynamicHeightListDsl.json
  • app/client/cypress/fixtures/dynamicTabWidgetdsl.json
  • app/client/cypress/fixtures/editorContextdsl.json
  • app/client/cypress/fixtures/executeAction.json
  • app/client/cypress/fixtures/explorerHiddenWidgets.json
  • app/client/cypress/fixtures/exported-app.json
  • app/client/cypress/fixtures/exportedApp.json
  • app/client/cypress/fixtures/filePickerV2_reset_check_dsl.json
  • app/client/cypress/fixtures/forkedApp.json
  • app/client/cypress/fixtures/formWithtabdsl.json
  • app/client/cypress/fixtures/gitImport.json
  • app/client/cypress/fixtures/listRegression2Dsl.json
  • app/client/cypress/fixtures/listRegression3Dsl.json
  • app/client/cypress/fixtures/listRegressionDsl.json
  • app/client/cypress/fixtures/listV2ButtonsDsl.json
  • app/client/cypress/fixtures/listWidgetLintDsl.json
  • app/client/cypress/fixtures/listdsl.json
  • app/client/cypress/fixtures/listv2PaginationDsl.json
  • app/client/cypress/fixtures/menuButtonDsl.json
  • app/client/cypress/fixtures/modalWidgetTestApp.json
  • app/client/cypress/fixtures/widgetPopupDsl.json
  • app/client/cypress/fixtures/xmlParser.json
  • app/server/appsmith-git/src/test/resources/DSLWidget/AllWidgetsDSL.json
  • app/server/appsmith-git/src/test/resources/DSLWidget/TabWidgetNestedChildren.json
  • app/server/appsmith-server/src/main/resources/examples-organization.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/application.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/git/ce-automation-test.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/imports/internal/faulty-dsl.json
  • app/server/appsmith-server/src/test/resources/com/appsmith/server/migrations/application.json
  • app/server/appsmith-server/src/test/resources/test_assets/DSLMigration/PageDSLv83.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/building-block.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/invalid-application-without-pageId-action-collection.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-app-positioning.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-custom-themes.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-added.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-removed.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-un-configured-datasource.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-added.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-action-collection.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-app-layout.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-navigation-theme-setting.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-theme.json
  • app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application.json
Analysis chain

Ensure widget properties are correctly defined.

The properties for the "Section3" widget seem consistent and complete. However, verify that the widgetId and other unique identifiers are correct and not duplicated elsewhere.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the widgetId and other unique identifiers are unique across the JSON file.

# Test: Check for duplicate widgetIds. Expect: No duplicates.
rg --type json '"widgetId":' | sort | uniq -d

Length of output: 109161

@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Jul 3, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9776733132.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 34639.
recreate: .

Copy link

github-actions bot commented Jul 3, 2024

Deploy-Preview-URL: https://ce-34639.dp.appsmith.com

@KelvinOm KelvinOm mentioned this pull request Jul 8, 2024
2 tasks
KelvinOm added a commit that referenced this pull request Jul 9, 2024
## Description
1. Add scripts for local e2e testing in the docker container. 
2. Add types for cypress-image-snapshot

In this PR, I also added the following PRS as they affect screenshot
tests as well. I did this to speed up the process and unblock the team.

#34528
#34546
#34676
#34729
#34638
#34639
#34511

To run E2E tests locally in docker, you need to do the following:
1. Run FE locally and prepare the tests for local launch. See the
instructions
[here](https://github.com/appsmithorg/appsmith/blob/release/contributions/ClientSetup.md).
2. Run `yarn cypress:snapshot:docker:build` — this will create a docker
container with the necessary environment.
3. Run `yarn cypress:snapshot:docker
"./cypress/e2e/Regression/ClientSide/Anvil/Widgets/*_spec.ts"
updateSnapshots=false`. Here we can use the path to a specific file, or
set `updateSnapshots=true` flag to update the screenshots.

## Automation

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

### :mag: 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/9844579277>
> Commit: 75f2659
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9844579277&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Anvil`
> Spec:
> <hr>Mon, 08 Jul 2024 18:37:36 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

- **New Features**
- Added support for image snapshot testing with the
`@types/cypress-image-snapshot` dependency.

- **Refactor**
- Updated test specifications by removing unnecessary
`triggerInputInvalidState()` calls.
- Reorganized and improved efficiency of image snapshot methods for
various devices.

- **Chores**
- Updated `Dockerfile` to configure the Cypress environment with
specific versions for dependencies.
  - Changed import paths in `e2e.js` for better module resolution. 

- **Style**
  - Fixed a comment typo in Cypress plugin configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Pawan Kumar <[email protected]>
Co-authored-by: unknown <[email protected]>
@KelvinOm
Copy link
Collaborator

KelvinOm commented Jul 9, 2024

Merged here.

@KelvinOm KelvinOm closed this Jul 9, 2024
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Jul 10, 2024
## Description
1. Add scripts for local e2e testing in the docker container. 
2. Add types for cypress-image-snapshot

In this PR, I also added the following PRS as they affect screenshot
tests as well. I did this to speed up the process and unblock the team.

appsmithorg#34528
appsmithorg#34546
appsmithorg#34676
appsmithorg#34729
appsmithorg#34638
appsmithorg#34639
appsmithorg#34511

To run E2E tests locally in docker, you need to do the following:
1. Run FE locally and prepare the tests for local launch. See the
instructions
[here](https://github.com/appsmithorg/appsmith/blob/release/contributions/ClientSetup.md).
2. Run `yarn cypress:snapshot:docker:build` — this will create a docker
container with the necessary environment.
3. Run `yarn cypress:snapshot:docker
"./cypress/e2e/Regression/ClientSide/Anvil/Widgets/*_spec.ts"
updateSnapshots=false`. Here we can use the path to a specific file, or
set `updateSnapshots=true` flag to update the screenshots.

## Automation

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

### :mag: 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/9844579277>
> Commit: 75f2659
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9844579277&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Anvil`
> Spec:
> <hr>Mon, 08 Jul 2024 18:37:36 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

- **New Features**
- Added support for image snapshot testing with the
`@types/cypress-image-snapshot` dependency.

- **Refactor**
- Updated test specifications by removing unnecessary
`triggerInputInvalidState()` calls.
- Reorganized and improved efficiency of image snapshot methods for
various devices.

- **Chores**
- Updated `Dockerfile` to configure the Cypress environment with
specific versions for dependencies.
  - Changed import paths in `e2e.js` for better module resolution. 

- **Style**
  - Fixed a comment typo in Cypress plugin configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Pawan Kumar <[email protected]>
Co-authored-by: unknown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants