Skip to content

Commit 7d80cca

Browse files
committed
tests
1 parent 4ec4f40 commit 7d80cca

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

static/app/views/settings/projectUserFeedback/index.spec.tsx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ describe('ProjectUserFeedback', function () {
5454
});
5555

5656
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+
});
5862
const url = `/projects/${organization.slug}/${project.slug}/`;
5963

6064
beforeEach(function () {
@@ -98,3 +102,36 @@ describe('ProjectUserFeedbackProcessing', function () {
98102
);
99103
});
100104
});
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

Comments
 (0)