-
Notifications
You must be signed in to change notification settings - Fork 165
Update Codebase to use React 16 - DO NOT MERGE #1175
Conversation
@StephenEsser more to come as well! Almost all the wdio snapshots need to be updated :O |
We need to fix all the screenshots that were just on the element and now are full page. Those waste size and less sensitive to visual diffs. |
@mhemesath Yeah I'm gonna sync with Jake with he's back in the office to get these updated. Should cut the file diff down a ton. |
Seeing a few console errors on different pages. Mainly just minor prop-type stuff. Error
Error
Error
Error
Error
|
Need to look into the branch deployment for this. It is currently failing out when trying to run webpack. It looks like its calling webpack before maybe npm install has run?
|
<DatePicker | ||
name="date-input" | ||
/> | ||
<div> |
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.
Oops. I think something happened here 😅
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.
Totally forgot about this!
I had issues using popper, and so I created a large scroll page to test scrolling with popper. This can all be undone.
@@ -139,7 +139,7 @@ module.exports = resizeTo(['tiny', 'huge'], { | |||
|
|||
browser.expect.element('.react-datepicker').to.be.present; | |||
|
|||
browser.click('.react-datepicker__today-button'); | |||
browser.click('[aria-label="day-10"]'); |
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.
Is this mapped to the same button?
@@ -67,6 +67,7 @@ const defaultProps = { | |||
const contextTypes = { | |||
/* eslint-disable consistent-return */ | |||
intl: (context) => { | |||
console.log('Intl Checking'); |
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.
Needs removed
const banner = shallow(<IntlProvider locale={locale} messages={messages}><DemographicsBanner /></IntlProvider>); | ||
expect(banner).toMatchSnapshot(); | ||
}); | ||
|
||
it('renders the banner wrapper with all props', () => { | ||
xit('renders the banner wrapper with all props', () => { |
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.
uncomment
@@ -8,12 +8,12 @@ import messages from '../../translations/en-US.json'; | |||
|
|||
const locale = 'en-US'; | |||
|
|||
it('renders a blank banner wrapper', () => { | |||
xit('renders a blank banner wrapper', () => { |
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.
uncomment
@@ -51,12 +51,12 @@ describe('Heading', () => { | |||
// Prop Tests | |||
it('should have all props including customProps set correctly', () => { | |||
const heading = shallow(<Heading level={1} id="id" size="small" color="#f00" weight={200} isItalic isVisuallyHidden>All props and custom attrs</Heading>); |
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.
Could we add a snapshot test here instead? All of this could be removed then
@@ -7,7 +7,7 @@ it('should shallow a default component', () => { | |||
expect(hookshot).toMatchSnapshot(); | |||
}); | |||
|
|||
it('should render a default component', () => { | |||
xit('should render a default component', () => { |
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.
uncomment
@@ -81,7 +81,7 @@ const IconBase = ({ | |||
|
|||
attributes.height = height; | |||
attributes.width = width; | |||
attributes.focusable = focusable; | |||
attributes.focusable = focusable.toString(); |
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.
What did we make this change?
@@ -3,6 +3,8 @@ Changelog | |||
|
|||
Unreleased | |||
---------- | |||
### Changed |
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.
This isn't needed
@@ -3,6 +3,8 @@ Changelog | |||
|
|||
Unreleased | |||
---------- | |||
### Changed |
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.
This isn't needed
@@ -11,7 +11,7 @@ it('should mount an open modal', () => { | |||
expect(modal).toMatchSnapshot(); | |||
}); | |||
|
|||
it('should render an open modal', () => { | |||
xit('should render an open 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.
uncomment
@@ -7,7 +7,7 @@ it('should shallow a default component', () => { | |||
expect(popup).toMatchSnapshot(); | |||
}); | |||
|
|||
it('should render a default component', () => { | |||
xit('should render a default component', () => { |
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.
uncomment
@@ -15,7 +15,6 @@ class DefaultPopup extends React.Component { | |||
this.overlayStyle = document.documentElement.style.overflow; | |||
this.overlayId = document.documentElement.id; | |||
document.documentElement.id = 'popup-overlay-test'; | |||
document.documentElement.style.overflow = 'auto'; |
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.
Why was this removed?
@@ -114,8 +114,9 @@ | |||
"postcss-loader": "^2.0.6", | |||
"postcss-rtl": "^1.1.2", | |||
"raw-loader": "^0.5.1", | |||
"react": "^15.4.2", | |||
"react-dom": "^15.4.2", | |||
"raf": "^3.4.0", |
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.
What is raf?
@@ -23,6 +23,7 @@ const threadLoaderRule = { | |||
|
|||
module.exports = { | |||
entry: { | |||
raf: 'raf/polyfill', |
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.
Why are we using two polyfills now? Will this be required by all consumers?
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.
React 16 requires request animation frame. https://reactjs.org/blog/2017/09/26/react-v16.0.html
@@ -38,9 +38,9 @@ it('should render a arrange with status and customProps', () => { | |||
it('should have all props including customProps set correctly', () => { | |||
const arrangeWithStatus = <Status color="green" id="id" >{arrange}</Status>; | |||
const wrapper = shallow(arrangeWithStatus); |
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 can update this to a screenshot & jest will do this comparison for us
@@ -18,12 +18,6 @@ export default class TimeInputElement extends React.Component { | |||
} | |||
} | |||
|
|||
componentWillUnmount() { |
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.
Is this a 16 change? Should this be moved else where?
@@ -21,9 +21,11 @@ describe('Toggle', () => { | |||
// Prop Tests | |||
it('should have all props set correctly', () => { | |||
const toggle = shallow(<Toggle isAnimated isOpen>All props</Toggle>); |
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 can update this to a screenshot & jest will do this comparison for us
We shouldn't need to check in the DEPENDENCIES.md files. That'll get updated during |
Generated by 🚫 dangerJS |
I'll close this soon and put out a more throughouh review. I wanted a link for functional testing, and also wanted to test the Travis CI builds. I'll be sure to address the comments in this review. |
Closing. I think I have enough info to verify my next pull request will operate. I'll make sure all comments here are addressed. |
Resolves #658
Testing Branch for SD's to test terra core against.
You can find React 16 here: https://terra-core-deployed-pr-1175.herokuapp.com/static/#/site
ghfilter