-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
WalkthroughThe new file Changes
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
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
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 theapp/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 -dLength 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 -dLength 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 theapp/client/cypress/fixtures/anvilZoneSectionWidget.json
file.
Verified: Widget properties are correctly defined and unique.
The
widgetId
and other unique identifiers in theapp/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 -dLength 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 -dLength 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 inanvilZoneSectionWidget.json
.The script output indicates that there are multiple instances of non-unique and invalid
widgetId
values across several JSON files. To specifically verify thewidgetId
values inapp/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 inapp/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 -dLength 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.jsonLength of output: 285
"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, |
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.
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 eachwidgetId
is unique across all JSON files. - Invalid
widgetId
values: Replace empty strings andtrue
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
"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, |
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.
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
"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, |
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.
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 totrue
. - 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 totrue
. - 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
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9776733132. |
Deploy-Preview-URL: https://ce-34639.dp.appsmith.com |
## 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]>
Merged here. |
## 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]>
Summary by CodeRabbit