From a6b14740eaa1e60ccde67d7640515cf686cfae4c Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Wed, 16 Jul 2025 18:22:53 +0500 Subject: [PATCH] test: fixed test cases --- .../posts/post-editor/PostEditor.test.jsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/discussions/posts/post-editor/PostEditor.test.jsx b/src/discussions/posts/post-editor/PostEditor.test.jsx index 5674d19c..15e95008 100644 --- a/src/discussions/posts/post-editor/PostEditor.test.jsx +++ b/src/discussions/posts/post-editor/PostEditor.test.jsx @@ -110,6 +110,10 @@ describe('PostEditor', () => { allowAnonymous, allowAnonymousToPeers, moderationSettings: {}, + captchaSettings: { + enabled: false, + siteKey: '', + }, }, }); await executeThunk(fetchCourseTopics(courseId), store.dispatch, store.getState); @@ -119,7 +123,6 @@ describe('PostEditor', () => { allowAnonymousToPeers ? '' : 'not'} allowed`, async () => { await renderComponent(); - expect(screen.queryByRole('heading')).toHaveTextContent('Add a post'); expect(screen.queryAllByRole('radio')).toHaveLength(2); // 2 categories with 4 subcategories each expect(screen.queryAllByText(/category-\d-topic \d/)).toHaveLength(8); @@ -162,6 +165,10 @@ describe('PostEditor', () => { provider: 'legacy', is_notify_all_learners_enabled: isNotifyAllLearnersEnabled, moderationSettings: {}, + captchaSettings: { + enabled: false, + siteKey: '', + }, }, }); @@ -202,6 +209,10 @@ describe('PostEditor', () => { ...settings, }, ...config, + captchaSettings: { + enabled: false, + siteKey: '', + }, }, }); await executeThunk(fetchCourseTopics(courseId), store.dispatch, store.getState); @@ -358,6 +369,10 @@ describe('PostEditor', () => { dividedInlineDiscussions: dividedcw, dividedCourseWideDiscussions: dividedncw, }, + captchaSettings: { + enabled: false, + siteKey: '', + }, }, }); await executeThunk(fetchCourseTopics(courseId), store.dispatch, store.getState);