diff --git a/README.md b/README.md index 42b80415..457f2890 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,31 @@ Time: 6.032 s, estimated 8 s Ran all test suites with tests matching "domainSelector". ``` + + ### Miroir-standalone-app: Automated Integration Tests +#### Unit tests + +The LocalStoreController can be tested: + +```sh +VITE_MIROIR_TEST_CONFIG_FILENAME=./packages/miroir-standalone-app/tests/miroirConfig.test-emulatedServer-indexedDb VITE_MIROIR_LOG_CONFIG_FILENAME=./packages/miroir-standalone-app/tests/specificLoggersConfig_DomainController_debug npm run test -w miroir-standalone-app -- LocalStoreController +``` + +Should result in: + +```sh + ✓ 4_storage/LocalStoreController.unit.test.tsx (12 tests) 1522ms + + Test Files 1 passed (1) + Tests 12 passed (12) + Start at 15:48:36 + Duration 10.38s (transform 943ms, setup 114ms, collect 3.30s, tests 1.52s, environment 480ms, prepare 260ms) +``` + + + #### automated integration tests On File System Using jest / vitest environment only diff --git a/packages/miroir-core/src/1_core/Model.ts b/packages/miroir-core/src/1_core/Model.ts index 387d0725..8b52f7de 100644 --- a/packages/miroir-core/src/1_core/Model.ts +++ b/packages/miroir-core/src/1_core/Model.ts @@ -1,35 +1,36 @@ import entityEntity from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad.json'; import entityApplicationDeploymentConfiguration from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/35c5608a-7678-4f07-a4ec-76fc5bc35424.json'; +import entityReport from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916.json'; import entityEntityDefinition from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd.json'; import EntityJzodSchema from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/5e81e1b9-38be-487c-b3e5-53796c57fccf.json'; +import entityStoreBasedConfiguration from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/7990c0c9-86c3-40a1-a121-036c91b55ed7.json'; import entityApplication from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/a659d350-dd97-4da9-91de-524fa01745dc.json'; import entityApplicationVersion from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/c3f0facf-57d1-4fa8-b3fa-f2c007fdbe24.json'; import entityApplicationModelBranch from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/cdb0aec6-b848-43ac-a058-fe2dbe5811f1.json'; -import entityReport from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916.json'; -import entityStoreBasedConfiguration from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/7990c0c9-86c3-40a1-a121-036c91b55ed7.json'; -import entityDefinitionApplication from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/9460420b-f176-4918-bd45-894ab195ffe9.json'; -import entityDefinitionApplicationDeploymentConfiguration from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/bd303ae8-6bce-4b44-a63c-815b9ebf728b.json'; -import entityDefinitionApplicationModelBranch from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/69bf7c03-a1df-4d1c-88c1-44363feeea87.json'; +import entityDefinitionJzodSchema from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/15407b85-f2c8-4a34-bfa7-89f044ba2407.json'; import entityDefinitionApplicationVersion from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/27046fce-742f-4cc4-bb95-76b271f490a5.json'; import entityDefinitionEntity from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/381ab1be-337f-4198-b1d3-f686867fc1dd.json'; -import entityDefinitionEntityDefinition from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/bdd7ad43-f0fc-4716-90c1-87454c40dd95.json'; -import entityDefinitionJzodSchema from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/15407b85-f2c8-4a34-bfa7-89f044ba2407.json'; +import entityDefinitionApplicationModelBranch from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/69bf7c03-a1df-4d1c-88c1-44363feeea87.json'; +import entityDefinitionApplication from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/9460420b-f176-4918-bd45-894ab195ffe9.json'; import entityDefinitionReport from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/952d2c65-4da2-45c2-9394-a0920ceedfb6.json'; +import entityDefinitionApplicationDeploymentConfiguration from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/bd303ae8-6bce-4b44-a63c-815b9ebf728b.json'; +import entityDefinitionEntityDefinition from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/bdd7ad43-f0fc-4716-90c1-87454c40dd95.json'; // import entityDefinitionModelVersion from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/27046fce-742f-4cc4-bb95-76b271f490a5.json'; import entityDefinitionStoreBasedConfiguration from '../assets/miroir_model/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd/f93af951-ea13-4815-a2e3-ec0cab1fadd2.json'; +import reportEntityDetails from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/074d1de9-594d-42d6-8848-467baeb6f3e0.json'; import reportApplicationVersionList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/0810de28-fdab-4baf-8935-7e04a8f779a9.json'; import reportApplicationList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/0e4cf674-3a26-422a-8618-09e32302ac0c.json'; import reportReportList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/1fc7e12e-90f2-4c0a-8ed9-ed35ce3a7855.json'; import reportConfigurationList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/43f04807-8f96-43f9-876f-9a0210f7b99c.json'; import reportApplicationModelBranchList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/60648b22-e2c6-4b74-8031-53884f597d63.json'; import reportJzodSchemaList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/8b22e84e-9374-4121-b2a7-d13d947a0ba2.json'; -import reportEntityList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/c9ea3359-690c-4620-9603-b5b402e4a2b9.json'; -import reportEntityDetails from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/074d1de9-594d-42d6-8848-467baeb6f3e0.json'; import reportEntityDefinitionDetails from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/acd55b04-84df-427e-b219-cf0e01a6881b.json'; +import reportEntityList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/c9ea3359-690c-4620-9603-b5b402e4a2b9.json'; import reportApplicationDeploymentConfigurationList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/df0a9a8f-e0f6-4f9f-8635-c8460e638e1b.json'; import reportEntityDefinitionList from '../assets/miroir_data/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916/f9aff35d-8636-4519-8361-c7648e0ddc68.json'; +import jzodSchemajzodMiroirBootstrapSchema from "../assets/miroir_data/5e81e1b9-38be-487c-b3e5-53796c57fccf/1e8dab4b-65a3-4686-922e-ce89a2d62aa9.json"; import applicationVersionInitialMiroirVersionCrossEntityDefinitionEntity from '../assets/miroir_data/8bec933d-6287-4de7-8a88-5c24216de9f4/17adb534-1dcb-4874-a4ef-6c1e03b31c4e.json'; import applicationVersionInitialMiroirVersionCrossEntityDefinitionEntityDefinition from '../assets/miroir_data/8bec933d-6287-4de7-8a88-5c24216de9f4/48644159-66d4-426d-b38d-d083fd455e7b.json'; import applicationVersionInitialMiroirVersionCrossEntityDefinitionApplicationModelBranch from '../assets/miroir_data/8bec933d-6287-4de7-8a88-5c24216de9f4/4aaba993-f0a1-4a26-b1ea-13b0ad532685.json'; @@ -38,16 +39,20 @@ import applicationVersionInitialMiroirVersionCrossEntityDefinitionStoreBasedConf import applicationVersionInitialMiroirVersionCrossEntityDefinitionApplication from '../assets/miroir_data/8bec933d-6287-4de7-8a88-5c24216de9f4/dc47438c-166a-4d19-aeba-ad70281afdf4.json'; import applicationVersionInitialMiroirVersionCrossEntityDefinitionReport from '../assets/miroir_data/8bec933d-6287-4de7-8a88-5c24216de9f4/ede7e794-5ae7-48a8-81c9-d1f82df11829.json'; import applicationVersionInitialMiroirVersion from '../assets/miroir_data/c3f0facf-57d1-4fa8-b3fa-f2c007fdbe24/695826c2-aefa-4f5f-a131-dee46fe21c1.json'; -import jzodSchemajzodMiroirBootstrapSchema from "../assets/miroir_data/5e81e1b9-38be-487c-b3e5-53796c57fccf/1e8dab4b-65a3-4686-922e-ce89a2d62aa9.json"; import { MetaEntity, Uuid } from "../0_interfaces/1_core/EntityDefinition.js"; import instanceConfigurationReference from '../assets/miroir_data/7990c0c9-86c3-40a1-a121-036c91b55ed7/360fcf1f-f0d4-4f8a-9262-07886e70fa15.json'; // import { Report, } from "../0_interfaces/1_core/Report.js"; -import { JzodSchemaDefinition } from "../0_interfaces/1_core/JzodSchemaDefinition.js"; -import { Entity, EntityDefinition, JzodSchema, Menu, MetaModel, Report } from "../0_interfaces/1_core/preprocessor-generated/miroirFundamentalType"; -import { applicationDeploymentAdmin, applicationDeploymentLibrary, applicationDeploymentMiroir, entityDefinitionMenu, entityMenu, menuDefaultMiroir, reportMenuList } from '..'; -import { DeploymentUuidToReportsEntitiesDefinitionsMapping } from '../0_interfaces/1_core/Model'; +import { applicationDeploymentMiroir, entityDefinitionMenu, entityMenu, menuDefaultMiroir, reportMenuList } from ".."; +import { + Entity, + EntityDefinition, + JzodSchema, + Menu, + MetaModel, + Report, +} from "../0_interfaces/1_core/preprocessor-generated/miroirFundamentalType"; // TODO: REMOVE THIS!!! // FIRST: CENTRALIZE LOGIC TO DETERMINE MODEL ENTITIES diff --git a/packages/miroir-core/src/2_domain/DomainDataAccess.ts b/packages/miroir-core/src/2_domain/DomainDataAccess.ts index 5003de2d..1d51ac49 100644 --- a/packages/miroir-core/src/2_domain/DomainDataAccess.ts +++ b/packages/miroir-core/src/2_domain/DomainDataAccess.ts @@ -16,17 +16,6 @@ import applicationDeploymentMiroir from "../assets/miroir_data/35c5608a-7678-4f0 import entityReport from "../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/3f2baa83-3ef7-45ce-82ea-6a43f7a8c916.json"; import entityEntityDefinition from "../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/54b9c72f-d4f3-4db9-9e0e-0dc840b530bd.json"; -import { JzodSchemaDefinition } from "../0_interfaces/1_core/JzodSchemaDefinition.js"; -import { applicationDeploymentLibrary } from "../ApplicationDeploymentLibrary.js"; -import entityEntity from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad.json'; -import entityJzodSchema from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/5e81e1b9-38be-487c-b3e5-53796c57fccf.json'; -import entityStoreBasedConfiguration from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/7990c0c9-86c3-40a1-a121-036c91b55ed7.json'; -import entityApplicationVersion from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/c3f0facf-57d1-4fa8-b3fa-f2c007fdbe24.json'; -import { LoggerInterface } from "../0_interfaces/4-services/LoggerInterface.js"; -import { MiroirLoggerFactory } from "../4_services/Logger.js"; -import { packageName } from "../constants.js"; -import { getLoggerName } from "../tools.js"; -import { cleanLevel } from "./constants.js"; import { ApplicationVersion, EntityDefinition, @@ -37,7 +26,16 @@ import { Report, StoreBasedConfiguration, } from "../0_interfaces/1_core/preprocessor-generated/miroirFundamentalType.js"; +import { LoggerInterface } from "../0_interfaces/4-services/LoggerInterface.js"; +import { MiroirLoggerFactory } from "../4_services/Logger.js"; +import entityEntity from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad.json'; +import entityJzodSchema from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/5e81e1b9-38be-487c-b3e5-53796c57fccf.json'; +import entityStoreBasedConfiguration from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/7990c0c9-86c3-40a1-a121-036c91b55ed7.json'; +import entityApplicationVersion from '../assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/c3f0facf-57d1-4fa8-b3fa-f2c007fdbe24.json'; +import { packageName } from "../constants.js"; import { entityMenu } from "../index.js"; +import { getLoggerName } from "../tools.js"; +import { cleanLevel } from "./constants.js"; const loggerName: string = getLoggerName(packageName, cleanLevel,"DomainDataAccess"); let log:LoggerInterface = console as any as LoggerInterface; diff --git a/packages/miroir-core/src/3_controllers/ActionRunner.ts b/packages/miroir-core/src/3_controllers/ActionRunner.ts index fc6f204d..71cb5323 100644 --- a/packages/miroir-core/src/3_controllers/ActionRunner.ts +++ b/packages/miroir-core/src/3_controllers/ActionRunner.ts @@ -13,7 +13,6 @@ import { packageName } from "../constants.js"; import { getLoggerName } from "../tools.js"; import { cleanLevel } from "./constants.js"; -import { applicationDeploymentLibrary } from "../ApplicationDeploymentLibrary"; import applicationDeploymentMiroir from "../assets/miroir_data/35c5608a-7678-4f07-a4ec-76fc5bc35424/10ff36f2-50a3-48d8-b80f-e48e5d13af8e.json"; import { defaultMiroirMetaModel } from "../1_core/Model.js"; diff --git a/packages/miroir-core/src/3_controllers/resetApplicationDatabase.ts b/packages/miroir-core/src/3_controllers/resetApplicationDatabase.ts index 294693b8..6404ef2f 100644 --- a/packages/miroir-core/src/3_controllers/resetApplicationDatabase.ts +++ b/packages/miroir-core/src/3_controllers/resetApplicationDatabase.ts @@ -1,6 +1,6 @@ import { DomainControllerInterface } from "../0_interfaces/2_domain/DomainControllerInterface"; import { defaultMiroirMetaModel } from '../1_core/Model'; -import { applicationDeploymentLibrary } from "../ApplicationDeploymentLibrary"; +import adminConfigurationDeploymentLibrary from "../assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/f714bb2f-a12d-4e71-a03b-74dcedea6eb4.json"; import applicationDeploymentMiroir from '../assets/miroir_data/35c5608a-7678-4f07-a4ec-76fc5bc35424/10ff36f2-50a3-48d8-b80f-e48e5d13af8e.json'; import applicationStoreBasedConfigurationMiroir from '../assets/miroir_data/7990c0c9-86c3-40a1-a121-036c91b55ed7/360fcf1f-f0d4-4f8a-9262-07886e70fa15.json'; @@ -25,7 +25,7 @@ MiroirLoggerFactory.asyncCreateLogger(loggerName).then( export async function resetAndInitMiroirAndApplicationDatabase( domainController: DomainControllerInterface ) { - const deployments = [applicationDeploymentLibrary, applicationDeploymentMiroir]; + const deployments = [adminConfigurationDeploymentLibrary, applicationDeploymentMiroir]; for (const d of deployments) { await domainController.handleAction({ diff --git a/packages/miroir-core/src/4_services/RestServer.ts b/packages/miroir-core/src/4_services/RestServer.ts index b6feb40d..5f9ce64d 100644 --- a/packages/miroir-core/src/4_services/RestServer.ts +++ b/packages/miroir-core/src/4_services/RestServer.ts @@ -3,13 +3,11 @@ import { ActionReturnType, ApplicationSection, DomainElement, - DomainManyQueriesWithDeploymentUuid, - EntityInstance as string, + EntityInstance, InstanceAction, ModelAction, QueryAction, - StoreOrBundleAction, - EntityInstance, + StoreOrBundleAction } from "../0_interfaces/1_core/preprocessor-generated/miroirFundamentalType"; import { LoggerInterface } from "../0_interfaces/4-services/LoggerInterface"; import { @@ -22,14 +20,12 @@ import { } from "../3_controllers/ActionRunner"; import { PersistenceStoreControllerManagerInterface } from "../0_interfaces/4-services/PersistenceStoreControllerManagerInterface"; -import { applicationDeploymentLibrary } from "../ApplicationDeploymentLibrary"; import { packageName } from "../constants"; import { getLoggerName } from "../tools"; import { MiroirLoggerFactory } from "./Logger"; import { generateRestServiceResponse } from "./RestTools"; import { cleanLevel } from "./constants"; -import applicationDeploymentMiroir from "../assets/miroir_data/35c5608a-7678-4f07-a4ec-76fc5bc35424/10ff36f2-50a3-48d8-b80f-e48e5d13af8e.json"; import { LocalCacheInterface } from "../0_interfaces/4-services/LocalCacheInterface"; import { getSelectorParams, selectByDomainManyQueriesFromDomainState } from "../2_domain/DomainStateQuerySelectors"; diff --git a/packages/miroir-core/src/assets/admin_data/25d935e7-9e93-42c2-aade-0472b883492b/1acc4342-8180-445b-9766-7cb91e55ca6c.json b/packages/miroir-core/src/assets/admin_data/25d935e7-9e93-42c2-aade-0472b883492b/1acc4342-8180-445b-9766-7cb91e55ca6c.json new file mode 100644 index 00000000..947e58f3 --- /dev/null +++ b/packages/miroir-core/src/assets/admin_data/25d935e7-9e93-42c2-aade-0472b883492b/1acc4342-8180-445b-9766-7cb91e55ca6c.json @@ -0,0 +1,8 @@ +{ + "uuid": "1acc4342-8180-445b-9766-7cb91e55ca6c", + "parentName":"Application", + "parentUuid":"25d935e7-9e93-42c2-aade-0472b883492b", + "name":"Test1", + "defaultLabel": "The Test1 application.", + "description": "The model and data of the Test1 application." +} \ No newline at end of file diff --git a/packages/miroir-core/src/assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/15e2004a-e7a0-4b9e-8acd-6d3500a6c9ad.json b/packages/miroir-core/src/assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/15e2004a-e7a0-4b9e-8acd-6d3500a6c9ad.json new file mode 100644 index 00000000..0a3676a8 --- /dev/null +++ b/packages/miroir-core/src/assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/15e2004a-e7a0-4b9e-8acd-6d3500a6c9ad.json @@ -0,0 +1,24 @@ +{ + "uuid":"15e2004a-e7a0-4b9e-8acd-6d3500a6c9ad", + "parentName":"Deployment", + "parentUuid":"7959d814-400c-4e80-988f-a00fe582ab98", + "type":"singleNode", + "name":"Test1ApplicationFilesystemDeployment", + "defaultLabel":"Test1ApplicationFilesystemDeployment", + "application":"1acc4342-8180-445b-9766-7cb91e55ca6c", + "description": "The default Filesystem Deployment for Application Test1", + "configuration": { + "admin": { + "emulatedServerType": "filesystem", + "directory":"../miroir-core/src/assets/admin" + }, + "model": { + "emulatedServerType": "filesystem", + "directory":"../miroir-core/src/assets/test1_model" + }, + "data": { + "emulatedServerType": "filesystem", + "directory":"../miroir-core/src/assets/test1_data" + } + } +} \ No newline at end of file diff --git a/packages/miroir-core/src/index.ts b/packages/miroir-core/src/index.ts index be339cfa..964c6c04 100644 --- a/packages/miroir-core/src/index.ts +++ b/packages/miroir-core/src/index.ts @@ -503,8 +503,8 @@ export { export { miroirCoreStartup } from './startup.js'; export { stringTuple, circularReplacer, getLoggerName } from './tools.js'; -export {applicationDeploymentLibrary} from "./ApplicationDeploymentLibrary.js" -export {applicationDeploymentAdmin} from "./ApplicationDeploymentAdmin.js" +// export {applicationDeploymentLibrary} from "./ApplicationDeploymentLibrary.js" +// export {applicationDeploymentAdmin} from "./ApplicationDeploymentAdmin.js" import entityApplication from './assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/a659d350-dd97-4da9-91de-524fa01745dc.json'; import entityApplicationDeploymentConfiguration from './assets/miroir_model/16dbfe28-e1d7-4f20-9ba4-c1a9873202ad/35c5608a-7678-4f07-a4ec-76fc5bc35424.json'; @@ -768,11 +768,13 @@ import menuDefaultAdmin from "./assets/admin_model/dde4c883-ae6d-47c3-b6df-26bc6 import adminConfigurationDeploymentAdmin from "./assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/18db21bf-f8d3-4f6a-8296-84b69f6dc48b.json"; import adminConfigurationDeploymentMiroir from "./assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/10ff36f2-50a3-48d8-b80f-e48e5d13af8e.json"; import adminConfigurationDeploymentLibrary from "./assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/f714bb2f-a12d-4e71-a03b-74dcedea6eb4.json"; +import adminConfigurationDeploymentTest1 from "./assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/15e2004a-e7a0-4b9e-8acd-6d3500a6c9ad.json"; export { adminConfigurationDeploymentAdmin, adminConfigurationDeploymentLibrary, adminConfigurationDeploymentMiroir, + adminConfigurationDeploymentTest1, menuDefaultAdmin, } diff --git a/packages/miroir-core/tests/2_domain/domainSelector.unit.test.ts b/packages/miroir-core/tests/2_domain/domainSelector.unit.test.ts index 833c8c3a..e113bb6c 100644 --- a/packages/miroir-core/tests/2_domain/domainSelector.unit.test.ts +++ b/packages/miroir-core/tests/2_domain/domainSelector.unit.test.ts @@ -1,4 +1,4 @@ -import { applicationDeploymentLibrary } from "../../src/ApplicationDeploymentLibrary"; +import adminConfigurationDeploymentLibrary from "../../src/assets/admin_data/7959d814-400c-4e80-988f-a00fe582ab98/f714bb2f-a12d-4e71-a03b-74dcedea6eb4.json"; import { DomainState } from "../../src/0_interfaces/2_domain/DomainControllerInterface"; import { @@ -22,7 +22,7 @@ describe("domainSelector", () => { () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -68,7 +68,7 @@ describe("domainSelector", () => { () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -115,7 +115,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - "deploymentUuid": applicationDeploymentLibrary.uuid, + "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, "contextResults": { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -162,7 +162,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - "deploymentUuid": applicationDeploymentLibrary.uuid, + "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, "contextResults": { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -186,7 +186,7 @@ describe("domainSelector", () => { const queryResult:any = selectByDomainManyQueriesFromDomainState(domainState, getSelectorParams(queryParam)); - expect(queryResult.elementValue.book.elementValue).toBe(domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) } ) @@ -197,7 +197,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - "deploymentUuid": applicationDeploymentLibrary.uuid, + "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, "contextResults": { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -225,7 +225,7 @@ describe("domainSelector", () => { const queryResult:any = selectByDomainManyQueriesFromDomainState(domainState, getSelectorParams(queryParam)); - expect(queryResult.elementValue.book2.elementValue).toBe(domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + expect(queryResult.elementValue.book2.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) } ) @@ -236,7 +236,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: { wantedBookUuid: { elementType: "instanceUuid", elementValue:"caef8a59-39eb-48b5-ad59-a7642d3a1e8f" } } }, @@ -261,7 +261,7 @@ describe("domainSelector", () => { const queryResult:any = selectByDomainManyQueriesFromDomainState(domainState, getSelectorParams(queryParam)); console.log("queryResult", JSON.stringify(queryResult, circularReplacer(), 2)); - expect(queryResult.elementValue.book.elementValue).toBe(domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) + expect(queryResult.elementValue.book.elementValue).toBe(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"]) } ) @@ -272,7 +272,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - "deploymentUuid": applicationDeploymentLibrary.uuid, + "deploymentUuid": adminConfigurationDeploymentLibrary.uuid, "contextResults": { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: {} }, queryParams: { elementType: "object", elementValue: {} }, @@ -313,7 +313,7 @@ describe("domainSelector", () => { expect(result.elementType).toBe("object") expect((result.elementValue as any)["publisher"].elementValue).toBe( - domainState[applicationDeploymentLibrary.uuid]["data"]["a027c379-8468-43a5-ba4d-bf618be25cab"][ + domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["a027c379-8468-43a5-ba4d-bf618be25cab"][ "516a7366-39e7-4998-82cb-80199a7fa667" ] ); @@ -327,7 +327,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", @@ -395,7 +395,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", @@ -456,9 +456,9 @@ describe("domainSelector", () => { console.log("result", result); expect((result.elementValue as any)["booksOfPublisher"].elementValue).toEqual({ - "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], - "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], - "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], + "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], + "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], + "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], }) } ) @@ -470,7 +470,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", @@ -545,9 +545,9 @@ describe("domainSelector", () => { const result:DomainElement = selectByDomainManyQueriesFromDomainState(domainState, getSelectorParams(queryParam)); const expectedValue = { - "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], - "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], - "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[applicationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], + "4cb917b3-3c53-4f9b-b000-b0e4c07a81f7": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["4cb917b3-3c53-4f9b-b000-b0e4c07a81f7"], + "c6852e89-3c3c-447f-b827-4b5b9d830975": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["c6852e89-3c3c-447f-b827-4b5b9d830975"], + "caef8a59-39eb-48b5-ad59-a7642d3a1e8f": domainState[adminConfigurationDeploymentLibrary.uuid]["data"]["e8ba151b-d68e-4cc3-9a83-3459d309ccf5"]["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"], }; expect((result.elementValue as any)["result1"].elementValue["caef8a59-39eb-48b5-ad59-a7642d3a1e8f"].elementValue).toEqual(expectedValue) @@ -564,7 +564,7 @@ describe("domainSelector", () => { const queryParam: DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} }, pageParams: { elementType: "object", elementValue: { applicationSection: { @@ -618,7 +618,7 @@ describe("domainSelector", () => { const expectedValue = { elementType: "object", elementValue: Object.fromEntries( - Object.entries(domainState[applicationDeploymentLibrary.uuid]["data"]).map((e) => [ + Object.entries(domainState[adminConfigurationDeploymentLibrary.uuid]["data"]).map((e) => [ e[0], { elementType: "instanceUuidIndex", elementValue: e[1] }, ]) @@ -636,14 +636,14 @@ describe("domainSelector", () => { // "contextResults": { elementType: "object", elementValue: {} }, // pageParams: { elementType: "object", elementValue: {} }, // queryParams: { elementType: "object", elementValue: {} }, - // deploymentUuid: applicationDeploymentLibrary.uuid, + // deploymentUuid: adminConfigurationDeploymentLibrary.uuid, // entityUuid: "e8ba151b-d68e-4cc3-9a83-3459d309ccf5", // }; // const result: RecordOfJzodElement | JzodElement | undefined = selectJzodSchemaByDomainModelQueryFromDomainState(domainState, queryParam); // expect(result).toBe( - // (domainState[applicationDeploymentLibrary.uuid]["model"]["54b9c72f-d4f3-4db9-9e0e-0dc840b530bd"][ + // (domainState[adminConfigurationDeploymentLibrary.uuid]["model"]["54b9c72f-d4f3-4db9-9e0e-0dc840b530bd"][ // "797dd185-0155-43fd-b23f-f6d0af8cae06" // ] as EntityDefinition).jzodSchema // ); diff --git a/packages/miroir-localcache-redux/src/4_services/persistence/PersistenceReduxSaga.ts b/packages/miroir-localcache-redux/src/4_services/persistence/PersistenceReduxSaga.ts index e3ad4567..ef38bc5b 100644 --- a/packages/miroir-localcache-redux/src/4_services/persistence/PersistenceReduxSaga.ts +++ b/packages/miroir-localcache-redux/src/4_services/persistence/PersistenceReduxSaga.ts @@ -16,11 +16,8 @@ import { PersistenceInterface, PersistenceStoreControllerAction, PersistenceStoreControllerManagerInterface, - RemoteStoreActionReturnType, RestClientCallReturnType, RestPersistenceClientAndRestClientInterface, - applicationDeploymentLibrary, - applicationDeploymentMiroir, getLoggerName, storeActionOrBundleActionStoreRunner } from "miroir-core"; diff --git a/packages/miroir-server/src/server.ts b/packages/miroir-server/src/server.ts index 70d4b19f..e5ae20ac 100644 --- a/packages/miroir-server/src/server.ts +++ b/packages/miroir-server/src/server.ts @@ -16,6 +16,7 @@ import { adminConfigurationDeploymentAdmin, adminConfigurationDeploymentLibrary, adminConfigurationDeploymentMiroir, + adminConfigurationDeploymentTest1, defaultLevels, getLoggerName, miroirCoreStartup, @@ -53,6 +54,7 @@ const configurations = { [adminConfigurationDeploymentAdmin.uuid]: adminConfigurationDeploymentAdmin.configuration as StoreUnitConfiguration, [adminConfigurationDeploymentMiroir.uuid]: adminConfigurationDeploymentMiroir.configuration as StoreUnitConfiguration, [adminConfigurationDeploymentLibrary.uuid]: adminConfigurationDeploymentLibrary.configuration as StoreUnitConfiguration, + [adminConfigurationDeploymentTest1.uuid]: adminConfigurationDeploymentTest1.configuration as StoreUnitConfiguration, } diff --git a/packages/miroir-standalone-app/src/index.tsx b/packages/miroir-standalone-app/src/index.tsx index 4db06d76..41c40145 100644 --- a/packages/miroir-standalone-app/src/index.tsx +++ b/packages/miroir-standalone-app/src/index.tsx @@ -11,7 +11,7 @@ import { import 'material-icons/iconfont/material-icons.css'; import { - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, ConfigurationService, defaultLevels, diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/Importer.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/Importer.tsx index d3486cbc..8683fb64 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/Importer.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/Importer.tsx @@ -19,7 +19,7 @@ import { MetaEntity, MiroirLoggerFactory, Report, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, applicationLibrary, entityEntity, @@ -402,7 +402,7 @@ export const Importer:FC = (props:ImporterCoreProps) => { { "label": newEntityListReport.defaultLabel, "section": "data", - "application": applicationDeploymentLibrary.uuid, + "application": adminConfigurationDeploymentLibrary.uuid, "reportUuid": newEntityListReport.uuid, "icon": "local_drink" }, @@ -849,7 +849,7 @@ export const Importer:FC = (props:ImporterCoreProps) => { { "label": newEntityListReport.defaultLabel, "section": "data", - "application": applicationDeploymentLibrary.uuid, + "application": adminConfigurationDeploymentLibrary.uuid, "reportUuid": newEntityListReport.uuid, "icon": "location_on" }, diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/MTableComponent.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/MTableComponent.tsx index 92aa4cea..f2ec08d8 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/MTableComponent.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/MTableComponent.tsx @@ -43,34 +43,6 @@ MiroirLoggerFactory.asyncCreateLogger(loggerName).then((value: LoggerInterface) }); -// const applicationDeploymentLibrary: ApplicationDeploymentConfiguration = { -// "uuid":"f714bb2f-a12d-4e71-a03b-74dcedea6eb4", -// "parentName":"ApplicationDeploymentConfiguration", -// "parentUuid":"35c5608a-7678-4f07-a4ec-76fc5bc35424", -// "type":"singleNode", -// "name":"LibraryApplicationPostgresDeployment", -// "defaultLabel":"LibraryApplicationPostgresDeployment", -// "application":"5af03c98-fe5e-490b-b08f-e1230971c57f", -// "description": "The default Postgres Deployment for Application Library", -// "applicationModelLevel": "model", -// "model": { -// "location": { -// "type": "sql", -// "side":"server", -// "connectionString": "postgres://postgres:postgres@localhost:5432/postgres", -// "schema": "library" -// } -// }, -// "data": { -// "location": { -// "type": "sql", -// "side":"server", -// "connectionString": "postgres://postgres:postgres@localhost:5432/postgres", -// "schema": "library" -// } -// } -// } - let count=0 let prevProps:TableComponentProps; const autoSizeStrategy = { diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionListDisplay.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionListDisplay.tsx index e70837f4..dfec2418 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionListDisplay.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionListDisplay.tsx @@ -27,15 +27,11 @@ import { QuerySelector, QuerySelectorMap, QuerySelectorParams, - applicationDeploymentAdmin, - applicationDeploymentLibrary, + adminConfigurationDeploymentAdmin, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, applicationSection, domainElementObject, - entityApplication, - entityEntity, - entityEntityDefinition, - entityReport, getApplicationSection, getDeploymentEntityStateSelectorParams, getLoggerName, @@ -46,11 +42,6 @@ import { import { Button } from "@mui/material"; import { getMemoizedDeploymentEntityStateSelectorMap } from "miroir-localcache-redux"; import { packageName } from "../../../constants"; -import { getColumnDefinitionsFromEntityDefinitionJzodObjectSchema } from "../getColumnDefinitionsFromEntityAttributes"; -import { JsonObjectEditFormDialog, JsonObjectEditFormDialogInputs } from "./JsonObjectEditFormDialog"; -import { noValue } from "./JzodElementEditor"; -import { MTableComponent } from "./MTableComponent"; -import { TableComponentType, TableComponentTypeSchema } from "./MTableComponentInterface"; import { useDomainControllerService, useMiroirContextInnerFormOutput, @@ -58,7 +49,12 @@ import { } from "../MiroirContextReactProvider"; import { useCurrentModel, useDeploymentEntityStateQuerySelectorForCleanedResult } from "../ReduxHooks"; import { cleanLevel } from "../constants"; +import { getColumnDefinitionsFromEntityDefinitionJzodObjectSchema } from "../getColumnDefinitionsFromEntityAttributes"; import { deleteCascade } from "../scripts"; +import { JsonObjectEditFormDialog, JsonObjectEditFormDialogInputs } from "./JsonObjectEditFormDialog"; +import { noValue } from "./JzodElementEditor"; +import { MTableComponent } from "./MTableComponent"; +import { TableComponentType, TableComponentTypeSchema } from "./MTableComponentInterface"; const loggerName: string = getLoggerName(packageName, cleanLevel,"ReportSectionListDisplay"); @@ -218,8 +214,8 @@ export const ReportSectionListDisplay: React.FC = ( const deployments = [ applicationDeploymentMiroir, - applicationDeploymentLibrary, - applicationDeploymentAdmin, + adminConfigurationDeploymentLibrary, + adminConfigurationDeploymentAdmin, ] as ApplicationDeploymentConfiguration[]; const miroirMetaModel: MetaModel = useCurrentModel(applicationDeploymentMiroir.uuid); diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionView.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionView.tsx index d37e535e..f3832121 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionView.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/ReportSectionView.tsx @@ -14,8 +14,8 @@ import { ReportSection, RootReportSection, Uuid, - applicationDeploymentAdmin, - applicationDeploymentLibrary, + adminConfigurationDeploymentAdmin, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, getLoggerName } from "miroir-core"; @@ -86,8 +86,8 @@ export const ReportSectionView = (props: ReportSectionEntityInstanceProps) => { const deployments = [ applicationDeploymentMiroir, - applicationDeploymentLibrary, - applicationDeploymentAdmin, + adminConfigurationDeploymentLibrary, + adminConfigurationDeploymentAdmin, ] as ApplicationDeploymentConfiguration[]; // ############################################################################################## diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/RootComponent.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/RootComponent.tsx index 645fac6d..9ce50ca4 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/RootComponent.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/RootComponent.tsx @@ -10,8 +10,8 @@ import { Outlet } from 'react-router-dom'; import { - applicationDeploymentAdmin, - applicationDeploymentLibrary, + adminConfigurationDeploymentAdmin, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, DomainControllerInterface, domainEndpointVersionV1, @@ -260,7 +260,7 @@ export const RootComponent = (props: RootComponentProps) => { actionType: "modelAction", actionName: "rollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, }); }} > @@ -273,7 +273,7 @@ export const RootComponent = (props: RootComponentProps) => { actionType: "modelAction", actionName: "rollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid: applicationDeploymentAdmin.uuid, + deploymentUuid: adminConfigurationDeploymentAdmin.uuid, }); }} > @@ -292,7 +292,7 @@ export const RootComponent = (props: RootComponentProps) => { actionType: "modelAction", actionName: "remoteLocalCacheRollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, }); }} > @@ -326,13 +326,13 @@ export const RootComponent = (props: RootComponentProps) => { await domainController.handleAction({ actionType: "modelAction", actionName: "initModel", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", params: { dataStoreType: "app", metaModel: defaultMiroirMetaModel, application: applicationLibrary, - applicationDeploymentConfiguration: applicationDeploymentLibrary, + applicationDeploymentConfiguration: adminConfigurationDeploymentLibrary, applicationModelBranch: applicationModelBranchLibraryMasterBranch, applicationStoreBasedConfiguration: applicationStoreBasedConfigurationLibrary, applicationVersion: applicationVersionLibraryInitialVersion, @@ -353,7 +353,7 @@ export const RootComponent = (props: RootComponentProps) => { await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e" }); @@ -370,7 +370,7 @@ export const RootComponent = (props: RootComponentProps) => { await remoteStore.handlePersistenceAction({ actionType: "bundleAction", actionName: "createBundle", - deploymentUuid: applicationDeploymentLibrary.uuid + deploymentUuid: adminConfigurationDeploymentLibrary.uuid }) } } @@ -393,7 +393,7 @@ export const RootComponent = (props: RootComponentProps) => { actionType: "modelAction", actionName: "remoteLocalCacheRollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }); }} > @@ -403,7 +403,7 @@ export const RootComponent = (props: RootComponentProps) => { onClick={async () => { const query:DomainManyQueriesWithDeploymentUuid = { queryType: "DomainManyQueries", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, contextResults: { elementType: "object", elementValue: {} diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/Sidebar.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/Sidebar.tsx index 56fdeae2..211ce3be 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/Sidebar.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/components/Sidebar.tsx @@ -8,8 +8,8 @@ import { CSSObject, styled, Theme, useTheme } from '@mui/material/styles'; import { AutoStories } from '@mui/icons-material'; import { - applicationDeploymentAdmin, - applicationDeploymentLibrary, + adminConfigurationDeploymentAdmin, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, getLoggerName, LoggerInterface, @@ -190,7 +190,7 @@ export const Sidebar:FC<{open:boolean, setOpen: (v:boolean)=>void}> = (props: {o count: {count} void}> = (props: {o { const deployments = [ applicationDeploymentMiroir, - applicationDeploymentLibrary, - applicationDeploymentAdmin, + adminConfigurationDeploymentLibrary, + adminConfigurationDeploymentAdmin, ] as ApplicationDeploymentConfiguration[]; // log.info("RootComponent deployments",deployments); @@ -103,7 +103,7 @@ export const HomePage = (props: RootComponentProps) => { const miroirMetaModel: MetaModel = useCurrentModel(applicationDeploymentMiroir.uuid); const libraryAppModel: MetaModel = useCurrentModel(displayedDeploymentUuid); - const adminAppModel: MetaModel = useCurrentModel(applicationDeploymentAdmin.uuid); + const adminAppModel: MetaModel = useCurrentModel(adminConfigurationDeploymentAdmin.uuid); // computing current state ##################################################################### const displayedDeploymentDefinition: ApplicationDeploymentConfiguration | undefined = deployments.find( @@ -129,8 +129,8 @@ export const HomePage = (props: RootComponentProps) => { const deploymentUuidToReportsEntitiesDefinitionsMapping = useMemo( () => ( { - [applicationDeploymentAdmin.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( - applicationDeploymentAdmin.uuid, + [adminConfigurationDeploymentAdmin.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( + adminConfigurationDeploymentAdmin.uuid, miroirMetaModel, adminAppModel, ), @@ -139,8 +139,8 @@ export const HomePage = (props: RootComponentProps) => { miroirMetaModel, miroirMetaModel, ), - [applicationDeploymentLibrary.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( - applicationDeploymentLibrary.uuid, + [adminConfigurationDeploymentLibrary.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( + adminConfigurationDeploymentLibrary.uuid, miroirMetaModel, libraryAppModel, ), @@ -281,7 +281,7 @@ export const HomePage = (props: RootComponentProps) => { actionType: "modelAction", actionName: "commit", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }, defaultMiroirMetaModel ); @@ -345,7 +345,7 @@ export const HomePage = (props: RootComponentProps) => { actionType: "modelAction", actionName: "resetData", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }); log.info( "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ RESETDATA FOR LIBRARY APPLICATION DONE @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" @@ -354,7 +354,7 @@ export const HomePage = (props: RootComponentProps) => { actionType: "modelAction", actionName: "rollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }); }} > @@ -376,7 +376,7 @@ export const HomePage = (props: RootComponentProps) => { actionType: "modelAction", actionName: "rollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }); }} > @@ -401,7 +401,7 @@ export const HomePage = (props: RootComponentProps) => { { actionType: "modelAction", actionName: "renameEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityName: entityBook.name, entityUuid: entityBook.uuid, @@ -458,7 +458,7 @@ export const HomePage = (props: RootComponentProps) => { { actionType: "modelAction", actionName: "dropEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityUuid: entityAuthor.uuid, entityDefinitionUuid: entityDefinitionAuthor.uuid, diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/ReportPage.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/ReportPage.tsx index c6115f8b..76d20d6a 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/ReportPage.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/ReportPage.tsx @@ -10,8 +10,8 @@ import { MetaModel, MiroirLoggerFactory, Report, - applicationDeploymentAdmin, - applicationDeploymentLibrary, + adminConfigurationDeploymentAdmin, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, getLoggerName, getReportsAndEntitiesDefinitionsForDeploymentUuid @@ -65,13 +65,13 @@ export const ReportPage = () => { // TODO: REMOVE HARD-CODED LIST!!! WHAT IS IT USEFUL FOR??? const deployments = [ applicationDeploymentMiroir, - applicationDeploymentLibrary, - applicationDeploymentAdmin, + adminConfigurationDeploymentLibrary, + adminConfigurationDeploymentAdmin, ] as ApplicationDeploymentConfiguration[]; const miroirMetaModel: MetaModel = useCurrentModel(applicationDeploymentMiroir.uuid); - const libraryAppModel: MetaModel = useCurrentModel(applicationDeploymentLibrary.uuid); - const adminAppModel: MetaModel = useCurrentModel(applicationDeploymentAdmin.uuid); + const libraryAppModel: MetaModel = useCurrentModel(adminConfigurationDeploymentLibrary.uuid); + const adminAppModel: MetaModel = useCurrentModel(adminConfigurationDeploymentAdmin.uuid); // log.info("ReportPage currentModel", currentModel); @@ -107,8 +107,8 @@ export const ReportPage = () => { const deploymentUuidToReportsEntitiesDefinitionsMapping = useMemo( () => ( { - [applicationDeploymentAdmin.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( - applicationDeploymentAdmin.uuid, + [adminConfigurationDeploymentAdmin.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( + adminConfigurationDeploymentAdmin.uuid, miroirMetaModel, adminAppModel, ), @@ -117,8 +117,8 @@ export const ReportPage = () => { miroirMetaModel, miroirMetaModel, ), - [applicationDeploymentLibrary.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( - applicationDeploymentLibrary.uuid, + [adminConfigurationDeploymentLibrary.uuid]: getReportsAndEntitiesDefinitionsForDeploymentUuid( + adminConfigurationDeploymentLibrary.uuid, miroirMetaModel, libraryAppModel, ), diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/Tools.tsx b/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/Tools.tsx index ee0e2d20..c03a8c58 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/Tools.tsx +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/routes/Tools.tsx @@ -10,7 +10,7 @@ import { MiroirConfigForRestClient, MiroirLoggerFactory, StoreUnitConfiguration, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, getLoggerName, resolveReferencesForJzodSchemaAndValueObject, @@ -75,7 +75,7 @@ const miroirConfig: MiroirConfigClient = { "schema": "miroir" } }, - [applicationDeploymentLibrary.uuid]: { + [adminConfigurationDeploymentLibrary.uuid]: { "admin": { "emulatedServerType": "sql", "connectionString":"postgres://postgres:postgres@localhost:5432/postgres", @@ -268,7 +268,7 @@ export const ToolsPage: React.FC = ( "schema": values.applicationName + "miroir" } }, - [applicationDeploymentLibrary.uuid]: { + [adminConfigurationDeploymentLibrary.uuid]: { "admin": { "emulatedServerType": "sql", "connectionString":"postgres://postgres:postgres@localhost:5432/postgres", @@ -307,12 +307,6 @@ export const ToolsPage: React.FC = ( actionName: "openStore", endpoint: "bbd08cbb-79ff-4539-b91f-7a14f15ac55f", configuration: (submitMiroirConfig.client as MiroirConfigForRestClient).serverConfig.storeSectionConfiguration, - // { - // [applicationDeploymentMiroir.uuid]: (submitMiroirConfig.client as MiroirConfigForRestClient).serverConfig - // .storeSectionConfiguration[applicationDeploymentMiroir.uuid] as StoreUnitConfiguration, - // [applicationDeploymentLibrary.uuid]: (submitMiroirConfig.client as MiroirConfigForRestClient).serverConfig - // .storeSectionConfiguration[applicationDeploymentLibrary.uuid] as StoreUnitConfiguration, - // }, deploymentUuid: applicationDeploymentMiroir.uuid, }); @@ -322,8 +316,8 @@ export const ToolsPage: React.FC = ( actionType: "storeManagementAction", actionName: "createStore", endpoint: "bbd08cbb-79ff-4539-b91f-7a14f15ac55f", - deploymentUuid: applicationDeploymentLibrary.uuid, - configuration: (submitMiroirConfig.client as MiroirConfigForRestClient).serverConfig.storeSectionConfiguration[applicationDeploymentLibrary.uuid] + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + configuration: (submitMiroirConfig.client as MiroirConfigForRestClient).serverConfig.storeSectionConfiguration[adminConfigurationDeploymentLibrary.uuid] } ) if (createdApplicationLibraryStore?.status != "ok") { diff --git a/packages/miroir-standalone-app/src/miroir-fwk/4_view/uploadBooksAndReports.ts b/packages/miroir-standalone-app/src/miroir-fwk/4_view/uploadBooksAndReports.ts index 290bb791..c533b35c 100644 --- a/packages/miroir-standalone-app/src/miroir-fwk/4_view/uploadBooksAndReports.ts +++ b/packages/miroir-standalone-app/src/miroir-fwk/4_view/uploadBooksAndReports.ts @@ -1,5 +1,5 @@ import { - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, MetaEntity, EntityDefinition, entityReport, @@ -53,7 +53,7 @@ export async function uploadBooksAndReports( { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { entity: entityAuthor as Entity, entityDefinition: entityDefinitionAuthor as EntityDefinition }, @@ -70,7 +70,7 @@ export async function uploadBooksAndReports( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, // { actionName: "commit", actionType: "modelAction", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", label: "Adding Author and Book entities" }, @@ -84,7 +84,7 @@ export async function uploadBooksAndReports( actionType: "instanceAction", actionName: "createInstance", applicationSection: "model", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", objects: [ { @@ -111,7 +111,7 @@ export async function uploadBooksAndReports( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, // { actionName: "commit", actionType: "modelAction", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", label: "Adding Author and Book entities" }, @@ -122,7 +122,7 @@ export async function uploadBooksAndReports( actionType: "instanceAction", actionName: "createInstance", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", objects: [ { diff --git a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.functions.tsx b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.functions.tsx index 5f16030b..a3a617de 100644 --- a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.functions.tsx +++ b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.functions.tsx @@ -5,7 +5,7 @@ import React from "react"; import { - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, author1, author2, @@ -80,7 +80,7 @@ export async function refreshAllInstancesTest( const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ {entity:entityAuthor as MetaEntity, entityDefinition:entityDefinitionAuthor as EntityDefinition}, @@ -90,15 +90,15 @@ export async function refreshAllInstancesTest( await act( async () => { - await domainController.handleAction(createAction, localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(createAction, localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); await domainController.handleAction( { actionType: "modelAction", actionName: "commit", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -108,7 +108,7 @@ export async function refreshAllInstancesTest( actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -155,7 +155,7 @@ export async function refreshAllInstancesTest( entityName={entityBook.name} entityUuid={entityBook.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} />, { store: localCache.getInnerStore() } ); @@ -172,7 +172,7 @@ export async function refreshAllInstancesTest( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); }); diff --git a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.test.tsx b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.test.tsx index a31a535d..bf563f48 100644 --- a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.test.tsx +++ b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Data.CRUD.test.tsx @@ -8,7 +8,7 @@ import { describe, expect } from 'vitest'; // import process from "process"; import { - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, author1, author2, @@ -186,7 +186,7 @@ describe.sequential('DomainController.Data.CRUD', const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ {entity:entityAuthor as MetaEntity, entityDefinition:entityDefinitionAuthor as EntityDefinition}, @@ -198,16 +198,16 @@ describe.sequential('DomainController.Data.CRUD', async () => { await domainController.handleAction( createAction, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -217,7 +217,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -258,7 +258,7 @@ describe.sequential('DomainController.Data.CRUD', , {store:localCache.getInnerStore()} @@ -277,7 +277,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -306,7 +306,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects:[{parentName:book3.parentName,parentUuid:book3.parentUuid,applicationSection:'data',instances:[book3 as EntityInstance]}] }; @@ -343,7 +343,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -399,7 +399,7 @@ describe.sequential('DomainController.Data.CRUD', const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ {entity:entityAuthor as MetaEntity, entityDefinition:entityDefinitionAuthor as EntityDefinition}, @@ -409,15 +409,15 @@ describe.sequential('DomainController.Data.CRUD', await act( async () => { - await domainController.handleAction(createAction, localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(createAction, localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -427,7 +427,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -468,7 +468,7 @@ describe.sequential('DomainController.Data.CRUD', // parentName="Book" entityUuid={entityBook.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} /> , {store:localCache.getInnerStore()} @@ -487,7 +487,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -516,7 +516,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "deleteInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects:[{parentName:book3.parentName,parentUuid:book3.parentUuid,applicationSection:'data', instances:[book3 as EntityInstance]}] }; @@ -552,7 +552,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -609,7 +609,7 @@ describe.sequential('DomainController.Data.CRUD', const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ {entity:entityAuthor as MetaEntity, entityDefinition:entityDefinitionAuthor as EntityDefinition}, @@ -619,15 +619,15 @@ describe.sequential('DomainController.Data.CRUD', await act( async () => { - await domainController.handleAction(createAction, localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(createAction, localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -637,7 +637,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -679,7 +679,7 @@ describe.sequential('DomainController.Data.CRUD', // parentName="Book" entityUuid={entityBook.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} /> , {store:localCache.getInnerStore()} @@ -692,7 +692,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -721,7 +721,7 @@ describe.sequential('DomainController.Data.CRUD', actionName: "updateInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: book4.parentName, @@ -761,7 +761,7 @@ describe.sequential('DomainController.Data.CRUD', await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } diff --git a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.CRUD.test.tsx b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.CRUD.test.tsx index 539bcc02..2572c0b2 100644 --- a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.CRUD.test.tsx +++ b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.CRUD.test.tsx @@ -17,7 +17,7 @@ import { MiroirConfigClient, MiroirContext, MiroirLoggerFactory, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, author1, author2, @@ -169,7 +169,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -219,7 +219,7 @@ describe.sequential( entityName={entityEntity.name} entityUuid={entityEntity.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore(),} @@ -238,7 +238,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -262,7 +262,7 @@ describe.sequential( const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -276,7 +276,7 @@ describe.sequential( async () => { await domainController.handleAction( createAction, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -313,7 +313,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -359,7 +359,7 @@ describe.sequential( entityName={entityEntity.name} entityUuid={entityEntity.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore(),} @@ -378,7 +378,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -405,7 +405,7 @@ describe.sequential( const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -417,7 +417,7 @@ describe.sequential( await act( async () => { - await domainController.handleAction(createAction,localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(createAction,localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); } ); @@ -449,17 +449,17 @@ describe.sequential( // ########################################################################################################## console.log('add Entity step 3: committing Author Entity to remote store, Author Entity must be present in the Entity list afterwards.') - // log.info('localCache.currentModel(applicationDeploymentLibrary.uuid)',localCache.currentModel(applicationDeploymentLibrary.uuid)) + // log.info('localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)',localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)) await act( async () => { await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -488,10 +488,10 @@ describe.sequential( { actionType: "modelAction", actionName: "rollback", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -538,7 +538,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -547,7 +547,7 @@ describe.sequential( const createAction: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -562,7 +562,7 @@ describe.sequential( async () => { await domainController.handleAction( createAction, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -574,10 +574,10 @@ describe.sequential( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -592,7 +592,7 @@ describe.sequential( entityName={entityEntity.name} entityUuid={entityEntity.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore()} @@ -609,7 +609,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -635,13 +635,13 @@ describe.sequential( { actionType: "modelAction", actionName: "dropEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", // entityName: entityAuthor.name, entityUuid: entityAuthor.uuid, entityDefinitionUuid: entityDefinitionAuthor.uuid, }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); console.log("remove Author entity step 2: removing Author entity from local store DONE") } @@ -671,10 +671,10 @@ describe.sequential( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); console.log("remove Author entity step 3: commit to remote store DONE") } @@ -698,7 +698,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -748,7 +748,7 @@ describe.sequential( const createActionAuthor: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -760,7 +760,7 @@ describe.sequential( const createActionBook: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -774,20 +774,20 @@ describe.sequential( async () => { await domainController.handleAction( createActionAuthor, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( createActionBook, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -797,7 +797,7 @@ describe.sequential( actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -838,7 +838,7 @@ describe.sequential( entityName={entityEntity.name} entityUuid={entityEntity.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore(),} @@ -857,7 +857,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -882,7 +882,7 @@ describe.sequential( { actionType:"modelAction", actionName: "renameEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityName: entityAuthor.name, entityUuid: entityAuthor.uuid, @@ -892,7 +892,7 @@ describe.sequential( ; await act( async () => { - await domainController.handleAction(updateAction, localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(updateAction, localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); } ); @@ -928,10 +928,10 @@ describe.sequential( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -955,7 +955,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -1007,7 +1007,7 @@ describe.sequential( const createActionAuthor: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -1019,7 +1019,7 @@ describe.sequential( const createActionBook: DomainAction = { actionType: "modelAction", actionName: "createEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entities: [ { @@ -1033,20 +1033,20 @@ describe.sequential( async () => { await domainController.handleAction( createActionAuthor, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( createActionBook, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -1056,7 +1056,7 @@ describe.sequential( actionName: "createInstance", endpoint: "ed520de4-55a9-4550-ac50-b1b713b72a89", applicationSection: "data", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, objects: [ { parentName: entityAuthor.name, @@ -1097,7 +1097,7 @@ describe.sequential( entityName={entityEntityDefinition.name} entityUuid={entityEntityDefinition.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore(),} @@ -1110,13 +1110,13 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } @@ -1145,7 +1145,7 @@ describe.sequential( { actionType:"modelAction", actionName: "alterEntityAttribute", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityName: entityAuthor.name, entityUuid: entityAuthor.uuid, @@ -1161,7 +1161,7 @@ describe.sequential( ; await act( async () => { - await domainController.handleAction(updateAction, localCache.currentModel(applicationDeploymentLibrary.uuid)); + await domainController.handleAction(updateAction, localCache.currentModel(adminConfigurationDeploymentLibrary.uuid)); } ); @@ -1197,10 +1197,10 @@ describe.sequential( { actionName: "commit", actionType: "modelAction", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -1224,7 +1224,7 @@ describe.sequential( await domainController.handleAction({ actionType: "modelAction", actionName: "rollback", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", }); } diff --git a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.undo-redo.test.tsx b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.undo-redo.test.tsx index 2d1d7438..fa7f9538 100644 --- a/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.undo-redo.test.tsx +++ b/packages/miroir-standalone-app/tests/3_controllers/DomainController.Model.undo-redo.test.tsx @@ -14,7 +14,7 @@ import { MiroirContext, MiroirLoggerFactory, PersistenceStoreControllerInterface, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, defaultLevels, entityAuthor, @@ -156,7 +156,7 @@ describe.sequential( entityName={entityEntity.name} entityUuid={entityEntity.uuid} DisplayLoadingInfo={displayLoadingInfo} - deploymentUuid={applicationDeploymentLibrary.uuid} + deploymentUuid={adminConfigurationDeploymentLibrary.uuid} instancesApplicationSection="model" />, {store:localCache.getInnerStore(),} @@ -176,7 +176,7 @@ describe.sequential( actionType: "modelAction", actionName: "rollback", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, }); } ); @@ -201,7 +201,7 @@ describe.sequential( actionType: "modelAction", actionName: "createEntity", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, entities: [ { entity: entityAuthor as Entity, @@ -213,7 +213,7 @@ describe.sequential( actionType: "modelAction", actionName: "createEntity", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, entities: [ { entity: entityBook as Entity, @@ -226,11 +226,11 @@ describe.sequential( async () => { await domainController.handleAction( createAuthorAction, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); await domainController.handleAction( createBookAction, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); @@ -268,7 +268,7 @@ describe.sequential( actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -302,7 +302,7 @@ describe.sequential( actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -340,19 +340,19 @@ describe.sequential( actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); await domainController.handleAction({ actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); await domainController.handleAction({ actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -381,7 +381,7 @@ describe.sequential( actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -394,25 +394,25 @@ describe.sequential( actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); await domainController.handleAction({ actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); await domainController.handleAction({ actionType: "undoRedoAction", actionName: "undo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); await domainController.handleAction({ actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -441,7 +441,7 @@ describe.sequential( actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -454,7 +454,7 @@ describe.sequential( actionType: "undoRedoAction", actionName: "redo", endpoint: "71c04f8e-c687-4ea7-9a19-bc98d796c389", - deploymentUuid:applicationDeploymentLibrary.uuid + deploymentUuid:adminConfigurationDeploymentLibrary.uuid }); } ); @@ -480,9 +480,9 @@ describe.sequential( actionName: "commit", actionType: "modelAction", endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, }, - localCache.currentModel(applicationDeploymentLibrary.uuid) + localCache.currentModel(adminConfigurationDeploymentLibrary.uuid) ); } ); diff --git a/packages/miroir-standalone-app/tests/4_storage/LocalStoreController.unit.test.tsx b/packages/miroir-standalone-app/tests/4_storage/LocalStoreController.unit.test.tsx index 09fa699f..07113d6c 100644 --- a/packages/miroir-standalone-app/tests/4_storage/LocalStoreController.unit.test.tsx +++ b/packages/miroir-standalone-app/tests/4_storage/LocalStoreController.unit.test.tsx @@ -18,7 +18,7 @@ import { ModelActionRenameEntity, PersistenceStoreControllerInterface, PersistenceStoreControllerManagerInterface, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, applicationLibrary, applicationMiroir, @@ -174,30 +174,15 @@ function ignorePostgresExtraAttributes(instances: EntityInstance[]){ describe.sequential("localPersistenceStoreController.unit.test", () => { - // // ################################################################################################ - // // it( - // // "Delete miroir2 store or remove existing store", async () => { // TODO: test failure cases! - // // if (miroirConfig.client.emulateServer) { - // // const testResult: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client[applicationDeploymentMiroir.uuid].model) - // // const testResult2: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client[applicationDeploymentMiroir.uuid].data) - // // expect(testResult).toEqual(ACTION_OK) - // // expect(testResult2).toEqual(ACTION_OK) - // // } else { - // // expect(false, "could not test store creation, configuration can not specify to use a real server, only emulated server makes sense in this case") - // // } - // // } - // // ); - // ################################################################################################ - it( - "Create miroir2 store", async () => { // TODO: test failure cases! + it("Create miroir2 store", async () => { // TODO: test failure cases! if (miroirConfig.client.emulateServer) { console.log("Create miroir2 store START") - const testResult: ActionReturnType = await localMiroirPersistenceStoreController.createStore(miroirConfig.client[applicationDeploymentMiroir.uuid].model) - const testResult2: ActionReturnType = await localMiroirPersistenceStoreController.createStore(miroirConfig.client[applicationDeploymentMiroir.uuid].data) + const testResult: ActionReturnType = await localMiroirPersistenceStoreController.createStore(miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].model) + const testResult2: ActionReturnType = await localMiroirPersistenceStoreController.createStore(miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].data) //cleanup - const testResult3: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client[applicationDeploymentMiroir.uuid].model) - const testResult4: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client[applicationDeploymentMiroir.uuid].data) + const testResult3: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].model) + const testResult4: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore(miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].data) // test expect(testResult).toEqual(ACTION_OK) expect(testResult2).toEqual(ACTION_OK) @@ -220,7 +205,7 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { const deployMiroir = await persistenceStoreControllerManager.deployModule( localMiroirPersistenceStoreController, newMiroirDeploymentUuid, - miroirConfig.client[applicationDeploymentMiroir.uuid], + miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid], { metaModel: defaultMiroirMetaModel, dataStoreType: 'miroir', @@ -234,12 +219,12 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { const deployApp = await persistenceStoreControllerManager.deployModule( localMiroirPersistenceStoreController, newLibraryDeploymentUuid, - miroirConfig.client[applicationDeploymentLibrary.uuid], + miroirConfig.client.deploymentStorageConfig[adminConfigurationDeploymentLibrary.uuid], { metaModel: defaultMiroirMetaModel, dataStoreType: 'app', application: applicationLibrary, - applicationDeploymentConfiguration: applicationDeploymentLibrary, + applicationDeploymentConfiguration: adminConfigurationDeploymentLibrary, applicationModelBranch: applicationModelBranchLibraryMasterBranch, applicationVersion: applicationVersionLibraryInitialVersion, applicationStoreBasedConfiguration: applicationStoreBasedConfigurationLibrary, @@ -352,7 +337,7 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { const modelActionRenameEntity:ModelActionRenameEntity = { actionType: "modelAction", actionName: "renameEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityUuid: entityAuthor.uuid, entityName: entityAuthor.name, @@ -437,7 +422,7 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { const modelActionDropEntity:ModelActionDropEntity = { actionType: "modelAction", actionName: "dropEntity", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityUuid: entityAuthor.uuid, // entityName: entityAuthor.name, @@ -503,7 +488,6 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { }); // ################################################################################################ - // TODO it("alter Author Entity: alter Author Entity attribute", async () => { // setup @@ -517,7 +501,7 @@ describe.sequential("localPersistenceStoreController.unit.test", () => { const modelActionAlterAttribute:ModelAction = { actionType: "modelAction", actionName: "alterEntityAttribute", - deploymentUuid:applicationDeploymentLibrary.uuid, + deploymentUuid:adminConfigurationDeploymentLibrary.uuid, endpoint: "7947ae40-eb34-4149-887b-15a9021e714e", entityUuid: entityAuthor.uuid, entityDefinitionUuid: entityDefinitionAuthor.uuid, diff --git a/packages/miroir-standalone-app/tests/4_view/JzodObjectFormEditor.integ.DEACTIVATED.tsx b/packages/miroir-standalone-app/tests/4_view/JzodObjectFormEditor.integ.DEACTIVATED.tsx index db458b96..79421bf9 100644 --- a/packages/miroir-standalone-app/tests/4_view/JzodObjectFormEditor.integ.DEACTIVATED.tsx +++ b/packages/miroir-standalone-app/tests/4_view/JzodObjectFormEditor.integ.DEACTIVATED.tsx @@ -281,7 +281,7 @@ // // label={label} // // initialValuesObject={""} // // showButton={true} -// // currentDeploymentUuid={applicationDeploymentLibrary.uuid} +// // currentDeploymentUuid={adminConfigurationDeploymentLibrary.uuid} // // currentApplicationSection="data" // // elementJzodSchema={{type:"simpleType", definition:"uuid", extra:{targetEntity:entityAuthor.uuid}}} // // rootJzodSchema={{} as JzodObject} diff --git a/packages/miroir-standalone-app/tests/utils/tests-utils.tsx b/packages/miroir-standalone-app/tests/utils/tests-utils.tsx index 9c087c4f..4204f5a5 100644 --- a/packages/miroir-standalone-app/tests/utils/tests-utils.tsx +++ b/packages/miroir-standalone-app/tests/utils/tests-utils.tsx @@ -25,7 +25,7 @@ import { PersistenceStoreControllerInterface, PersistenceStoreControllerManager, StoreUnitConfiguration, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationDeploymentMiroir, applicationLibrary, applicationMiroir, @@ -206,8 +206,8 @@ export async function miroirBeforeAll( actionType: "storeManagementAction", actionName: "createStore", endpoint: "bbd08cbb-79ff-4539-b91f-7a14f15ac55f", - deploymentUuid: applicationDeploymentLibrary.uuid, - configuration: miroirConfig.client.serverConfig.storeSectionConfiguration[applicationDeploymentLibrary.uuid] + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + configuration: miroirConfig.client.serverConfig.storeSectionConfiguration[adminConfigurationDeploymentLibrary.uuid] } ) if (createdApplicationLibraryStore?.status != "ok") { @@ -283,7 +283,7 @@ export async function miroirBeforeAll( ); } const localMiroirPersistenceStoreController = persistenceStoreControllerManager.getPersistenceStoreController(applicationDeploymentMiroir.uuid); - const localAppPersistenceStoreController = persistenceStoreControllerManager.getPersistenceStoreController(applicationDeploymentLibrary.uuid); + const localAppPersistenceStoreController = persistenceStoreControllerManager.getPersistenceStoreController(adminConfigurationDeploymentLibrary.uuid); if (!localMiroirPersistenceStoreController || !localAppPersistenceStoreController) { throw new Error("could not find controller:" + localMiroirPersistenceStoreController + " " + localAppPersistenceStoreController); @@ -337,10 +337,10 @@ export async function miroirBeforeEach( miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].data ); const libraryModelStoreCreated: ActionReturnType = await localMiroirPersistenceStoreController.createStore( - miroirConfig.client.deploymentStorageConfig[applicationDeploymentLibrary.uuid].model + miroirConfig.client.deploymentStorageConfig[adminConfigurationDeploymentLibrary.uuid].model ); const libraryDataStoreCreated: ActionReturnType = await localMiroirPersistenceStoreController.createStore( - miroirConfig.client.deploymentStorageConfig[applicationDeploymentLibrary.uuid].data + miroirConfig.client.deploymentStorageConfig[adminConfigurationDeploymentLibrary.uuid].data ); if ( miroirModelStoreCreated.status != "ok" || @@ -390,7 +390,7 @@ export async function miroirBeforeEach( defaultMiroirMetaModel, 'app', applicationLibrary, - applicationDeploymentLibrary, + adminConfigurationDeploymentLibrary, applicationModelBranchLibraryMasterBranch, applicationVersionLibraryInitialVersion, applicationStoreBasedConfigurationLibrary, @@ -438,10 +438,10 @@ export async function miroirAfterEach( miroirConfig.client.deploymentStorageConfig[applicationDeploymentMiroir.uuid].data ); const libraryModelStoreCreated: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore( - miroirConfig.client.deploymentStorageConfig[applicationDeploymentLibrary.uuid].model + miroirConfig.client.deploymentStorageConfig[adminConfigurationDeploymentLibrary.uuid].model ); const libraryDataStoreCreated: ActionReturnType = await localMiroirPersistenceStoreController.deleteStore( - miroirConfig.client.deploymentStorageConfig[applicationDeploymentLibrary.uuid].data + miroirConfig.client.deploymentStorageConfig[adminConfigurationDeploymentLibrary.uuid].data ); } catch (error) { console.error('Error afterEach',error); @@ -470,8 +470,8 @@ export async function miroirAfterAll( actionType: "storeManagementAction", actionName: "deleteStore", endpoint: "bbd08cbb-79ff-4539-b91f-7a14f15ac55f", - deploymentUuid: applicationDeploymentLibrary.uuid, - configuration: miroirConfig.client.serverConfig.storeSectionConfiguration[applicationDeploymentLibrary.uuid] + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, + configuration: miroirConfig.client.serverConfig.storeSectionConfiguration[adminConfigurationDeploymentLibrary.uuid] } ) if (deletedApplicationLibraryStore?.status != "ok") { @@ -496,7 +496,7 @@ export async function miroirAfterAll( actionType: "storeManagementAction", actionName: "closeStore", endpoint: "bbd08cbb-79ff-4539-b91f-7a14f15ac55f", - deploymentUuid: applicationDeploymentLibrary.uuid, + deploymentUuid: adminConfigurationDeploymentLibrary.uuid, }) await remoteStore.handlePersistenceAction({ actionType: "storeManagementAction",