Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/header/hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('header utils', () => {
describe('useLibrarySettingsMenuItems', () => {
it('should contain team access url', () => {
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', false)).result.current;
expect(items).toContainEqual({ title: 'Team Access', href: 'http://localhost/?sa=manage-team' });
expect(items).toContainEqual({ title: 'Library Team', href: 'http://localhost/?sa=manage-team' });
});
it('should contain admin console url if set', () => {
setConfig({
Expand All @@ -152,7 +152,7 @@ describe('header utils', () => {
});
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', false)).result.current;
expect(items).toContainEqual({
title: 'Team Access',
title: 'Library Team',
href: 'http://admin-console.com/authz/libraries/library-123',
});
});
Expand All @@ -163,7 +163,7 @@ describe('header utils', () => {
});
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', true)).result.current;
expect(items).toContainEqual({
title: 'Team Access',
title: 'Library Team',
href: 'http://admin-console.com/authz/libraries/library-123',
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/header/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const messages = defineMessages({
},
'header.menu.teamAccess': {
id: 'header.links.teamAccess',
defaultMessage: 'Team Access',
defaultMessage: 'Library Team',
description: 'Menu item to open team access popup',
},
'header.links.optimizer': {
Expand Down
10 changes: 5 additions & 5 deletions src/library-authoring/LibraryAuthoringPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,21 @@ describe('<LibraryAuthoringPage />', () => {
expect(screen.queryByText('(Never Published)')).not.toBeInTheDocument();
});

it('should show "Manage Access" button in Library Info that opens the Library Team modal', async () => {
it('should show Library Team button in Library Info that opens the Library Team modal', async () => {
await renderLibraryPage();
const manageAccess = screen.getByRole('button', { name: /manage access/i });
const manageAccess = await screen.findByRole('button', { name: /Library Team/i });

expect(manageAccess).not.toBeDisabled();
fireEvent.click(manageAccess);

expect(await screen.findByText('Library Team')).toBeInTheDocument();
expect(await screen.findByRole('heading', { name: 'Library Team' })).toBeInTheDocument();
});

it('should not show "Manage Access" button in Library Info to users who cannot edit the library', async () => {
it('should not show "Library Team" button in Library Info to users who cannot edit the library', async () => {
const libraryId = mockContentLibrary.libraryIdReadOnly;
render(<LibraryLayout />, { path, params: { libraryId } });

const manageAccess = screen.queryByRole('button', { name: /manage access/i });
const manageAccess = screen.queryByRole('button', { name: /Library Team/i });
expect(manageAccess).not.toBeInTheDocument();
});

Expand Down
2 changes: 1 addition & 1 deletion src/library-authoring/library-info/LibraryInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe('<LibraryInfo />', () => {
const ADMIN_CONSOLE_URL = 'http://localhost:2025/admin-console';
mergeConfig({ ADMIN_CONSOLE_URL });
render();
const manageTeam = await screen.getByText('Manage Access');
const manageTeam = await screen.findByText('Library Team');
expect(manageTeam).toBeInTheDocument();
expect(manageTeam).toHaveAttribute('href', `${ADMIN_CONSOLE_URL}/authz/libraries/${libraryData.id}`);
});
Expand Down
2 changes: 1 addition & 1 deletion src/library-authoring/library-info/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const messages = defineMessages({
},
libraryTeamButtonTitle: {
id: 'course-authoring.library-authoring.sidebar.info.library-team.button.title',
defaultMessage: 'Manage Access',
defaultMessage: 'Library Team',
description: 'Title to use for the button that allows viewing/editing the Library Team user access.',
},
libraryHistorySectionTitle: {
Expand Down