-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Dialog] Forward refs #14775
[Dialog] Forward refs #14775
Conversation
@@ -227,6 +229,7 @@ class Dialog extends React.Component { | |||
onClick={this.handleBackdropClick} | |||
onMouseDown={this.handleMouseDown} | |||
role="document" | |||
data-mui-test="FakeBackdrop" |
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.
Not happy with that but we need this for testing backdrop related stuff.
onEscapeKeyDown={onEscapeKeyDown} | ||
onClose={onClose} | ||
hideOnBackdropClick={false} | ||
hideOnEscapeKeyUp={false} |
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.
These were renamed previously. Another advantage of mount over shallow.
assert.strictEqual(paper.hasClass(classes.paper), true); | ||
}); | ||
|
||
it('should not be open by default', () => { |
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.
Disregarding that the very next test contradicts this it should be neither by default. open
is required.
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.
😆
@@ -84,133 +93,118 @@ describe('<Dialog />', () => { | |||
assert.strictEqual(wrapper.hasClass('woofDialog'), true); | |||
}); | |||
|
|||
it('should render Fade > div > Paper > children inside the Modal', () => { |
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.
That test isn't very useful since there a many other intermediary components. This test compounds many other test anyway and can be safely removed.
Details of bundle changes.Comparing: b8a3336...11dd958
|
110a8de
to
1666dc7
Compare
f1444c7
to
11dd958
Compare
Breaking change
Continues #14536