From 594f9d3e9ac9a5f26e8b262813b5d3de6d04de79 Mon Sep 17 00:00:00 2001 From: Shefali Joshi Date: Wed, 23 Mar 2022 14:53:39 -0700 Subject: [PATCH] 2.0.1 release merged into master (#4971) * Correctly use creatable attribute and persistability when working with domainObjects (#4898) (#4936) * making move action location check persistability * adding persistence check instead of creatability for styles * added check for link action to make sure parent is persistable * debug * adding parent to link action and move action form location controls so they can be used in the form * adding parent persistability check for duplicate * updating multilple actions appliesTo methods to check for persistability * updated the tree to not require an initial selection if being used in a form * remove noneditable folder plugin * added persistence check for the parent, in the create wizard * minor name change * removing noneditabl folder from default plugins as well * checking the correct parent for persistability in create wizard * importing file-saver correctly * updated tests for import as json * changes addressing PR review: using consts, removing comments, removing unneccessary code Co-authored-by: Scott Bell Co-authored-by: Jamie V Co-authored-by: Scott Bell * Fix display layout items getting cut off on the bottom (like plots) (#4903) * Fix display layout items getting cut off on the bottom (like plots) Also fix Vue warnings * Add partial e2e test for this bug fix. WIP. * Address review comments Co-authored-by: John Hill * Link action fix (#4945) * handling edge case for linking a root item * added location to viper plans (couch search folder) set to ROOT, added a check to remove action for alias (so you can remove linked nonpersistable items) * added check for no parent in remove action (which means it is a root item) * updating test * Update time conductor inputs realtime (#4877) * Update time conductor inputs realtime * Update moveObjects.e2e.spec.js * Update importAsJson.e2e.spec.js * Update default.spec.js Co-authored-by: Jamie V Co-authored-by: Scott Bell Co-authored-by: John Hill --- e2e/tests/moveObjects.e2e.spec.js | 84 ++++++++--------- .../ImportAsJSON/importAsJson.e2e.spec.js | 92 +++++++++---------- e2e/tests/visual/default.spec.js | 6 +- package.json | 2 +- src/plugins/CouchDBSearchFolder/plugin.js | 3 +- src/plugins/CouchDBSearchFolder/pluginSpec.js | 3 +- .../components/DisplayLayout.vue | 2 +- .../components/flexibleLayout.vue | 8 +- src/plugins/linkAction/LinkAction.js | 11 +++ src/plugins/remove/RemoveAction.js | 34 ++++--- src/plugins/timeConductor/Conductor.vue | 2 + .../timeConductor/ConductorInputsFixed.vue | 12 +++ .../timeConductor/ConductorInputsRealtime.vue | 16 +++- src/ui/components/object-frame.scss | 3 + 14 files changed, 165 insertions(+), 113 deletions(-) diff --git a/e2e/tests/moveObjects.e2e.spec.js b/e2e/tests/moveObjects.e2e.spec.js index 26ffdcdff2..cd475bb677 100644 --- a/e2e/tests/moveObjects.e2e.spec.js +++ b/e2e/tests/moveObjects.e2e.spec.js @@ -1,42 +1,42 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2022, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -/* -This test suite is dedicated to tests which verify the basic operations surrounding moving objects. -*/ - -const { test, expect } = require('@playwright/test'); - -test.describe('Move item tests', () => { - test.fixme('Create a basic object and verify that it can be moved to another Folder', async ({ page }) => { - //Create and save Folder - //Create and save Domain Object - //Verify that the newly created domain object can be moved to Folder from Step 1. - //Verify that newly moved object appears in the correct point in Tree - //Verify that newly moved object appears correctly in Inspector panel - }); - test.fixme('Create a basic object and verify that it cannot be moved to object without Composition Provider', async ({ page }) => { - //Create and save Telemetry Object - //Create and save Domain Object - //Verify that the newly created domain object cannot be moved to Telemetry Object from step 1. - }); -}); +/***************************************************************************** + * Open MCT, Copyright (c) 2014-2022, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + +/* +This test suite is dedicated to tests which verify the basic operations surrounding moving objects. +*/ + +const { test, expect } = require('@playwright/test'); + +test.describe('Move item tests', () => { + test.fixme('Create a basic object and verify that it can be moved to another Folder', async ({ page }) => { + //Create and save Folder + //Create and save Domain Object + //Verify that the newly created domain object can be moved to Folder from Step 1. + //Verify that newly moved object appears in the correct point in Tree + //Verify that newly moved object appears correctly in Inspector panel + }); + test.fixme('Create a basic object and verify that it cannot be moved to object without Composition Provider', async ({ page }) => { + //Create and save Telemetry Object + //Create and save Domain Object + //Verify that the newly created domain object cannot be moved to Telemetry Object from step 1. + }); +}); diff --git a/e2e/tests/plugins/ImportAsJSON/importAsJson.e2e.spec.js b/e2e/tests/plugins/ImportAsJSON/importAsJson.e2e.spec.js index 7c8d0ab649..29516c2b0a 100644 --- a/e2e/tests/plugins/ImportAsJSON/importAsJson.e2e.spec.js +++ b/e2e/tests/plugins/ImportAsJSON/importAsJson.e2e.spec.js @@ -1,46 +1,46 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2022, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -/* -This test suite is dedicated to tests which verify the basic operations surrounding importAsJSON. -*/ - -const { test, expect } = require('@playwright/test'); - -test.describe('ExportAsJSON', () => { - test.fixme('Verify that domain object can be importAsJSON from Tree', async ({ page }) => { - //Verify that an testdata JSON file can be imported from Tree - //Verify correctness of imported domain object - }); - test.fixme('Verify that domain object can be importAsJSON from 3 dot menu on folder', async ({ page }) => { - //Verify that an testdata JSON file can be imported from 3 dot menu on folder domain object - //Verify correctness of imported domain object - }); - test.fixme('Verify that a nested Objects can be importAsJSON', async ({ page }) => { - // Testdata with hierarchy - // ImportAsJSON on Tree - // Verify Hierarchy - }); - test.fixme('Verify that the ImportAsJSON dropdown does not appear for the item X', async ({ page }) => { - // Other than non-persistible objects - }); -}); +/***************************************************************************** + * Open MCT, Copyright (c) 2014-2022, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ + +/* +This test suite is dedicated to tests which verify the basic operations surrounding importAsJSON. +*/ + +const { test, expect } = require('@playwright/test'); + +test.describe('ExportAsJSON', () => { + test.fixme('Verify that domain object can be importAsJSON from Tree', async ({ page }) => { + //Verify that an testdata JSON file can be imported from Tree + //Verify correctness of imported domain object + }); + test.fixme('Verify that domain object can be importAsJSON from 3 dot menu on folder', async ({ page }) => { + //Verify that an testdata JSON file can be imported from 3 dot menu on folder domain object + //Verify correctness of imported domain object + }); + test.fixme('Verify that a nested Objects can be importAsJSON', async ({ page }) => { + // Testdata with hierarchy + // ImportAsJSON on Tree + // Verify Hierarchy + }); + test.fixme('Verify that the ImportAsJSON dropdown does not appear for the item X', async ({ page }) => { + // Other than non-persistible objects + }); +}); diff --git a/e2e/tests/visual/default.spec.js b/e2e/tests/visual/default.spec.js index 2ad857f92d..7a870c4128 100644 --- a/e2e/tests/visual/default.spec.js +++ b/e2e/tests/visual/default.spec.js @@ -22,14 +22,14 @@ /* Collection of Visual Tests set to run in a default context. The tests within this suite -are only meant to run against openmct's app.js started by `npm run start` within the +are only meant to run against openmct's app.js started by `npm run start` within the `./e2e/playwright-visual.config.js` file. -These should only use functional expect statements to verify assumptions about the state +These should only use functional expect statements to verify assumptions about the state in a test and not for functional verification of correctness. Visual tests are not supposed to "fail" on assertions. Instead, they should be used to detect changes between builds or branches. -Note: Larger testsuite sizes are OK due to the setup time associated with these tests. +Note: Larger testsuite sizes are OK due to the setup time associated with these tests. */ const { test, expect } = require('@playwright/test'); diff --git a/package.json b/package.json index 7e42663545..dbdcae9b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openmct", - "version": "2.0.1-SNAPSHOT", + "version": "2.0.1", "description": "The Open MCT core platform", "devDependencies": { "@babel/eslint-parser": "7.16.3", diff --git a/src/plugins/CouchDBSearchFolder/plugin.js b/src/plugins/CouchDBSearchFolder/plugin.js index 02aed49d9f..7aee308293 100644 --- a/src/plugins/CouchDBSearchFolder/plugin.js +++ b/src/plugins/CouchDBSearchFolder/plugin.js @@ -15,7 +15,8 @@ export default function (folderName, couchPlugin, searchFilter) { return Promise.resolve({ identifier, type: 'folder', - name: folderName || "CouchDB Documents" + name: folderName || "CouchDB Documents", + location: 'ROOT' }); } } diff --git a/src/plugins/CouchDBSearchFolder/pluginSpec.js b/src/plugins/CouchDBSearchFolder/pluginSpec.js index 0bc13941cf..3eb23d9cc0 100644 --- a/src/plugins/CouchDBSearchFolder/pluginSpec.js +++ b/src/plugins/CouchDBSearchFolder/pluginSpec.js @@ -85,7 +85,8 @@ describe('the plugin', function () { expect(object).toEqual({ identifier, type: 'folder', - name: "CouchDB Documents" + name: 'CouchDB Documents', + location: 'ROOT' }); }); }); diff --git a/src/plugins/displayLayout/components/DisplayLayout.vue b/src/plugins/displayLayout/components/DisplayLayout.vue index b9fdd40c73..d260af3dc6 100644 --- a/src/plugins/displayLayout/components/DisplayLayout.vue +++ b/src/plugins/displayLayout/components/DisplayLayout.vue @@ -166,7 +166,7 @@ export default { }, computed: { gridSize() { - return this.domainObject.configuration.layoutGrid; + return this.domainObject.configuration.layoutGrid.map(Number); }, layoutItems() { return this.domainObject.configuration.items; diff --git a/src/plugins/flexibleLayout/components/flexibleLayout.vue b/src/plugins/flexibleLayout/components/flexibleLayout.vue index b96df58ba8..503db9a1fc 100644 --- a/src/plugins/flexibleLayout/components/flexibleLayout.vue +++ b/src/plugins/flexibleLayout/components/flexibleLayout.vue @@ -43,7 +43,7 @@