@@ -45,14 +45,42 @@ describe('awslambda onboarding docs', () => {
45
45
) . toBeInTheDocument ( ) ;
46
46
} ) ;
47
47
48
- it ( 'enables logs' , ( ) => {
48
+ it ( 'enables logs by setting enableLogs to true' , ( ) => {
49
+ renderWithOnboardingLayout ( docs , {
50
+ selectedProducts : [ ProductSolution . ERROR_MONITORING , ProductSolution . LOGS ] ,
51
+ } ) ;
52
+
53
+ expect (
54
+ screen . getByText ( textWithMarkupMatcher ( / e n a b l e L o g s : t r u e / ) )
55
+ ) . toBeInTheDocument ( ) ;
56
+ } ) ;
57
+
58
+ it ( 'does not enable logs when not selected' , ( ) => {
59
+ renderWithOnboardingLayout ( docs , {
60
+ selectedProducts : [ ProductSolution . ERROR_MONITORING ] ,
61
+ } ) ;
62
+
63
+ expect (
64
+ screen . queryByText ( textWithMarkupMatcher ( / e n a b l e L o g s : t r u e / ) )
65
+ ) . not . toBeInTheDocument ( ) ;
66
+ } ) ;
67
+
68
+ it ( 'displays logs integration next step when logs are selected' , ( ) => {
49
69
renderWithOnboardingLayout ( docs , {
50
70
selectedProducts : [ ProductSolution . ERROR_MONITORING , ProductSolution . LOGS ] ,
51
71
} ) ;
52
72
53
73
expect ( screen . getByText ( 'Logging Integrations' ) ) . toBeInTheDocument ( ) ;
54
74
} ) ;
55
75
76
+ it ( 'does not display logs integration next step when logs are not selected' , ( ) => {
77
+ renderWithOnboardingLayout ( docs , {
78
+ selectedProducts : [ ProductSolution . ERROR_MONITORING ] ,
79
+ } ) ;
80
+
81
+ expect ( screen . queryByText ( 'Logging Integrations' ) ) . not . toBeInTheDocument ( ) ;
82
+ } ) ;
83
+
56
84
it ( 'enables performance setting the sample rate set to 1' , ( ) => {
57
85
renderWithOnboardingLayout ( docs , {
58
86
selectedProducts : [
0 commit comments