From 3cde8540e502c21b14fff9eab2e41babf51e327b Mon Sep 17 00:00:00 2001 From: Muhammad Afaq Shuaib Date: Thu, 2 Jan 2025 12:15:04 +0500 Subject: [PATCH] Revert "temp: disable price edits if course has a published run (#994)" This reverts commit fc631061a8306633cb46f8644cb699974a4f6f85. --- .../EditCoursePage/EditCourseForm.jsx | 4 +--- .../EditCoursePage/EditCourseForm.test.jsx | 21 ------------------- .../EditCourseForm.test.jsx.snap | 8 ------- src/containers/MainApp/index.jsx | 5 +---- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/components/EditCoursePage/EditCourseForm.jsx b/src/components/EditCoursePage/EditCourseForm.jsx index 7b01213d0..12b94d2d8 100644 --- a/src/components/EditCoursePage/EditCourseForm.jsx +++ b/src/components/EditCoursePage/EditCourseForm.jsx @@ -429,11 +429,9 @@ export class BaseEditCourseForm extends React.Component { disabled={disabled || !!entitlement.sku} /> { expect(disabledFields).toHaveLength(1); }); - it('renders with price disabled if course has Published status among status list', () => { - const component = shallow( null} - title={initialValuesFull.title} - initialValues={initialValuesFull} - currentFormValues={initialValuesFull} - number="Test101x" - entitlement={{ sku: 'ABC1234' }} - courseStatuses={[REVIEWED, PUBLISHED]} - courseInfo={courseInfo} - courseOptions={courseOptions} - courseRunOptions={courseRunOptions} - uuid={initialValuesFull.uuid} - type={initialValuesFull.type} - id="edit-course-form" - />); - - const disabledFields = component.find({ name: 'course_price_list', disabled: true }); - expect(disabledFields).toHaveLength(1); - }); - it('Check if watchers field is disabled after being reviewed', () => { const courseInfoWithCourseRunStatuses = { ...courseInfo, diff --git a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap index 8538cf195..b9e73a2e9 100644 --- a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap +++ b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap @@ -336,7 +336,6 @@ exports[`BaseEditCourseForm override slug format when IS_NEW_SLUG_FORMAT_ENABLED "onInvalid": [Function], } } - name="course_price_list" priceLabels={ { "verified": "Verified", @@ -2184,7 +2183,6 @@ exports[`BaseEditCourseForm renders correctly when submitting for review 1`] = ` "onInvalid": [Function], } } - name="course_price_list" priceLabels={ { "verified": "Verified", @@ -4032,7 +4030,6 @@ exports[`BaseEditCourseForm renders html correctly while fetching collaborator o "onInvalid": [Function], } } - name="course_price_list" priceLabels={{}} required={false} /> @@ -5418,7 +5415,6 @@ exports[`BaseEditCourseForm renders html correctly while submitting 1`] = ` "onInvalid": [Function], } } - name="course_price_list" priceLabels={ { "verified": "Verified", @@ -7307,7 +7303,6 @@ exports[`BaseEditCourseForm renders html correctly with administrator being true "onInvalid": [Function], } } - name="course_price_list" priceLabels={ { "verified": "Verified", @@ -9502,7 +9497,6 @@ exports[`BaseEditCourseForm renders html correctly with all data present 1`] = ` "onInvalid": [Function], } } - name="course_price_list" priceLabels={ { "verified": "Verified", @@ -11391,7 +11385,6 @@ exports[`BaseEditCourseForm renders html correctly with minimal data 1`] = ` "onInvalid": [Function], } } - name="course_price_list" priceLabels={{}} required={false} /> @@ -12781,7 +12774,6 @@ exports[`BaseEditCourseForm renders html correctly with skills data when skills "onInvalid": [Function], } } - name="course_price_list" priceLabels={{}} required={false} /> diff --git a/src/containers/MainApp/index.jsx b/src/containers/MainApp/index.jsx index 5a6f650ae..85e93a1cc 100644 --- a/src/containers/MainApp/index.jsx +++ b/src/containers/MainApp/index.jsx @@ -20,16 +20,13 @@ import SitewideBanner from '../../components/SitewideBanner'; const MainApp = () => (
- {/* Only display the banner if there is content to display. */} - {process.env.SITEWIDE_BANNER_CONTENT && ( - )}
} />