Add missing userId to a few tests

flag=none

test plan:
  - Specs pass

qa risk: low

Change-Id: Iec4614be0784b0f363c579d68dd077d7ec6ac056
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277188
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
This commit is contained in:
Omar Gerardo Soto-Fortuño 2021-11-01 09:35:06 -04:00 committed by Omar Soto-Fortuño
parent b261f7fabe
commit f7317bf0b1
4 changed files with 5 additions and 4 deletions

View File

@ -116,7 +116,6 @@ const ignoredErrors = [
/The prop `selectedRoles\[0\].value` is marked as required in `PermissionsIndex`/,
/The prop `text` is marked as required in `(SVGWithTextPlaceholder|TextPlaceholder)`/,
/The prop `trayProps.canUploadFiles` is marked as required in `RCEWrapper`/,
/The prop `userId` is marked as required in `(CourseNotificationSettingsManager|GeneratePairingCode|NotificationPreferences)`/,
/The prop `value` is marked as required in `CanvasSelectOption`/,
/Unexpected keys "searchPermissions", "filterRoles", "tabChanged", "setAndOpenAddTray" found in preloadedState argument passed to createStore/,
/Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>/,

View File

@ -77,7 +77,7 @@ it('Show an error in the modal if the pairing code fails to generate', () => {
status: 401
})
const tree = shallow(<GeneratePairingCode />)
const tree = shallow(<GeneratePairingCode {...defaultProps} />)
tree.setState({showModal: true})
moxios.wait(() => {
@ -95,7 +95,7 @@ it('Shows the loading spinner while the pairing code is being generated', () =>
})
it('clicking the close button will close the modal', () => {
const tree = shallow(<GeneratePairingCode />)
const tree = shallow(<GeneratePairingCode {...defaultProps} />)
tree.setState({showModal: true})
const closeButton = tree.find('CloseButton')
@ -104,7 +104,7 @@ it('clicking the close button will close the modal', () => {
})
it('clicking the ok button will close the modal', () => {
const tree = shallow(<GeneratePairingCode />)
const tree = shallow(<GeneratePairingCode {...defaultProps} />)
tree.setState({showModal: true})
const okButton = tree.find('ModalFooter Button')

View File

@ -174,6 +174,7 @@ describe('Course Notification Settings', () => {
<MockedProvider mocks={mocks}>
<CourseNotificationSettingsManager
courseId="1"
userId="1"
courseName="Course"
enabled
notificationPreferences={mockedPrefs}

View File

@ -26,6 +26,7 @@ function defaultProps(overrides) {
contextName: 'Course01',
enabled: false,
updatePreference: jest.fn(),
userId: '1',
notificationPreferences: {channels: []},
...overrides
}