Skip to content

Commit

Permalink
ref(ui): Use QuestionTooltip in integrationExternalMappings (#54130)
Browse files Browse the repository at this point in the history
For some reason this was a Button with a Tooltip
  • Loading branch information
evanpurkhiser authored Aug 4, 2023
1 parent 7f41512 commit 0e213b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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 () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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"
/>
);
}

Expand Down

0 comments on commit 0e213b8

Please sign in to comment.