## Description
E2E Test cases for framework function & Action selector.
Fixes [Issue
URL](https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/37370)
## Automation
/ok-to-test tags="@tag.All"
### 🔍 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/12343756587>
> Commit: 56f7a2eb2acee62237f9dcd395b6a618956e38a2
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12343756587&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 16 Dec 2024 03:08:25 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**
- Enhanced property pane with new button widget identification.
- New selectors for action cards and toast notifications.
- Improved modal interaction with new properties for buttons.
- Added functionality for toggling JavaScript execution on page load.
- New methods for character manipulation and console log management.
- Comprehensive application configurations for interval management.
- New applications and widgets for managing intervals and clipboard
functionality.
- New functionality for resetting widgets and handling navigation
actions.
- Introduction of new JSON configurations for various applications.
- **Bug Fixes**
- Improved error handling for various actions and functions.
- **Tests**
- Extensive test coverage for new and existing functionalities,
including action selectors, interval functions, alert handling, and
geolocation features.
- New tests for clipboard functionality, download actions, and local
storage operations.
- Enhanced tests for Radio and CategorySlider widgets to improve
validation of JavaScript context and error handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: yatinappsmith <yatin@appsmith.com>
Adding tests for partial import/export
To be done into a new app
To be done into a new page
GitConnected App and importApp testing
https://docs.google.com/spreadsheets/d/1Vq5vRUyAMv2npPv4j41omzZrYcRUb8LEOhNVu_O4OE8/edit?gid=428365096#gid=428365096
/ok-to-test tags="@tag.All"
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
- **New Features**
- Introduced a comprehensive suite of end-to-end tests for validating
partial import and export functionality.
- Added new JSON configurations for API actions and application
components to enhance import/export capabilities, including structured
representations for widgets and actions.
- **Improvements**
- Updated test specification paths to reflect the new focus on partial
import/export tests.
- Expanded the set of locators for Cypress tests to improve interaction
with entity items and specific row data in tables.
These updates aim to improve the reliability and functionality of the
import/export processes within the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12035486686>
> Commit: 5c3d72b8d9ab5cb9948f3cb8935c1db63fccb050
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12035486686&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 27 Nov 2024 06:19:10 UTC
<!-- end of auto-generated comment: Cypress test results -->
---------
Co-authored-by: “NandanAnantharamu” <“nandan@thinkify.io”>
This field isn't used on client and so shouldn't be sent across.
EE PR at https://github.com/appsmithorg/appsmith-ee/pull/4466. All pass.
**/test all**
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9853291119>
> Commit: 22f738390a9e442c3e5d92f9007763d8c1e767b4
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9853291119&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 09 Jul 2024 09:02:56 UTC
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Resolved JSON formatting issues in several export fixture files.
- Removed unnecessary field values from action configurations to ensure
cleaner and more efficient data handling.
- **Refactor**
- Updated the `isNew` method's annotation in `BaseDomain.java` to
improve JSON serialization behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Spec -
cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_Widgets_spec.ts
RCA:
Comparison of this file post export is failing this file needed change.
closeModal('Insert_Modal')) is changed to closeModal(Insert_Modal.name))
and
showModal('Delete_Modal')) to showModal(Delete_Modal.name))
Solution:
To overcome this issue of frequent updation of file we have come up with
a solution to validate the partial import post export in a different
way.
1. We are creating a separate page and importing the partially exported
file
2. We are doing widget validation based on the selection we did during
our export
3. We are checking the properties of the widgets in the process in the
new page
---------
Co-authored-by: Trisha Anand <trisha@appsmith.com>
RCA:
PartialExport_Widgets_spec.ts was failing where we export and compare
files.
Solution:
- Updated the WidgetsExportedOnly.json, now the comparison step is
working as expected
- Improved the assertions within importApp() reduced wait time and
waiting for import modal to close as a check.
- Also updated tags which used importApp() below are the list of files
[AppNavigation_spec.ts,Sidebar_spec.ts,TopStacked_spec.ts,TopInline_spec.ts,Editor_Segment_Context_Switching_spec.ts,JSOnLoad2_Spec.ts]
- Reverted the intercept success check within ImportApp()
- Updated PartialExport_Widgets_spec.ts with network call assertion post
import
/ok-to-test tags="@tag.Workspace,@tag.ImportExport"<!-- This is an
auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9028944129>
> Commit: b9ad3c9f7c9f6b52aa061f286b143b715b7d627a
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9028944129&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
RCA:
Test was failing at comparison step where we export and compare
Solution:
Updated the WidgetsExportedOnly.json, now the comparison step is working
as expected
Improved the assertions within importApp() reduced wait time and also
removed the Toast message verification
/ok-to-test tags="@tag.Workspace,@tag.ImportExport"
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8941790028>
> Commit: 23535e879fde6b8d3018e6bcd762a85df18fea9c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8941790028&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
## Description
This pull request adds partial import and export tests to the
application. It includes the following changes:
- Adds exported file to be used in partial import export tests
- Add export and import options to EntityExplorer
- Adds spec to test export functionality.
- Add PartialImportExportLocators.ts, EntityCheckboxSelector.tsx,
JSExportedOnly.json, and index.tsx
- Add test for partial export functionality for selected datasources
- Adds test to check all exported sections one by one
- Refactor partial export functionality tests
- Refactor export and import locators
- Add test for partial import functionality
#### PR fixes following issue(s)
Fixes#30029
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced partial export and import functionality for components such
as JavaScript objects, queries, widgets, and data sources.
- Enhanced Entity Explorer with new "Export" and "Import" actions.
- **Tests**
- Added test cases for validating partial export and import features.
- Updated test suite to include direct app level import with data
sources.
- **Refactor**
- Modified access level for the `uploadFile` property in the HomePage
class to facilitate testing.
- **Style**
- Updated UI components with test identifiers to improve testability.
- **Chores**
- Updated the list of tests for running limited test scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>