diff --git a/src/files-and-videos/files-page/FilesPage.test.jsx b/src/files-and-videos/files-page/FilesPage.test.jsx index 1e0f4444d4..44f003f1e9 100644 --- a/src/files-and-videos/files-page/FilesPage.test.jsx +++ b/src/files-and-videos/files-page/FilesPage.test.jsx @@ -563,7 +563,8 @@ describe('FilesAndUploads', () => { const addStatus = store.getState().assets.addingStatus; expect(addStatus).toEqual(RequestStatus.FAILED); }); - expect(screen.getByText('Error')).toBeVisible(); + + expect(screen.getByText('Upload error')).toBeVisible(); }); it('404 validation should show error', async () => { @@ -575,7 +576,7 @@ describe('FilesAndUploads', () => { const addStatus = store.getState().assets.addingStatus; expect(addStatus).toEqual(RequestStatus.FAILED); - expect(screen.getByText('Error')).toBeVisible(); + expect(screen.getByText('Upload error')).toBeVisible(); }); it('404 upload should show error', async () => { @@ -588,7 +589,7 @@ describe('FilesAndUploads', () => { const addStatus = store.getState().assets.addingStatus; expect(addStatus).toEqual(RequestStatus.FAILED); - expect(screen.getByText('Error')).toBeVisible(); + expect(screen.getByText('Upload error')).toBeVisible(); }); it('404 delete should show error', async () => { diff --git a/src/files-and-videos/files-page/messages.js b/src/files-and-videos/files-page/messages.js index d2c3bf3d78..a6082edcb0 100644 --- a/src/files-and-videos/files-page/messages.js +++ b/src/files-and-videos/files-page/messages.js @@ -111,6 +111,15 @@ const messages = defineMessages({ defaultMessage: 'Cancel', description: 'The message displayed in the button to confirm cancelling the upload', }, + lockFileTooltipContent: { + id: 'course-authoring.files-and-uploads.file-info.lockFile.tooltip.content', + defaultMessage: `By default, anyone can access a file you upload if + they know the web URL, even if they are not enrolled in your course. + You can prevent outside access to a file by locking the file. When + you lock a file, the web URL only allows learners who are enrolled + in your course and signed in to access the file.`, + description: 'Tooltip message for the lock icon in the table view of files', + }, }); export default messages; diff --git a/src/files-and-videos/generic/EditFileErrors.jsx b/src/files-and-videos/generic/EditFileErrors.jsx index 4a2e1e9098..97b5c32ce4 100644 --- a/src/files-and-videos/generic/EditFileErrors.jsx +++ b/src/files-and-videos/generic/EditFileErrors.jsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { Alert } from '@openedx/paragon'; import { ErrorAlert } from '@edx/frontend-lib-content-components'; import { RequestStatus } from '../../data/constants'; import messages from './messages'; @@ -24,10 +25,13 @@ const EditFileErrors = ({ {intl.formatMessage(messages.errorAlertMessage, { message: errorMessages.loading })} resetErrors({ errorType: 'add' })} isError={addFileStatus === RequestStatus.FAILED} > + + {intl.formatMessage(messages.uploadErrorAlertTitle)} +