-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This was originally added in a bid to track down a now resolved issue, and thus is no longer needed.
@@ -200,6 +200,7 @@ class ProfilePopover extends React.Component { | |||
delete popoverProps.hasMention; | |||
delete popoverProps.dispatch; | |||
delete popoverProps.enableWebrtc; | |||
delete popoverProps.showEmailAddress; |
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.
Injected by the connector but wasn't removed, like enableWebrtc
, and ended up incorrectly as a DOM property.
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.
I think we are not using showEmailAddress at all, so, the solution would be remove that from the connect function.
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.
Ooh, I like that better -- somehow, I thought this was being passed in via a plugin, but you're right that it's only part of the pluggable unit tests.
@@ -76,12 +76,12 @@ export default class Sidebar extends React.PureComponent { | |||
/** | |||
* Current team object | |||
*/ | |||
currentTeam: PropTypes.object.isRequired, | |||
currentTeam: PropTypes.object, |
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.
@@ -88,6 +88,7 @@ | |||
"image-webpack-loader": "3.6.0", | |||
"imports-loader": "0.7.1", | |||
"jest": "22.1.4", | |||
"jest-canvas-mock": "1.0.2", |
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.
So that the doughtnut chart doesn't throw errors about getContext
not being defined.
@@ -73,7 +73,7 @@ export default function configureStore(initialState) { | |||
const storage = localforage; | |||
const KEY_PREFIX = 'reduxPersist:'; | |||
|
|||
localforage.ready(() => { | |||
localforage.ready().then(() => { |
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.
See localForage/localForage#722 for more details.
store/index.js
Outdated
@@ -135,6 +135,11 @@ export default function configureStore(initialState) { | |||
}); | |||
} | |||
}); | |||
}).catch((error) => { | |||
store.dispatch({ | |||
type: General.STORE_REHYDRATION_FAILED, |
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.
I've got a pending PR to add this constant to mattermost-redux... if we think we need it. No one is going to handle it right now. Feedback requested!
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.
I'm not sure if I prefer simply a log message for now. Anyway, I think it must be in the webapp redux flow, not in the mattermost-redux one. Because all the storage thing is handle independently from RN app and webapp.
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.
I'll move the constant locally -- the log message would defeat the point of this change, at present ;P
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.
hahaha, you are completely right, I'm an idiot :)
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Required props.
@@ -20,3 +20,15 @@ Object.defineProperty(document, 'queryCommandSupported', { | |||
Object.defineProperty(document, 'execCommand', { | |||
value: (cmd) => supportedCommands.includes(cmd), | |||
}); | |||
|
|||
beforeEach(() => { |
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.
Don't let this regress in the future.
@@ -8,7 +8,6 @@ const MIN_NETWORK_RETRY_TIME = 3000; // 3 sec | |||
const MAX_NETWORK_RETRY_TIME = 300000; // 5 mins | |||
|
|||
function handle(callback, online) { | |||
console.log('Network status set to ' + online); //eslint-disable-line no-console |
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.
Checked with author: no longer needed.
@@ -9,8 +9,6 @@ export function getPrefix(state) { | |||
} | |||
} | |||
|
|||
console.warn('Storage tried to operate without user present'); //eslint-disable-line no-console |
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.
Checked with author: no longer needed.
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.
I think we must remove the showEmailAddress property. The other comment related to REHYDRATATION, I'm ok with your proposed solution (in mattermost-webapp, not in mattermost-redux).
Agree with @jespino |
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.
👍
Hmm, I'm confused -- not seeing these test failures locally, nor in the previous build. I'll investigate. |
Looks like just some recent regressions on exactly this front, now also fixed. Going forward, this will be caught by individual developers. |
cb41cfe
to
b209749
Compare
Summary
Finding it hard to iterate on webapp unit tests when there's so many console logs and warnings scrolling by. This set of commits eliminates them -- comments below where it's not obvious how or why.
It also adds a global override on
console.(log|warn|error)
to throw anError
and prevent future such issues.Ticket Link
None.
Checklist
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed