Skip to content

Commit a1abd43

Browse files
authored
refactor: rename team access navbar and sidebar (#2644)
1 parent 8f06263 commit a1abd43

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/header/hooks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe('header utils', () => {
143143
describe('useLibrarySettingsMenuItems', () => {
144144
it('should contain team access url', () => {
145145
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', false)).result.current;
146-
expect(items).toContainEqual({ title: 'Team Access', href: 'http://localhost/?sa=manage-team' });
146+
expect(items).toContainEqual({ title: 'Library Team', href: 'http://localhost/?sa=manage-team' });
147147
});
148148
it('should contain admin console url if set', () => {
149149
setConfig({
@@ -152,7 +152,7 @@ describe('header utils', () => {
152152
});
153153
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', false)).result.current;
154154
expect(items).toContainEqual({
155-
title: 'Team Access',
155+
title: 'Library Team',
156156
href: 'http://admin-console.com/authz/libraries/library-123',
157157
});
158158
});
@@ -163,7 +163,7 @@ describe('header utils', () => {
163163
});
164164
const items = renderHook(() => useLibrarySettingsMenuItems('library-123', true)).result.current;
165165
expect(items).toContainEqual({
166-
title: 'Team Access',
166+
title: 'Library Team',
167167
href: 'http://admin-console.com/authz/libraries/library-123',
168168
});
169169
});

src/header/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const messages = defineMessages({
113113
},
114114
'header.menu.teamAccess': {
115115
id: 'header.links.teamAccess',
116-
defaultMessage: 'Team Access',
116+
defaultMessage: 'Library Team',
117117
description: 'Menu item to open team access popup',
118118
},
119119
'header.links.optimizer': {

src/library-authoring/LibraryAuthoringPage.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,21 +314,21 @@ describe('<LibraryAuthoringPage />', () => {
314314
expect(screen.queryByText('(Never Published)')).not.toBeInTheDocument();
315315
});
316316

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

321321
expect(manageAccess).not.toBeDisabled();
322322
fireEvent.click(manageAccess);
323323

324-
expect(await screen.findByText('Library Team')).toBeInTheDocument();
324+
expect(await screen.findByRole('heading', { name: 'Library Team' })).toBeInTheDocument();
325325
});
326326

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

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

src/library-authoring/library-info/LibraryInfo.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ describe('<LibraryInfo />', () => {
276276
const ADMIN_CONSOLE_URL = 'http://localhost:2025/admin-console';
277277
mergeConfig({ ADMIN_CONSOLE_URL });
278278
render();
279-
const manageTeam = await screen.getByText('Manage Access');
279+
const manageTeam = await screen.findByText('Library Team');
280280
expect(manageTeam).toBeInTheDocument();
281281
expect(manageTeam).toHaveAttribute('href', `${ADMIN_CONSOLE_URL}/authz/libraries/${libraryData.id}`);
282282
});

src/library-authoring/library-info/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const messages = defineMessages({
1313
},
1414
libraryTeamButtonTitle: {
1515
id: 'course-authoring.library-authoring.sidebar.info.library-team.button.title',
16-
defaultMessage: 'Manage Access',
16+
defaultMessage: 'Library Team',
1717
description: 'Title to use for the button that allows viewing/editing the Library Team user access.',
1818
},
1919
libraryHistorySectionTitle: {

0 commit comments

Comments
 (0)