This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Eliminate yarn test spam #1024
Merged
Merged
Eliminate yarn test spam #1024
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3604978
remove "Network status set to (true|false)" message
lieut-data d548f3d
work around UnhandledPromiseRejectionWarning errors from localforage
lieut-data c99562f
fix missing props in tests
lieut-data 73b5fcb
skip passing showEmailAddress from ProfilePopver to the Popover boots…
lieut-data b331b43
eliminate unneeded warning in getPrefix
lieut-data 9a49fde
fix spurious state in rhs reducer tests
lieut-data dc6d2a4
leverage jest-canvas-mock to avoid warnings from the doughnut chart
lieut-data b7c99d9
fail the build on console messages
lieut-data ab47e5b
Revert "skip passing showEmailAddress from ProfilePopver to the Popov…
lieut-data 688c6b8
just remove showEmailAddress in the profile popover unit tests
lieut-data 7642e80
define STORE_REHYDRATION_FAILED locally vs. in mattermost-redux, for now
lieut-data e480ec1
Merge remote-tracking branch 'origin/master' into eliminate-yarn-test…
lieut-data b209749
fix recently broken unit tests
lieut-data File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix missing props in tests
- Loading branch information
commit c99562f11cb1d2f6c14cc328af80905feacd98f3
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,18 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
show: true, | ||
onHide: () => {}, //eslint-disable-line no-empty-function | ||
channel: {id: 'channel_id', display_name: 'channel_display_name'}, | ||
channelMember: {notify_props: {desktop: NotificationLevels.ALL}}, | ||
currentUser: {id: 'current_user_id', notify_props: {desktop: NotificationLevels.ALL}}, | ||
channelMember: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required props. |
||
notify_props: { | ||
desktop: NotificationLevels.ALL, | ||
mark_unread: NotificationLevels.ALL, | ||
}, | ||
}, | ||
currentUser: { | ||
id: 'current_user_id', | ||
notify_props: { | ||
desktop: NotificationLevels.ALL, | ||
}, | ||
}, | ||
sendPushNotifications: true, | ||
actions: { | ||
updateChannelNotifyProps: () => {}, //eslint-disable-line no-empty-function | ||
|
@@ -99,7 +109,12 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleSubmitMarkUnreadLevel', () => { | ||
const channelMember = {notify_props: {mark_unread: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.ALL, | ||
}, | ||
}; | ||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
@@ -120,7 +135,12 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleUpdateMarkUnreadLevel', () => { | ||
const channelMember = {notify_props: {mark_unread: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.ALL, | ||
}, | ||
}; | ||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
@@ -132,7 +152,12 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleUpdateMarkUnreadSection', () => { | ||
const channelMember = {notify_props: {mark_unread: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.ALL, | ||
}, | ||
}; | ||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
@@ -154,7 +179,13 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleSubmitPushNotificationLevel', () => { | ||
const channelMember = {notify_props: {push: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.NONE, | ||
push: NotificationLevels.ALL, | ||
}, | ||
}; | ||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
@@ -175,7 +206,13 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleUpdatePushNotificationLevel', () => { | ||
const channelMember = {notify_props: {push: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.NONE, | ||
push: NotificationLevels.ALL, | ||
}, | ||
}; | ||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
@@ -187,7 +224,14 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () | |
}); | ||
|
||
test('should match state on handleUpdatePushSection', () => { | ||
const channelMember = {notify_props: {push: NotificationLevels.ALL}}; | ||
const channelMember = { | ||
notify_props: { | ||
desktop: NotificationLevels.NONE, | ||
mark_unread: NotificationLevels.NONE, | ||
push: NotificationLevels.ALL, | ||
}, | ||
}; | ||
|
||
const props = {...baseProps, channelMember}; | ||
const wrapper = shallow( | ||
<ChannelNotificationsModal {...props}/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code handles these not being present.