From b14709fbae9fd865e51b79c18ffd65b35ccefd92 Mon Sep 17 00:00:00 2001 From: Davis Hyer Date: Fri, 24 Sep 2021 09:48:44 -0600 Subject: [PATCH] provide correct postedAt prop type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flag=none test plan: - specs pass qa risk: low Change-Id: Id06f390ffabea0642ed67fc7c60dfabc125e487a Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274379 Tested-by: Service Cloud Jenkins Reviewed-by: Omar Soto-Fortuño QA-Review: Omar Soto-Fortuño Product-Review: Omar Soto-Fortuño --- jest/jest-setup.js | 1 - ui/shared/k5/react/__tests__/K5Announcement.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/jest/jest-setup.js b/jest/jest-setup.js index 1049e4d89f1..129a91c988a 100644 --- a/jest/jest-setup.js +++ b/jest/jest-setup.js @@ -64,7 +64,6 @@ const ignoredErrors = [ /Invalid prop `conversation._id` of type `number` supplied to `ComposeModalManager`/, /Invalid prop `editorOptions.plugins` of type `string` supplied to `(ForwardRef|RCEWrapper)`/, // https://instructure.atlassian.net/browse/MAT-453 /Invalid prop `editorOptions.toolbar\[0\]` of type `string` supplied to `(ForwardRef|RCEWrapper)`/, // https://instructure.atlassian.net/browse/MAT-453 - /Invalid prop `firstAnnouncement.postedDate` of type `String` supplied to `K5Announcement`/, /Invalid prop `heading` of type `object` supplied to `Billboard`/, // https://instructure.atlassian.net/browse/QUIZ-8870 /Invalid prop `headingAs` of value `h4` supplied to `Billboard`/, /Invalid prop `id` of type `number` supplied to `Option`/, diff --git a/ui/shared/k5/react/__tests__/K5Announcement.test.js b/ui/shared/k5/react/__tests__/K5Announcement.test.js index ecf60df724b..4ac9e999f6e 100644 --- a/ui/shared/k5/react/__tests__/K5Announcement.test.js +++ b/ui/shared/k5/react/__tests__/K5Announcement.test.js @@ -232,7 +232,7 @@ describe('K5Announcement', () => { it('handles 2 announcements with identical posted_at dates', async () => { const postedAt = '2021-08-01T18:00:00Z' - const props = getProps({}, {postedDate: postedAt}) + const props = getProps({}, {postedDate: Date.parse(postedAt)}) fetchMock.get( /\/api\/v1\/announcements/, {