Skip to content

Commit

Permalink
ref(onboarding): Change wording to "Tracing" (#75331)
Browse files Browse the repository at this point in the history
Changes the wording of "Performance Monitoring" to "Tracing". 
Also had to change `getsentry` Tests for this:
getsentry/getsentry#14765

Instead of renaming every occurrence in the codebase, only the
occurrences in "Onboarding" are changed. Previous, unmerged PRs:
- Frontend #75223
- Backend: #75224


requires getsentry/getsentry#14765

Co-authored-by: Priscila Oliveira <priscila.oliveira@sentry.io>
  • Loading branch information
s1gr1d and priscilawebdev authored Aug 1, 2024
1 parent d2a9737 commit 6078b8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
28 changes: 13 additions & 15 deletions static/app/components/onboarding/productSelection.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ describe('Onboarding Product Selection', function () {
await userEvent.click(screen.getByRole('checkbox', {name: 'Error Monitoring'}));
await waitFor(() => expect(router.push).not.toHaveBeenCalled());

// Performance monitoring shall be checked and enabled by default
expect(screen.getByRole('checkbox', {name: 'Performance Monitoring'})).toBeChecked();
expect(screen.getByRole('checkbox', {name: 'Performance Monitoring'})).toBeEnabled();
// Tracing shall be checked and enabled by default
expect(screen.getByRole('checkbox', {name: 'Tracing'})).toBeChecked();
expect(screen.getByRole('checkbox', {name: 'Tracing'})).toBeEnabled();

// Tooltip with explanation shall be displayed on hover
await userEvent.hover(screen.getByRole('checkbox', {name: 'Performance Monitoring'}));
await userEvent.hover(screen.getByRole('checkbox', {name: 'Tracing'}));
expect(
await screen.findByText(/Automatic performance issue detection/)
).toBeInTheDocument();

// Uncheck performance monitoring
await userEvent.click(screen.getByRole('checkbox', {name: 'Performance Monitoring'}));
// Uncheck tracing
await userEvent.click(screen.getByRole('checkbox', {name: 'Tracing'}));
await waitFor(() =>
expect(router.replace).toHaveBeenCalledWith({
pathname: undefined,
Expand Down Expand Up @@ -172,22 +172,20 @@ describe('Onboarding Product Selection', function () {
}
);

// Performance Monitoring shall be unchecked and disabled by default
expect(screen.getByRole('checkbox', {name: 'Performance Monitoring'})).toBeDisabled();
expect(
screen.getByRole('checkbox', {name: 'Performance Monitoring'})
).not.toBeChecked();
await userEvent.hover(screen.getByRole('checkbox', {name: 'Performance Monitoring'}));
// Tracing shall be unchecked and disabled by default
expect(screen.getByRole('checkbox', {name: 'Tracing'})).toBeDisabled();
expect(screen.getByRole('checkbox', {name: 'Tracing'})).not.toBeChecked();
await userEvent.hover(screen.getByRole('checkbox', {name: 'Tracing'}));

// A tooltip with explanation why the option is disabled shall be displayed on hover
expect(
await screen.findByText(
disabledProducts[ProductSolution.PERFORMANCE_MONITORING].reason
)
).toBeInTheDocument();
await userEvent.click(screen.getByRole('checkbox', {name: 'Performance Monitoring'}));
await userEvent.click(screen.getByRole('checkbox', {name: 'Tracing'}));

// Try to uncheck performance monitoring
// Try to uncheck tracing
await waitFor(() => expect(router.push).not.toHaveBeenCalled());
});

Expand Down Expand Up @@ -272,7 +270,7 @@ describe('Onboarding Product Selection', function () {

expect(screen.getByRole('checkbox', {name: 'Error Monitoring'})).toBeEnabled();

expect(screen.getByRole('checkbox', {name: 'Performance Monitoring'})).toBeDisabled();
expect(screen.getByRole('checkbox', {name: 'Tracing'})).toBeDisabled();

expect(screen.getByRole('checkbox', {name: 'Session Replay'})).toBeDisabled();
});
Expand Down
11 changes: 4 additions & 7 deletions static/app/components/onboarding/productSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ function getDisabledProducts(organization: Organization): DisabledProducts {
if (!hasPerformance) {
disabledProducts[ProductSolution.PERFORMANCE_MONITORING] = {
reason,
onClick: createClickHandler(
'organizations:performance-view',
'Performance Monitoring'
),
onClick: createClickHandler('organizations:performance-view', 'Tracing'),
};
}
if (!hasProfiling) {
Expand Down Expand Up @@ -358,7 +355,7 @@ export function ProductSelection({
);

if (defaultProducts?.includes(ProductSolution.PROFILING)) {
// Ensure that if profiling is enabled, performance monitoring is also enabled
// Ensure that if profiling is enabled, tracing is also enabled
if (
product === ProductSolution.PROFILING &&
newProduct.has(ProductSolution.PROFILING)
Expand Down Expand Up @@ -434,7 +431,7 @@ export function ProductSelection({
/>
{products.includes(ProductSolution.PERFORMANCE_MONITORING) && (
<Product
label={t('Performance Monitoring')}
label={t('Tracing')}
description={t(
'Automatic performance issue detection across services and context on who is impacted, outliers, regressions, and the root cause of your slowdown.'
)}
Expand All @@ -460,7 +457,7 @@ export function ProductSelection({
<Product
label={t('Profiling')}
description={tct(
'[strong:Requires Performance Monitoring]\nSee the exact lines of code causing your performance bottlenecks, for faster troubleshooting and resource optimization.',
'[strong:Requires Tracing]\nSee the exact lines of code causing your performance bottlenecks, for faster troubleshooting and resource optimization.',
{
strong: <strong />,
}
Expand Down

0 comments on commit 6078b8e

Please sign in to comment.