diff --git a/src/CourseAuthoringPage.test.jsx b/src/CourseAuthoringPage.test.jsx
index 7640dc772..3212b1761 100644
--- a/src/CourseAuthoringPage.test.jsx
+++ b/src/CourseAuthoringPage.test.jsx
@@ -102,4 +102,20 @@ describe('Course authoring page', () => {
expect(await wrapper.findByTestId(contentTestId)).toBeInTheDocument();
expect(wrapper.queryByTestId('notFoundAlert')).not.toBeInTheDocument();
});
+ const mockStoreDenied = async () => {
+ const studioApiBaseUrl = getConfig().STUDIO_BASE_URL;
+ const courseAppsApiUrl = `${studioApiBaseUrl}/api/course_apps/v1/apps`;
+
+ axiosMock.onGet(
+ `${courseAppsApiUrl}/${courseId}`,
+ ).reply(403);
+ await executeThunk(fetchCourseApps(courseId), store.dispatch);
+ };
+ test('renders PermissionDeniedAlert when courseAppsApiStatus is DENIED', async () => {
+ mockPathname = '/editor/';
+ await mockStoreDenied();
+
+ const wrapper = render();
+ expect(await wrapper.findByTestId('permissionDeniedAlert')).toBeInTheDocument();
+ });
});
diff --git a/src/library-authoring/LibraryAuthoringPage.test.tsx b/src/library-authoring/LibraryAuthoringPage.test.tsx
index f0c0404c9..5865d65a6 100644
--- a/src/library-authoring/LibraryAuthoringPage.test.tsx
+++ b/src/library-authoring/LibraryAuthoringPage.test.tsx
@@ -509,8 +509,8 @@ describe('', () => {
// Switch back to the collection
fireEvent.click((await screen.findByText('Collection 1')));
- // The Manage (default) tab should be selected because the collection does not have a Preview tab
- expect(screen.getByRole('tab', { name: 'Manage' })).toHaveAttribute('aria-selected', 'true');
+ // The Details (default) tab should be selected because the collection does not have a Preview tab
+ expect(screen.getByRole('tab', { name: 'Details' })).toHaveAttribute('aria-selected', 'true');
});
const problemTypes = {
diff --git a/src/library-authoring/collections/CollectionInfo.tsx b/src/library-authoring/collections/CollectionInfo.tsx
index 68d2dcb07..45a5352e5 100644
--- a/src/library-authoring/collections/CollectionInfo.tsx
+++ b/src/library-authoring/collections/CollectionInfo.tsx
@@ -31,7 +31,7 @@ const CollectionInfo = () => {
const tab: CollectionInfoTab = (
sidebarTab && isCollectionInfoTab(sidebarTab)
- ) ? sidebarTab : COLLECTION_INFO_TABS.Manage;
+ ) ? sidebarTab : COLLECTION_INFO_TABS.Details;
const collectionId = sidebarComponentInfo?.id;
// istanbul ignore if: this should never happen
diff --git a/src/library-authoring/collections/LibraryCollectionPage.test.tsx b/src/library-authoring/collections/LibraryCollectionPage.test.tsx
index eb102d2ed..d9a576830 100644
--- a/src/library-authoring/collections/LibraryCollectionPage.test.tsx
+++ b/src/library-authoring/collections/LibraryCollectionPage.test.tsx
@@ -444,7 +444,7 @@ describe('', () => {
);
axiosMock.onPatch(collectionUrl).reply(200);
- expect(await screen.findByRole('heading')).toBeInTheDocument();
+ expect(await screen.findByRole('heading', { name: /Test Collection/i })).toBeInTheDocument();
expect(screen.queryByText(/add content/i)).not.toBeInTheDocument();
// Open Add content sidebar