@@ -54,7 +54,11 @@ describe('ProjectUserFeedback', function () {
54
54
} ) ;
55
55
56
56
describe ( 'ProjectUserFeedbackProcessing' , function ( ) {
57
- const { routerProps, organization, project} = initializeOrg ( ) ;
57
+ const { routerProps, organization, project} = initializeOrg ( {
58
+ organization : {
59
+ features : [ 'user-feedback-spam-ingest' ] ,
60
+ } ,
61
+ } ) ;
58
62
const url = `/projects/${ organization . slug } /${ project . slug } /` ;
59
63
60
64
beforeEach ( function ( ) {
@@ -98,3 +102,36 @@ describe('ProjectUserFeedbackProcessing', function () {
98
102
) ;
99
103
} ) ;
100
104
} ) ;
105
+
106
+ describe ( 'ProjectUserFeedbackProcessingNoSpamDetection' , function ( ) {
107
+ const { routerProps, organization, project} = initializeOrg ( ) ;
108
+ const url = `/projects/${ organization . slug } /${ project . slug } /` ;
109
+
110
+ beforeEach ( function ( ) {
111
+ MockApiClient . clearMockResponses ( ) ;
112
+ MockApiClient . addMockResponse ( {
113
+ url,
114
+ method : 'GET' ,
115
+ body : ProjectFixture ( ) ,
116
+ } ) ;
117
+ MockApiClient . addMockResponse ( {
118
+ url : `${ url } keys/` ,
119
+ method : 'GET' ,
120
+ body : [ ] ,
121
+ } ) ;
122
+ } ) ;
123
+
124
+ it ( 'cannot toggle spam detection' , function ( ) {
125
+ render (
126
+ < ProjectUserFeedback
127
+ { ...routerProps }
128
+ organization = { organization }
129
+ project = { project }
130
+ />
131
+ ) ;
132
+
133
+ expect (
134
+ screen . queryByRole ( 'checkbox' , { name : 'Enable Spam Detection' } )
135
+ ) . not . toBeInTheDocument ( ) ;
136
+ } ) ;
137
+ } ) ;
0 commit comments