provide correct courseId prop type

flag=none

test plan:
  - specs pass

qa risk: low

Change-Id: I849d3309893b96d2c79b280af6d23718d3e4faff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274042
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
This commit is contained in:
Davis Hyer 2021-09-21 14:04:48 -06:00
parent 283f8dafcd
commit 42c2e16189
3 changed files with 11 additions and 8 deletions

View File

@ -63,7 +63,6 @@ const ignoredErrors = [
/Invalid prop `children` of type `array` supplied to `Transition`/,
/Invalid prop `children` supplied to `(Option|View)`/,
/Invalid prop `conversation._id` of type `number` supplied to `ComposeModalManager`/,
/Invalid prop `courseId` of type `number` supplied to `(DirectShareUserModal|K5Announcement)`/,
/Invalid prop `currentFolder` of type `Object` supplied to `FilePreview`/,
/Invalid prop `currentUserId` of type `number` supplied to `AddStudentModal`/,
/Invalid prop `editorOptions.plugins` of type `string` supplied to `(ForwardRef|RCEWrapper)`/,

View File

@ -378,7 +378,7 @@ describe('DiscussionFullPage', () => {
})
it('should render Teacher and Ta pills', async () => {
window.ENV.course_id = 1
window.ENV.course_id = '1'
const container = setup()
await waitFor(() => expect(container.queryAllByTestId('pill-container')).toBeTruthy())
await waitFor(() => expect(container.queryAllByTestId('pill-Teacher')).toBeTruthy())

View File

@ -22,15 +22,17 @@ import HomeroomAnnouncementsLayout from '../HomeroomAnnouncementsLayout'
const homeroomAnnouncements = [
{
courseId: 1234,
courseId: '1234',
courseName: 'Homeroom - Mr. Jessie',
courseUrl: 'http://google.com/course',
canEdit: true,
canReadAnnouncements: true,
announcement: {
id: '1234',
title: 'Welcome to Class!',
message: '<p>Yayyyy</p>',
url: 'http://google.com',
postedDate: new Date(),
attachment: {
display_name: 'exam1.pdf',
url: 'http://google.com/download',
@ -40,20 +42,22 @@ const homeroomAnnouncements = [
published: true
},
{
courseId: 1235,
courseId: '1235',
courseName: 'Homeroom 0144232',
courseUrl: 'http://google.com/course2',
canEdit: true,
canReadAnnouncements: true,
announcement: {
id: '1235',
title: 'Sign the permission slip!',
message: '<p>Hello</p>',
url: 'http://google.com/otherclass'
url: 'http://google.com/otherclass',
postedDate: new Date()
},
published: true
},
{
courseId: 1236,
courseId: '1236',
courseName: 'New Homeroom',
courseUrl: 'http://google.com',
canEdit: true,
@ -86,7 +90,7 @@ describe('HomeroomAnnouncementsLayout', () => {
{...getProps({
homeroomAnnouncements: [
{
courseId: 1236,
courseId: '1236',
courseName: 'New Homeroom',
courseUrl: 'http://google.com',
canEdit: true,
@ -108,7 +112,7 @@ describe('HomeroomAnnouncementsLayout', () => {
{...getProps({
homeroomAnnouncements: [
{
courseId: 1236,
courseId: '1236',
courseName: 'New Homeroom',
courseUrl: 'http://google.com',
canEdit: false,