diff --git a/.gitignore b/.gitignore
index 1b6f8502b..86918ee92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ module.config.js
dist/
.idea
+.vscode
diff --git a/src/components/CollaboratorPage/index.jsx b/src/components/CollaboratorPage/index.jsx
index feba33792..b4b53d719 100644
--- a/src/components/CollaboratorPage/index.jsx
+++ b/src/components/CollaboratorPage/index.jsx
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
+import { Alert } from '@edx/paragon';
import CollaboratorForm from './CollaboratorForm';
-import StatusAlert from '../StatusAlert';
import PageContainer from '../PageContainer';
class CollaboratorPage extends React.Component {
@@ -51,12 +51,13 @@ class CollaboratorPage extends React.Component {
if (!isCreateForm && (!location.state || !location.state.uuid)) {
return (
-
Direct access to collaborators not supported
+ ); } @@ -87,12 +88,14 @@ class CollaboratorPage extends React.Component {+ User information unavailable +
+ `; exports[`CreateCoursePage renders page correctly with org error 1`] = ` @@ -365,21 +405,32 @@ exports[`CreateCoursePage renders page correctly with org error 1`] = ` touchOnChange={false} updateUnregisteredFields={false} /> -User information unavailable
+ ); } @@ -174,11 +175,12 @@ class CreateCoursePage extends React.Component { courseRunOptions={courseRunOptions} /> {errorArray.length > 1 && ( -I learned stuff!
', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override_url: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: 'Stuff
', @@ -399,13 +386,6 @@ describe('EditCoursePage', () => { key: 'edX+Test101x', learner_testimonials: 'I learned stuff!
', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: 'Stuff
', @@ -586,9 +566,9 @@ describe('EditCoursePage', () => { targetRun: unpublishedCourseRun, }} />); - const reviewAlert = component.find(StatusAlert); + const reviewAlert = component.find(Alert); const reviewMessage = 'Course has been submitted for review. The course will be locked for the next two business days. You will receive an email when the review is complete.'; - expect(reviewAlert.props().message).toEqual(reviewMessage); + expect(reviewAlert.text()).toEqual(reviewMessage); }); it('upon legal review submission, StatusAlert is set to appear', () => { @@ -599,9 +579,9 @@ describe('EditCoursePage', () => { targetRun: { status: REVIEW_BY_LEGAL }, }} />); - const reviewAlert = component.find(StatusAlert); + const reviewAlert = component.find(Alert); const reviewMessage = 'Legal Review Complete. Course Run is now awaiting PC Review.'; - expect(reviewAlert.props().message).toEqual(reviewMessage); + expect(reviewAlert.text()).toEqual(reviewMessage); }); it('upon internal review submission, StatusAlert is set to appear', () => { @@ -612,18 +592,18 @@ describe('EditCoursePage', () => { targetRun: { status: REVIEW_BY_INTERNAL }, }} />); - const reviewAlert = component.find(StatusAlert); + const reviewAlert = component.find(Alert); const reviewMessage = 'PC Review Complete.'; - expect(reviewAlert.props().message).toEqual(reviewMessage); + expect(reviewAlert.text()).toEqual(reviewMessage); }); it('upon course run creation, StatusAlert is set to appear', () => { const component = shallow(I learned stuff!
', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: 'Stuff
', diff --git a/src/components/EditCoursePage/TranscriptLanguage.jsx b/src/components/EditCoursePage/TranscriptLanguage.jsx index 380936109..5459666f1 100644 --- a/src/components/EditCoursePage/TranscriptLanguage.jsx +++ b/src/components/EditCoursePage/TranscriptLanguage.jsx @@ -1,11 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Field, FieldArray } from 'redux-form'; +import { Alert } from '@edx/paragon'; import RenderSelectField from '../RenderSelectField'; import RemoveButton from '../RemoveButton'; import FieldLabel from '../FieldLabel'; -import StatusAlert from '../StatusAlert'; class TranscriptLanguage extends React.Component { constructor(props) { @@ -33,10 +33,7 @@ class TranscriptLanguage extends React.Component {learn
", @@ -716,15 +721,30 @@ exports[`EditCoursePage renders page correctly with courseInfo and courseOptions } wide={false} > -learn
", @@ -1526,15 +1464,30 @@ exports[`EditCoursePage renders page correctly with courseInfo error 1`] = ` } wide={false} > -learn
", @@ -2593,15 +2485,30 @@ exports[`EditCoursePage renders page correctly with courseInfo, courseOptions, a } wide={false} > -+ Course information unavailable. Please try reloading the page and if the error persists, please contact support. +
+ `; exports[`EditCoursePage renders page correctly with no courseOptions 1`] = ` -+ Course information unavailable. Please try reloading the page and if the error persists, please contact support. +
+ `; exports[`EditCoursePage renders page correctly with no courseRunOptions 1`] = ` -+ Course information unavailable. Please try reloading the page and if the error persists, please contact support. +
+ `; diff --git a/src/components/EditCoursePage/__snapshots__/TranscriptLanguage.test.jsx.snap b/src/components/EditCoursePage/__snapshots__/TranscriptLanguage.test.jsx.snap index 33fb77e54..0d898d5de 100644 --- a/src/components/EditCoursePage/__snapshots__/TranscriptLanguage.test.jsx.snap +++ b/src/components/EditCoursePage/__snapshots__/TranscriptLanguage.test.jsx.snap @@ -72,15 +72,30 @@ exports[`Transcript Language renders correctly with an error after failed submis className="transcript-languages mb-3" tabIndex="-1" > -+ Course information unavailable. Please try reloading the page and if the error + persists, please contact support. +
+ ); } @@ -688,21 +670,23 @@ class EditCoursePage extends React.Component { />+ Could not get instructor information +
+ `; exports[`StafferPage renders page correctly with staffer info error 1`] = ` @@ -261,21 +307,32 @@ exports[`StafferPage renders page correctly with staffer info error 1`] = ` touchOnChange={false} updateUnregisteredFields={false} /> -Could not get instructor information
+ ); } @@ -150,12 +153,14 @@ class StafferPage extends React.Component { { showSpinner &&