fix: library metadata times are actually displayed in local time (#1309)

This commit is contained in:
Braden MacDonald
2024-09-25 17:26:36 -07:00
committed by GitHub
parent ff67c9a952
commit ccce44a1c8
2 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ describe('<ComponentManagement />', () => {
render(<ComponentManagement usageKey={mockLibraryBlockMetadata.usageKeyNeverPublished} />);
expect(await screen.findByText('Draft')).toBeInTheDocument();
expect(await screen.findByText('(Never Published)')).toBeInTheDocument();
expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54 UTC.'))).toBeInTheDocument();
expect(screen.getByText(matchInnerText('SPAN', 'Draft saved on June 20, 2024 at 13:54.'))).toBeInTheDocument();
});
it('should render published status', async () => {
@@ -39,7 +39,7 @@ describe('<ComponentManagement />', () => {
expect(await screen.findByText('Published')).toBeInTheDocument();
expect(screen.getByText('Published')).toBeInTheDocument();
expect(
screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 UTC by Luke.')),
screen.getByText(matchInnerText('SPAN', 'Last published on June 21, 2024 at 24:00 by Luke.')),
).toBeInTheDocument();
});

View File

@@ -23,22 +23,22 @@ const messages = defineMessages({
},
lastPublishedMsg: {
id: 'course-authoring.library-authoring.generic.status-widget.last-published',
defaultMessage: 'Last published on {date} at {time} UTC by {user}.',
defaultMessage: 'Last published on {date} at {time} by {user}.',
description: 'Body message of the library authoring sidebar when the entity is published.',
},
lastPublishedMsgWithoutUser: {
id: 'course-authoring.library-authoring.generic.status-widget.last-published-no-user',
defaultMessage: 'Last published on {date} at {time} UTC.',
defaultMessage: 'Last published on {date} at {time}.',
description: 'Body message of the library authoring sidebar when the entity is published.',
},
lastDraftMsg: {
id: 'course-authoring.library-authoring.generic.status-widget.last-draft',
defaultMessage: 'Draft saved on {date} at {time} UTC by {user}.',
defaultMessage: 'Draft saved on {date} at {time} by {user}.',
description: 'Body message of the library authoring sidebar when the entity is on draft status.',
},
lastDraftMsgWithoutUser: {
id: 'course-authoring.library-authoring.generic.status-widget.last-draft-no-user',
defaultMessage: 'Draft saved on {date} at {time} UTC.',
defaultMessage: 'Draft saved on {date} at {time}.',
description: 'Body message of the library authoring sidebar when the entity is on draft status.',
},
publishButtonLabel: {