-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] Update React - preparations #1392
Conversation
@@ -1,5 +0,0 @@ | |||
// https://github.com/Microsoft/TypeScript/issues/24599 | |||
declare module 'prop-types' { |
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 was causing namespace issues
import {polarisAppProviderContextTypes} from '../types'; | ||
import AppProvider from '../AppProvider'; | ||
|
||
describe('<AppProvider />', () => { | ||
it('passes i18n and withComponent properties to context', () => { |
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 test will be updated and improved when we switch AppProvider
to the new context API
@@ -312,18 +312,20 @@ describe('<Modal>', () => { | |||
}); | |||
|
|||
describe('with app bridge', () => { | |||
let AppBridgeModalCreate: jest.SpyInstance; |
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 next few files are using jest API to spy on functions rather than overwrite the function with a spy
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.
Nice work, I added some onChange
for error logs in tests if you can have a look at those.
6a6b6a8
to
862a709
Compare
Add types to test until Remove polaris context namespace Remove frame namespace Export createContext result Small quaility change Rename context wrapper Update themeprovider namespace Add type Add theme context to util Update type name for app provider context Update test utility and revert tsconfig changee
Convert ScrollTo Remove dropzone context from index Convert navigation Convert combobox Convert withincontext Update frame context Update resourcelist context Update themeprovider context Update appprovider context Touchups changelog Update appprovider context type Rename file
Update context
[v4] Add usePolaris/AppBridge
[AppProvider] Update context
Remove testID warning
@danrosenthal I was planning on merging this into |
No need, was just adding us there so we could follow along. |
WHY are these changes introduced?
Unfortunately we cannot continue updating our react components to prepare for react 16.8.* until we update to 16.8.* 😅 Enzyme doesn't support the new context at our current version, a bump in the version require a bump in other packages require a bump in react
WHAT is this pull request doing?
Updating react / enzyme