From 9cb6fa8f3e9baa755081717635750f1312db3a57 Mon Sep 17 00:00:00 2001 From: Taras Lytvynenko <69678257+Inferato@users.noreply.github.com> Date: Thu, 9 Nov 2023 23:16:23 +0200 Subject: [PATCH] fix: [RGOeX-26199] FIxed lint error --- .../bulk-email-tool/bulk-email-form/BulkEmailForm.jsx | 7 ++++++- .../bulk-email-recipient/BulkEmailRecipient.jsx | 7 ++++++- .../data/__factories__/bulkEmailFormCourseMode.factory.js | 2 +- .../bulk-email-form/test/BulkEmailForm.test.jsx | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx b/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx index 44e4f73e..eb8dc33e 100644 --- a/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx +++ b/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx @@ -390,7 +390,12 @@ BulkEmailForm.propTypes = { courseId: PropTypes.string.isRequired, cohorts: PropTypes.arrayOf(PropTypes.string), intl: intlShape.isRequired, - courseModes: PropTypes.arrayOf(PropTypes.string).isRequired, + courseModes: PropTypes.arrayOf( + PropTypes.shape({ + slug: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + }), + ).isRequired, }; export default injectIntl(BulkEmailForm); diff --git a/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx b/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx index 6a050a0b..d95824b4 100644 --- a/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx +++ b/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx @@ -126,5 +126,10 @@ BulkEmailRecipient.propTypes = { handleCheckboxes: PropTypes.func.isRequired, isValid: PropTypes.bool, additionalCohorts: PropTypes.arrayOf(PropTypes.string), - courseModes: PropTypes.arrayOf(PropTypes.object).isRequired, + courseModes: PropTypes.arrayOf( + PropTypes.shape({ + slug: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + }), + ).isRequired, }; diff --git a/src/components/bulk-email-tool/bulk-email-form/data/__factories__/bulkEmailFormCourseMode.factory.js b/src/components/bulk-email-tool/bulk-email-form/data/__factories__/bulkEmailFormCourseMode.factory.js index 76e43852..6564dd1d 100644 --- a/src/components/bulk-email-tool/bulk-email-form/data/__factories__/bulkEmailFormCourseMode.factory.js +++ b/src/components/bulk-email-tool/bulk-email-form/data/__factories__/bulkEmailFormCourseMode.factory.js @@ -1,4 +1,4 @@ -import { Factory } from 'rosie'; +import { Factory } from 'rosie'; // eslint-disable-line import/no-extraneous-dependencies const courseModeFactory = () => { const AuditModeFactory = Factory.define('AuditModeFactory') diff --git a/src/components/bulk-email-tool/bulk-email-form/test/BulkEmailForm.test.jsx b/src/components/bulk-email-tool/bulk-email-form/test/BulkEmailForm.test.jsx index feeb12f8..2d0dd1c3 100644 --- a/src/components/bulk-email-tool/bulk-email-form/test/BulkEmailForm.test.jsx +++ b/src/components/bulk-email-tool/bulk-email-form/test/BulkEmailForm.test.jsx @@ -39,7 +39,7 @@ function renderBulkEmailForm() { function renderBulkEmailFormContext(value) { return ( - + ); }