Skip to content

Commit de8b4b4

Browse files
authored
style: Update some texts in legacy libraries migration flow (#2601) (#2603)
1 parent fa2bd8a commit de8b4b4

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

src/legacy-libraries-migration/ConfirmationView.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export const ConfirmationView = ({
7474
{...messages.confirmationViewAlert}
7575
values={{
7676
count: legacyLibraries.length,
77-
libraryName: destination.title,
7877
b: BoldText,
7978
}}
8079
/>

src/legacy-libraries-migration/LegacyLibMigrationPage.test.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,11 @@ describe('<LegacyLibMigrationPage />', () => {
245245
await user.click(nextButton);
246246
const alert = await screen.findByRole('alert');
247247
expect(await within(alert).findByText(
248-
/All content from the 1 legacy library you selected will be migrated to/i,
249-
)).toBeInTheDocument();
250-
expect(await within(alert).findByText(
251-
/test library 1/i,
248+
/All content from the legacy library you selected will be migrated to the Content Library you select/i,
252249
)).toBeInTheDocument();
253250

254251
const backButton = screen.getByRole('button', { name: /back/i });
255-
backButton.click();
252+
await user.click(backButton);
256253

257254
expect(await screen.findByText('Test Library 1')).toBeInTheDocument();
258255
// The selected v2 library remains checked
@@ -357,10 +354,7 @@ describe('<LegacyLibMigrationPage />', () => {
357354
// Should show alert of ConfirmationView
358355
const alert = await screen.findByRole('alert');
359356
expect(await within(alert).findByText(
360-
/All content from the 3 legacy libraries you selected will be migrated to/i,
361-
)).toBeInTheDocument();
362-
expect(await within(alert).findByText(
363-
/test library 1/i,
357+
/All content from the 3 legacy libraries you selected will be migrated to the Content Library you select/i,
364358
)).toBeInTheDocument();
365359
expect(screen.getByText('MBA')).toBeInTheDocument();
366360
expect(screen.getByText('Legacy library 1')).toBeInTheDocument();
@@ -417,11 +411,7 @@ describe('<LegacyLibMigrationPage />', () => {
417411
// Should show alert of ConfirmationView
418412
const alert = await screen.findByRole('alert');
419413
expect(await within(alert).findByText(
420-
/All content from the 3 legacy libraries you selected will be migrated to /i,
421-
{ exact: false },
422-
)).toBeInTheDocument();
423-
expect(await within(alert).findByText(
424-
/test library 1/i,
414+
/All content from the 3 legacy libraries you selected will be migrated to the Content Library you select/i,
425415
{ exact: false },
426416
)).toBeInTheDocument();
427417
expect(screen.getByText('MBA')).toBeInTheDocument();

src/legacy-libraries-migration/messages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const messages = defineMessages({
6464
selectDestinationAlert: {
6565
id: 'legacy-libraries-migration.select-destination.alert.text',
6666
defaultMessage: 'All content from the'
67-
+ ' {count, plural, one {{count} legacy library} other {{count} legacy libraries}} you selected will'
67+
+ ' {count, plural, one {legacy library} other {{count} legacy libraries}} you selected will'
6868
+ ' be migrated to this new library, organized into collections. Legacy library content used in courses will'
6969
+ ' continue to work as-is. To receive any future changes to migrated content, you must update these'
7070
+ ' references within your course.',
@@ -73,8 +73,8 @@ const messages = defineMessages({
7373
confirmationViewAlert: {
7474
id: 'legacy-libraries-migration.select-destination.alert.text',
7575
defaultMessage: 'All content from the'
76-
+ ' {count, plural, one {{count} legacy library} other {{count} legacy libraries}} you selected will'
77-
+ ' be migrated to <b>{libraryName}</b>, organized into collections. Legacy library content used in courses will'
76+
+ ' {count, plural, one {legacy library} other {{count} legacy libraries}} you selected will'
77+
+ ' be migrated to the Content Library you select, organized into collections. Legacy library content used in courses will'
7878
+ ' continue to work as-is. To receive any future changes to migrated content, you must update these'
7979
+ ' references within your course.',
8080
description: 'Alert text in the confirmation step of the legacy libraries migration page.',

0 commit comments

Comments
 (0)