@@ -96,6 +96,41 @@ describe('javascript-react onboarding docs', () => {
9696 ) . toBeInTheDocument ( ) ;
9797 } ) ;
9898
99+ it ( 'includes metrics API calls in verify when metrics is selected' , ( ) => {
100+ renderWithOnboardingLayout ( docs , {
101+ selectedProducts : [ ProductSolution . ERROR_MONITORING , ProductSolution . METRICS ] ,
102+ } ) ;
103+
104+ expect (
105+ screen . getByText (
106+ textWithMarkupMatcher ( / S e n t r y \. m e t r i c s \. c o u n t \( ' t e s t _ c o u n t e r ' , 1 \) / )
107+ )
108+ ) . toBeInTheDocument ( ) ;
109+ } ) ;
110+
111+ it ( 'shows Metrics in next steps when metrics is selected' , ( ) => {
112+ renderWithOnboardingLayout ( docs , {
113+ selectedProducts : [
114+ ProductSolution . ERROR_MONITORING ,
115+ ProductSolution . PERFORMANCE_MONITORING ,
116+ ProductSolution . METRICS ,
117+ ] ,
118+ } ) ;
119+
120+ expect ( screen . getByText ( 'Metrics' ) ) . toBeInTheDocument ( ) ;
121+ } ) ;
122+
123+ it ( 'does not show Metrics in next steps when metrics is not selected' , ( ) => {
124+ renderWithOnboardingLayout ( docs , {
125+ selectedProducts : [
126+ ProductSolution . ERROR_MONITORING ,
127+ ProductSolution . PERFORMANCE_MONITORING ,
128+ ] ,
129+ } ) ;
130+
131+ expect ( screen . queryByText ( 'Metrics' ) ) . not . toBeInTheDocument ( ) ;
132+ } ) ;
133+
99134 it ( 'shows Logging Integrations in next steps when logs is selected' , ( ) => {
100135 renderWithOnboardingLayout ( docs , {
101136 selectedProducts : [
@@ -118,4 +153,11 @@ describe('javascript-react onboarding docs', () => {
118153
119154 expect ( screen . queryByText ( 'Logging Integrations' ) ) . not . toBeInTheDocument ( ) ;
120155 } ) ;
156+
157+ it ( 'has metrics onboarding configuration' , ( ) => {
158+ expect ( docs . metricsOnboarding ) . toBeDefined ( ) ;
159+ expect ( docs . metricsOnboarding ?. install ) . toBeDefined ( ) ;
160+ expect ( docs . metricsOnboarding ?. configure ) . toBeDefined ( ) ;
161+ expect ( docs . metricsOnboarding ?. verify ) . toBeDefined ( ) ;
162+ } ) ;
121163} ) ;
0 commit comments