From 76889cf60d2420723248b557d3f98017a21f4ce4 Mon Sep 17 00:00:00 2001
From: David Tsay <3614296+davetsay@users.noreply.github.com>
Date: Thu, 12 Oct 2023 13:48:13 -0700
Subject: [PATCH] Rename all configuration inspector tabs to `Config` (#7140)

---
 .../plugins/faultManagement/faultManagement.e2e.spec.js     | 4 ++--
 .../charts/bar/inspector/BarGraphInspectorViewProvider.js   | 2 +-
 src/plugins/charts/bar/pluginSpec.js                        | 6 ++----
 .../faultManagement/FaultManagementInspectorViewProvider.js | 2 +-
 src/plugins/faultManagement/pluginSpec.js                   | 3 ++-
 src/plugins/plot/pluginSpec.js                              | 2 +-
 .../telemetryTable/TableConfigurationViewProvider.js        | 2 +-
 7 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/e2e/tests/functional/plugins/faultManagement/faultManagement.e2e.spec.js b/e2e/tests/functional/plugins/faultManagement/faultManagement.e2e.spec.js
index de5e196d57..fb08968f47 100644
--- a/e2e/tests/functional/plugins/faultManagement/faultManagement.e2e.spec.js
+++ b/e2e/tests/functional/plugins/faultManagement/faultManagement.e2e.spec.js
@@ -40,7 +40,7 @@ test.describe('The Fault Management Plugin using example faults', () => {
   }) => {
     await utils.selectFaultItem(page, 1);
 
-    await page.getByRole('tab', { name: 'Fault Management Configuration' }).click();
+    await page.getByRole('tab', { name: 'Config' }).click();
     const selectedFaultName = await page
       .locator('.c-fault-mgmt__list.is-selected .c-fault-mgmt__list-faultname')
       .textContent();
@@ -65,7 +65,7 @@ test.describe('The Fault Management Plugin using example faults', () => {
     );
     expect.soft(await selectedRows.count()).toEqual(2);
 
-    await page.getByRole('tab', { name: 'Fault Management Configuration' }).click();
+    await page.getByRole('tab', { name: 'Config' }).click();
     const firstSelectedFaultName = await selectedRows.nth(0).textContent();
     const secondSelectedFaultName = await selectedRows.nth(1).textContent();
     const firstNameInInspectorCount = await page
diff --git a/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js b/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js
index 7d36c7e6d3..db51ba692d 100644
--- a/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js
+++ b/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js
@@ -6,7 +6,7 @@ import BarGraphOptions from './BarGraphOptions.vue';
 export default function BarGraphInspectorViewProvider(openmct) {
   return {
     key: BAR_GRAPH_INSPECTOR_KEY,
-    name: 'Bar Graph Configuration',
+    name: 'Config',
     canView: function (selection) {
       if (selection.length === 0 || selection[0].length === 0) {
         return false;
diff --git a/src/plugins/charts/bar/pluginSpec.js b/src/plugins/charts/bar/pluginSpec.js
index 5de463c1ae..00ba69319c 100644
--- a/src/plugins/charts/bar/pluginSpec.js
+++ b/src/plugins/charts/bar/pluginSpec.js
@@ -25,7 +25,7 @@ import EventEmitter from 'EventEmitter';
 import { createOpenMct, resetApplicationState } from 'utils/testing';
 import Vue from 'vue';
 
-import { BAR_GRAPH_KEY, BAR_GRAPH_VIEW } from './BarGraphConstants';
+import { BAR_GRAPH_INSPECTOR_KEY, BAR_GRAPH_KEY, BAR_GRAPH_VIEW } from './BarGraphConstants';
 import BarGraphPlugin from './plugin';
 
 describe('the plugin', function () {
@@ -578,9 +578,7 @@ describe('the plugin', function () {
       child.append(viewContainer);
 
       const applicableViews = openmct.inspectorViews.get(selection);
-      plotInspectorView = applicableViews.filter(
-        (view) => view.name === 'Bar Graph Configuration'
-      )[0];
+      plotInspectorView = applicableViews.filter((view) => view.key === BAR_GRAPH_INSPECTOR_KEY)[0];
       plotInspectorView.show(viewContainer);
 
       await Vue.nextTick();
diff --git a/src/plugins/faultManagement/FaultManagementInspectorViewProvider.js b/src/plugins/faultManagement/FaultManagementInspectorViewProvider.js
index 8aafb2f067..09a6945f28 100644
--- a/src/plugins/faultManagement/FaultManagementInspectorViewProvider.js
+++ b/src/plugins/faultManagement/FaultManagementInspectorViewProvider.js
@@ -29,7 +29,7 @@ export default function FaultManagementInspectorViewProvider(openmct) {
   return {
     openmct: openmct,
     key: FAULT_MANAGEMENT_INSPECTOR,
-    name: 'Fault Management Configuration',
+    name: 'Config',
     canView: (selection) => {
       if (selection.length !== 1 || selection[0].length === 0) {
         return false;
diff --git a/src/plugins/faultManagement/pluginSpec.js b/src/plugins/faultManagement/pluginSpec.js
index ce07956580..9ce0518626 100644
--- a/src/plugins/faultManagement/pluginSpec.js
+++ b/src/plugins/faultManagement/pluginSpec.js
@@ -22,6 +22,7 @@
 
 import { createOpenMct, resetApplicationState } from '../../utils/testing';
 import {
+  FAULT_MANAGEMENT_INSPECTOR,
   FAULT_MANAGEMENT_NAMESPACE,
   FAULT_MANAGEMENT_TYPE,
   FAULT_MANAGEMENT_VIEW
@@ -86,7 +87,7 @@ describe('The Fault Management Plugin', () => {
       ];
       const applicableInspectorViews = openmct.inspectorViews.get(faultDomainObjectSelection);
       const faultManagementInspectorView = applicableInspectorViews.filter(
-        (view) => view.name === 'Fault Management Configuration'
+        (view) => view.key === FAULT_MANAGEMENT_INSPECTOR
       );
 
       expect(faultManagementInspectorView.length).toEqual(1);
diff --git a/src/plugins/plot/pluginSpec.js b/src/plugins/plot/pluginSpec.js
index 868f4ff281..b876e9d1fe 100644
--- a/src/plugins/plot/pluginSpec.js
+++ b/src/plugins/plot/pluginSpec.js
@@ -296,7 +296,7 @@ describe('the plugin', function () {
       ];
       const applicableInspectorViews = openmct.inspectorViews.get(selection);
       const plotInspectorView = applicableInspectorViews.find(
-        (view) => (view.name = 'Plots Configuration')
+        (view) => view.key === 'plots-inspector'
       );
 
       expect(plotInspectorView).toBeDefined();
diff --git a/src/plugins/telemetryTable/TableConfigurationViewProvider.js b/src/plugins/telemetryTable/TableConfigurationViewProvider.js
index 945b3f6b6a..f0b86d909e 100644
--- a/src/plugins/telemetryTable/TableConfigurationViewProvider.js
+++ b/src/plugins/telemetryTable/TableConfigurationViewProvider.js
@@ -28,7 +28,7 @@ import TelemetryTableConfiguration from './TelemetryTableConfiguration';
 export default function TableConfigurationViewProvider(openmct) {
   return {
     key: 'table-configuration',
-    name: 'Configuration',
+    name: 'Config',
     canView: function (selection) {
       if (selection.length !== 1 || selection[0].length === 0) {
         return false;