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";
|
|
|
|
|
import { HomePage } from "../Pages/HomePage";
|
|
|
|
|
import { DataSources } from "../Pages/DataSources";
|
|
|
|
|
import { Table } from "../Pages/Table";
|
2022-07-14 07:02:35 +00:00
|
|
|
import { TableV2 } from "../Pages/TableV2";
|
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-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;
|
|
|
|
|
static get AggregateHelper(): AggregateHelper {
|
|
|
|
|
if (ObjectsRegistry.aggregateHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.aggregateHelper__ = new AggregateHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.aggregateHelper__;
|
|
|
|
|
}
|
2022-03-31 11:51:08 +00:00
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static jsEditor__: JSEditor;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
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
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static homePage__: HomePage;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
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
|
|
|
|
2022-07-14 07:02:35 +00:00
|
|
|
private static tableV2__: TableV2;
|
|
|
|
|
static get TableV2(): TableV2 {
|
|
|
|
|
if (ObjectsRegistry.tableV2__ === undefined) {
|
|
|
|
|
ObjectsRegistry.tableV2__ = new TableV2();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.tableV2__;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-31 05:33:59 +00:00
|
|
|
private static propertyPane__: PropertyPane;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
static get FakerHelper(): FakerHelper {
|
|
|
|
|
if (ObjectsRegistry.fakerHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.fakerHelper__ = new FakerHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.fakerHelper__;
|
|
|
|
|
}
|
2022-10-20 12:08:48 +00:00
|
|
|
|
|
|
|
|
private static DebuggerHelper__: DebuggerHelper;
|
|
|
|
|
static get DebuggerHelper(): DebuggerHelper {
|
|
|
|
|
if (ObjectsRegistry.DebuggerHelper__ === undefined) {
|
|
|
|
|
ObjectsRegistry.DebuggerHelper__ = new DebuggerHelper();
|
|
|
|
|
}
|
|
|
|
|
return ObjectsRegistry.DebuggerHelper__;
|
|
|
|
|
}
|
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");
|
|
|
|
|
});
|
|
|
|
|
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
|
|
|
}
|