2022-03-31 11:51:08 +00:00
|
|
|
import { AggregateHelper } from "../Pages/AggregateHelper";
|
|
|
|
|
import { JSEditor } from "../Pages/JSEditor";
|
|
|
|
|
import { EntityExplorer } from "../Pages/EntityExplorer";
|
|
|
|
|
import { CommonLocators } from "./CommonLocators";
|
|
|
|
|
import { ApiPage } from "../Pages/ApiPage";
|
2023-03-27 09:36:03 +00:00
|
|
|
import { AdminSettings } from "../Pages/AdminSettings";
|
2022-03-31 11:51:08 +00:00
|
|
|
import { HomePage } from "../Pages/HomePage";
|
|
|
|
|
import { DataSources } from "../Pages/DataSources";
|
|
|
|
|
import { Table } from "../Pages/Table";
|
2022-05-31 05:33:59 +00:00
|
|
|
import { PropertyPane } from "../Pages/PropertyPane";
|
|
|
|
|
import { DeployMode } from "../Pages/DeployModeHelper";
|
2022-09-01 20:55:22 +00:00
|
|
|
import { GitSync } from "../Pages/GitSync";
|
2022-08-27 12:40:11 +00:00
|
|
|
import { FakerHelper } from "../Pages/FakerHelper";
|
2022-10-20 12:08:48 +00:00
|
|
|
import { DebuggerHelper } from "../Pages/DebuggerHelper";
|
2022-12-21 17:14:47 +00:00
|
|
|
import { LibraryInstaller } from "../Pages/LibraryInstaller";
|
2023-02-17 16:03:34 +00:00
|
|
|
import { PeekOverlay } from "../Pages/PeekOverlay";
|
2022-12-26 05:11:33 +00:00
|
|
|
import { InviteModal } from "../Pages/InviteModal";
|
2022-12-02 05:49:51 +00:00
|
|
|
import { AppSettings } from "../Pages/AppSettings/AppSettings";
|
2022-12-12 04:51:14 +00:00
|
|
|
import { GeneralSettings } from "../Pages/AppSettings/GeneralSettings";
|
|
|
|
|
import { PageSettings } from "../Pages/AppSettings/PageSettings";
|
|
|
|
|
import { ThemeSettings } from "../Pages/AppSettings/ThemeSettings";
|
2022-12-26 05:11:33 +00:00
|
|
|
import { EmbedSettings } from "../Pages/AppSettings/EmbedSettings";
|
2023-02-10 06:11:35 +00:00
|
|
|
import { Templates } from "../Pages/Templates";
|
2023-05-02 09:52:05 +00:00
|
|
|
import { Onboarding } from "../Pages/Onboarding";
|
2023-05-30 02:40:13 +00:00
|
|
|
import { AutoLayout } from "../Pages/AutoLayout";
|
2023-08-18 05:18:35 +00:00
|
|
|
import { DataManager } from "./DataManager";
|
2023-06-15 13:21:11 +00:00
|
|
|
import { AssertHelper } from "../Pages/AssertHelper";
|
2023-07-10 04:32:42 +00:00
|
|
|
import { Tabs } from "../Pages/Tabs";
|
2023-07-26 13:26:24 +00:00
|
|
|
import { GsheetHelper } from "../Pages/GSheetHelper";
|
2023-09-25 06:27:23 +00:00
|
|
|
import { CommunityTemplates } from "../Pages/CommunityTemplates";
|
2024-05-30 07:16:56 +00:00
|
|
|
import { AnvilLayout } from "../Pages/Anvil/AnvilLayout";
|
chore: Add cypress specs for partial import and export functionality (#30166)
## 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>
2024-01-17 05:50:01 +00:00
|
|
|
import PartialImportExport from "../Pages/PartialImportExport";
|
2024-02-15 05:30:57 +00:00
|
|
|
import { WDSWidgets } from "../Pages/WDSWidgets";
|
2024-06-20 13:00:16 +00:00
|
|
|
import { AnvilSnapshot } from "../Pages/Anvil/AnvilSnapshot";
|
2022-09-01 20:55:22 +00:00
|
|
|
|
2022-03-31 11:51:08 +00:00
|
|
|
export class ObjectsRegistry {
|
2022-05-31 05:33:59 +00:00
|
|
|
private static aggregateHelper__: AggregateHelper;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get AggregateHelper(): AggregateHelper {
|
|
|
|
|
if (ObjectsRegistry.aggregateHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.aggregateHelper__ = new AggregateHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.aggregateHelper__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2023-06-15 13:21:11 +00:00
|
|
|
private static assertHelper__: AssertHelper;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-06-15 13:21:11 +00:00
|
|
|
static get AssertHelper(): AssertHelper {
|
|
|
|
|
if (ObjectsRegistry.assertHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.assertHelper__ = new AssertHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.assertHelper__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static jsEditor__: JSEditor;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get JSEditor(): JSEditor {
|
|
|
|
|
if (ObjectsRegistry.jsEditor__ === undefined) {
|
|
|
|
|
ObjectsRegistry.jsEditor__ = new JSEditor();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.jsEditor__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static commonLocators__: CommonLocators;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get CommonLocators(): CommonLocators {
|
|
|
|
|
if (ObjectsRegistry.commonLocators__ === undefined) {
|
|
|
|
|
ObjectsRegistry.commonLocators__ = new CommonLocators();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.commonLocators__;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static entityExplorer__: EntityExplorer;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get EntityExplorer(): EntityExplorer {
|
|
|
|
|
if (ObjectsRegistry.entityExplorer__ === undefined) {
|
|
|
|
|
ObjectsRegistry.entityExplorer__ = new EntityExplorer();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.entityExplorer__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static apiPage__: ApiPage;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get ApiPage(): ApiPage {
|
|
|
|
|
if (ObjectsRegistry.apiPage__ === undefined) {
|
|
|
|
|
ObjectsRegistry.apiPage__ = new ApiPage();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.apiPage__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2023-03-27 09:36:03 +00:00
|
|
|
private static adminSettings__: AdminSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-03-27 09:36:03 +00:00
|
|
|
static get AdminSettings(): AdminSettings {
|
|
|
|
|
if (ObjectsRegistry.adminSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.adminSettings__ = new AdminSettings();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.adminSettings__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static homePage__: HomePage;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get HomePage(): HomePage {
|
|
|
|
|
if (ObjectsRegistry.homePage__ === undefined) {
|
|
|
|
|
ObjectsRegistry.homePage__ = new HomePage();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.homePage__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static dataSources__: DataSources;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get DataSources(): DataSources {
|
|
|
|
|
if (ObjectsRegistry.dataSources__ === undefined) {
|
|
|
|
|
ObjectsRegistry.dataSources__ = new DataSources();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.dataSources__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static table__: Table;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get Table(): Table {
|
|
|
|
|
if (ObjectsRegistry.table__ === undefined) {
|
|
|
|
|
ObjectsRegistry.table__ = new Table();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.table__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2023-07-10 04:32:42 +00:00
|
|
|
private static tabs__: Tabs;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-07-10 04:32:42 +00:00
|
|
|
static get Tabs(): Tabs {
|
|
|
|
|
if (ObjectsRegistry.tabs__ === undefined) {
|
|
|
|
|
ObjectsRegistry.tabs__ = new Tabs();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.tabs__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static propertyPane__: PropertyPane;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get PropertyPane(): PropertyPane {
|
|
|
|
|
if (ObjectsRegistry.propertyPane__ === undefined) {
|
|
|
|
|
ObjectsRegistry.propertyPane__ = new PropertyPane();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.propertyPane__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static deployMode__: DeployMode;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
static get DeployMode(): DeployMode {
|
|
|
|
|
if (ObjectsRegistry.deployMode__ === undefined) {
|
|
|
|
|
ObjectsRegistry.deployMode__ = new DeployMode();
|
2022-03-31 11:51:08 +00:00
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
return ObjectsRegistry.deployMode__;
|
|
|
|
|
}
|
2022-08-27 12:40:11 +00:00
|
|
|
|
2022-09-01 20:55:22 +00:00
|
|
|
private static gitSync__: GitSync;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-09-01 20:55:22 +00:00
|
|
|
static get GitSync(): GitSync {
|
|
|
|
|
if (ObjectsRegistry.gitSync__ === undefined) {
|
|
|
|
|
ObjectsRegistry.gitSync__ = new GitSync();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.gitSync__;
|
|
|
|
|
}
|
2022-10-20 12:08:48 +00:00
|
|
|
|
2022-08-27 12:40:11 +00:00
|
|
|
private static fakerHelper__: FakerHelper;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-08-27 12:40:11 +00:00
|
|
|
static get FakerHelper(): FakerHelper {
|
|
|
|
|
if (ObjectsRegistry.fakerHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.fakerHelper__ = new FakerHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.fakerHelper__;
|
|
|
|
|
}
|
2022-10-20 12:08:48 +00:00
|
|
|
|
2022-12-12 04:51:14 +00:00
|
|
|
private static debuggerHelper__: DebuggerHelper;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-10-20 12:08:48 +00:00
|
|
|
static get DebuggerHelper(): DebuggerHelper {
|
2022-12-12 04:51:14 +00:00
|
|
|
if (ObjectsRegistry.debuggerHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.debuggerHelper__ = new DebuggerHelper();
|
2022-10-20 12:08:48 +00:00
|
|
|
}
|
2022-12-12 04:51:14 +00:00
|
|
|
return ObjectsRegistry.debuggerHelper__;
|
2022-10-20 12:08:48 +00:00
|
|
|
}
|
2022-12-02 05:49:51 +00:00
|
|
|
|
2022-12-12 04:51:14 +00:00
|
|
|
private static appSettings__: AppSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-02 05:49:51 +00:00
|
|
|
static get AppSettings(): AppSettings {
|
2022-12-12 04:51:14 +00:00
|
|
|
if (ObjectsRegistry.appSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.appSettings__ = new AppSettings();
|
2022-12-02 05:49:51 +00:00
|
|
|
}
|
2022-12-12 04:51:14 +00:00
|
|
|
return ObjectsRegistry.appSettings__;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static generalSettings__: GeneralSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-12 04:51:14 +00:00
|
|
|
static get GeneralSettings(): GeneralSettings {
|
|
|
|
|
if (ObjectsRegistry.generalSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.generalSettings__ = new GeneralSettings();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.generalSettings__;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static pageSettings__: PageSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-12 04:51:14 +00:00
|
|
|
static get PageSettings(): PageSettings {
|
|
|
|
|
if (ObjectsRegistry.pageSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.pageSettings__ = new PageSettings();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.pageSettings__;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static themeSettings__: ThemeSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-12 04:51:14 +00:00
|
|
|
static get ThemeSettings(): ThemeSettings {
|
|
|
|
|
if (ObjectsRegistry.themeSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.themeSettings__ = new ThemeSettings();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.themeSettings__;
|
2022-12-02 05:49:51 +00:00
|
|
|
}
|
2022-12-21 17:14:47 +00:00
|
|
|
|
2022-12-26 05:11:33 +00:00
|
|
|
private static embedSettings__: EmbedSettings;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-26 05:11:33 +00:00
|
|
|
static get EmbedSettings(): EmbedSettings {
|
|
|
|
|
if (ObjectsRegistry.embedSettings__ === undefined) {
|
|
|
|
|
ObjectsRegistry.embedSettings__ = new EmbedSettings();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.embedSettings__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-21 17:14:47 +00:00
|
|
|
private static LibraryInstaller__: LibraryInstaller;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-21 17:14:47 +00:00
|
|
|
static get LibraryInstaller(): LibraryInstaller {
|
|
|
|
|
if (ObjectsRegistry.LibraryInstaller__ === undefined) {
|
|
|
|
|
ObjectsRegistry.LibraryInstaller__ = new LibraryInstaller();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.LibraryInstaller__;
|
|
|
|
|
}
|
2022-12-26 05:11:33 +00:00
|
|
|
|
2023-02-17 16:03:34 +00:00
|
|
|
private static peekOverlay__: PeekOverlay;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-02-17 16:03:34 +00:00
|
|
|
static get PeekOverlay(): PeekOverlay {
|
|
|
|
|
if (ObjectsRegistry.peekOverlay__ === undefined) {
|
|
|
|
|
ObjectsRegistry.peekOverlay__ = new PeekOverlay();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.peekOverlay__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-26 05:11:33 +00:00
|
|
|
private static inviteModal__: InviteModal;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2022-12-26 05:11:33 +00:00
|
|
|
static get InviteModal(): InviteModal {
|
|
|
|
|
if (ObjectsRegistry.inviteModal__ === undefined) {
|
|
|
|
|
ObjectsRegistry.inviteModal__ = new InviteModal();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.inviteModal__;
|
|
|
|
|
}
|
2023-02-10 06:11:35 +00:00
|
|
|
|
|
|
|
|
private static templates__: Templates;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-02-10 06:11:35 +00:00
|
|
|
static get Templates(): Templates {
|
|
|
|
|
if (ObjectsRegistry.templates__ === undefined) {
|
|
|
|
|
ObjectsRegistry.templates__ = new Templates();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.templates__;
|
|
|
|
|
}
|
2023-05-02 09:52:05 +00:00
|
|
|
|
|
|
|
|
private static onboarding__: Onboarding;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-05-02 09:52:05 +00:00
|
|
|
static get Onboarding(): Onboarding {
|
|
|
|
|
if (ObjectsRegistry.onboarding__ === undefined) {
|
|
|
|
|
ObjectsRegistry.onboarding__ = new Onboarding();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.onboarding__;
|
|
|
|
|
}
|
2023-05-30 02:40:13 +00:00
|
|
|
|
|
|
|
|
private static autoLayout__: AutoLayout;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-05-30 02:40:13 +00:00
|
|
|
static get AutoLayout(): AutoLayout {
|
|
|
|
|
if (ObjectsRegistry.autoLayout__ === undefined) {
|
|
|
|
|
ObjectsRegistry.autoLayout__ = new AutoLayout();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.autoLayout__;
|
|
|
|
|
}
|
2023-06-15 13:21:11 +00:00
|
|
|
|
2024-01-31 05:32:38 +00:00
|
|
|
private static anvilLayout__: AnvilLayout;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2024-01-31 05:32:38 +00:00
|
|
|
static get AnvilLayout(): AnvilLayout {
|
|
|
|
|
if (ObjectsRegistry.anvilLayout__ === undefined) {
|
|
|
|
|
ObjectsRegistry.anvilLayout__ = new AnvilLayout();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.anvilLayout__;
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-15 05:30:57 +00:00
|
|
|
private static wdsWidgets__: WDSWidgets;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2024-02-15 05:30:57 +00:00
|
|
|
static get WDSWidgets(): WDSWidgets {
|
|
|
|
|
if (ObjectsRegistry.wdsWidgets__ === undefined) {
|
|
|
|
|
ObjectsRegistry.wdsWidgets__ = new WDSWidgets();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.wdsWidgets__;
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-20 13:00:16 +00:00
|
|
|
private static anvilSnapshot__: AnvilSnapshot;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2024-06-20 13:00:16 +00:00
|
|
|
static get AnvilSnapshot(): AnvilSnapshot {
|
|
|
|
|
if (ObjectsRegistry.anvilSnapshot__ === undefined) {
|
|
|
|
|
ObjectsRegistry.anvilSnapshot__ = new AnvilSnapshot();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.anvilSnapshot__;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-18 05:18:35 +00:00
|
|
|
private static dataManager__: DataManager;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-08-18 05:18:35 +00:00
|
|
|
static get DataManager(): DataManager {
|
|
|
|
|
if (ObjectsRegistry.dataManager__ === undefined) {
|
|
|
|
|
ObjectsRegistry.dataManager__ = new DataManager();
|
2023-06-15 13:21:11 +00:00
|
|
|
}
|
2023-08-18 05:18:35 +00:00
|
|
|
return ObjectsRegistry.dataManager__;
|
2023-06-15 13:21:11 +00:00
|
|
|
}
|
2023-07-26 13:26:24 +00:00
|
|
|
|
|
|
|
|
private static gsheetHelper__: GsheetHelper;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-07-26 13:26:24 +00:00
|
|
|
static get GSheetHelper(): GsheetHelper {
|
|
|
|
|
if (ObjectsRegistry.gsheetHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.gsheetHelper__ = new GsheetHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.gsheetHelper__;
|
|
|
|
|
}
|
2023-09-25 06:27:23 +00:00
|
|
|
|
|
|
|
|
private static communityTemplates__: CommunityTemplates;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
2023-09-25 06:27:23 +00:00
|
|
|
static get CommunityTemplates(): CommunityTemplates {
|
|
|
|
|
if (ObjectsRegistry.communityTemplates__ === undefined) {
|
|
|
|
|
ObjectsRegistry.communityTemplates__ = new CommunityTemplates();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.communityTemplates__;
|
|
|
|
|
}
|
chore: Add cypress specs for partial import and export functionality (#30166)
## 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>
2024-01-17 05:50:01 +00:00
|
|
|
|
|
|
|
|
private static partialImportExport__: PartialImportExport;
|
2024-12-30 05:11:52 +00:00
|
|
|
|
chore: Add cypress specs for partial import and export functionality (#30166)
## 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>
2024-01-17 05:50:01 +00:00
|
|
|
static get PartialImportExport(): PartialImportExport {
|
|
|
|
|
if (ObjectsRegistry.partialImportExport__ === undefined) {
|
|
|
|
|
ObjectsRegistry.partialImportExport__ = new PartialImportExport();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.partialImportExport__;
|
|
|
|
|
}
|
2022-04-03 16:43:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const initLocalstorageRegistry = () => {
|
2022-05-31 05:33:59 +00:00
|
|
|
cy.window().then((window) => {
|
|
|
|
|
window.localStorage.setItem("ShowCommentsButtonToolTip", "");
|
|
|
|
|
window.localStorage.setItem("updateDismissed", "true");
|
2024-12-30 05:11:52 +00:00
|
|
|
window.localStorage.setItem("NUDGE_SHOWN_SPLIT_PANE", "true");
|
2022-05-31 05:33:59 +00:00
|
|
|
});
|
|
|
|
|
localStorage.setItem("inDeployedMode", "false");
|
2022-04-12 10:01:22 +00:00
|
|
|
};
|
|
|
|
|
|
2022-08-27 12:40:11 +00:00
|
|
|
declare namespace Cypress {
|
2022-04-12 10:01:22 +00:00
|
|
|
namespace Cypress {
|
|
|
|
|
interface Chainable {
|
2022-10-20 12:08:48 +00:00
|
|
|
TypeTab: (shiftKey: boolean, ctrlKey: boolean) => void;
|
2022-04-12 10:01:22 +00:00
|
|
|
}
|
|
|
|
|
}
|
2022-05-31 05:33:59 +00:00
|
|
|
}
|