Browse Source

ref(ui): Use QuestionTooltip in integrationExternalMappings (#54130)

For some reason this was a Button with a Tooltip
Evan Purkhiser 1 year ago
parent
commit
0e213b8702

+ 2 - 2
static/app/views/settings/organizationIntegrations/integrationExternalMappings.spec.tsx

@@ -114,7 +114,7 @@ describe('IntegrationExternalMappings', function () {
     for (const user of MOCK_USER_SUGGESTIONS) {
       expect(screen.getByText(user)).toBeInTheDocument();
     }
-    expect(screen.getAllByTestId('suggestion-option')).toHaveLength(3);
+    expect(screen.getAllByTestId('more-information')).toHaveLength(3);
   });
 
   it('renders suggestions along with the provided mappings', async function () {
@@ -147,7 +147,7 @@ describe('IntegrationExternalMappings', function () {
       expect(screen.getByText(team.externalName)).toBeInTheDocument();
       expect(screen.getByText(team.sentryName)).toBeInTheDocument();
     }
-    expect(screen.getAllByTestId('suggestion-option')).toHaveLength(3);
+    expect(screen.getAllByTestId('more-information')).toHaveLength(3);
   });
 
   it('uses the methods passed down from props appropriately', async function () {

+ 5 - 16
static/app/views/settings/organizationIntegrations/integrationExternalMappings.tsx

@@ -8,8 +8,8 @@ import Confirm from 'sentry/components/confirm';
 import DeprecatedAsyncComponent from 'sentry/components/deprecatedAsyncComponent';
 import Pagination from 'sentry/components/pagination';
 import PanelTable from 'sentry/components/panels/panelTable';
-import {Tooltip} from 'sentry/components/tooltip';
-import {IconAdd, IconArrow, IconDelete, IconQuestion} from 'sentry/icons';
+import QuestionTooltip from 'sentry/components/questionTooltip';
+import {IconAdd, IconArrow, IconDelete} from 'sentry/icons';
 import {t, tct} from 'sentry/locale';
 import PluginIcon from 'sentry/plugins/components/pluginIcon';
 import {space} from 'sentry/styles/space';
@@ -176,21 +176,10 @@ class IntegrationExternalMappings extends DeprecatedAsyncComponent<Props, State>
         />
       </Confirm>
     ) : (
-      <Tooltip
+      <QuestionTooltip
         title={t('This %s mapping suggestion was generated from a CODEOWNERS file', type)}
-      >
-        <Button
-          disabled
-          borderless
-          size="sm"
-          icon={<IconQuestion size="sm" />}
-          aria-label={t(
-            `This %s mapping suggestion was generated from a CODEOWNERS file`,
-            type
-          )}
-          data-test-id="suggestion-option"
-        />
-      </Tooltip>
+        size="sm"
+      />
     );
   }