provide correct colors prop types

flag=none

test plan:
  - specs pass

qa risk: low

Change-Id: Ic61afc7c0e56f9582ec0ec34f7cc873febed47d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274441
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
This commit is contained in:
Davis Hyer 2021-09-24 15:46:07 -06:00
parent f2ad23a82a
commit d289fdb87a
2 changed files with 4 additions and 5 deletions

View File

@ -86,7 +86,6 @@ const ignoredErrors = [
/The prop `canReadAnnouncements` is marked as required in `(K5Announcement|K5Course)`/,
/The prop `children` is marked as required in `TruncateText`/,
/The prop `color` is marked as required in `StatusColorListItem`/,
/The prop `colors.late` is marked as required in `StatusColorPanel`/,
/The prop `conferenceTypes\[0\].name` is marked as required in `(AddConference|ConferenceButton)`/,
/The prop `containingContext.userId` is marked as required in `CanvasContentTray`/,
/The prop `courseId` is marked as required in `(LatestAnnouncementLink|PublishButton)`/,

View File

@ -18,7 +18,7 @@
import {fireEvent, render} from '@testing-library/react'
import React from 'react'
import {defaultColors} from '../../constants/colors'
import {defaultColors, statusColors} from '../../constants/colors'
import ViewOptionsTabPanel from '../ViewOptionsTabPanel'
describe('ViewOptionsTabPanel', () => {
@ -43,7 +43,7 @@ describe('ViewOptionsTabPanel', () => {
onChange: jest.fn()
},
statusColors: {
currentValues: defaultColors,
currentValues: statusColors(),
onChange: jest.fn()
},
viewUngradedAsZero: {
@ -196,7 +196,7 @@ describe('ViewOptionsTabPanel', () => {
it('renders the status color panel with the colors supplied in .currentValues', () => {
const {getByRole} = renderPanel({
statusColors: {
currentValues: {...defaultColors, excused: '#ffffff'},
currentValues: {...statusColors(), excused: '#ffffff'},
onChange: () => {}
}
})
@ -210,7 +210,7 @@ describe('ViewOptionsTabPanel', () => {
const onChange = jest.fn()
const {getByRole} = renderPanel({
statusColors: {
currentValues: {...defaultColors, excused: '#ffffff'},
currentValues: {...statusColors(), excused: '#ffffff'},
onChange
}
})