-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[v4] Export TestProvider with defaults and fix typescript react issue #1810
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,18 +102,4 @@ describe('<FileUpload />', () => { | |
fileUpload.setProps({children: <FileUpload />}); | ||
expect(fileUpload.find(TextStyle).text()).toBe('or drop files to upload'); | ||
}); | ||
|
||
it('does not use default action title and hint when props are changed', () => { | ||
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. This test failed in the conversion and I deleted it since we don't need it anymore. When this component was a class we stored this on state and this was a regression test however we don't follow that pattern in our functional component so 🔥 |
||
const actionTitle = 'Add file title'; | ||
const actionHint = 'or drop files to upload hint'; | ||
const fileUpload = mountWithAppProvider( | ||
<DropZoneContext.Provider value={{size: 'large', type: 'file'}}> | ||
<FileUpload actionTitle={actionTitle} actionHint={actionHint} /> | ||
</DropZoneContext.Provider>, | ||
); | ||
|
||
fileUpload.setProps({actionTitle, actionHint}); | ||
|
||
expect(fileUpload.props()).toStrictEqual({actionTitle, actionHint}); | ||
}); | ||
}); |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,11 @@ export * from './types'; | |
export * from './components'; | ||
|
||
export {UnstyledLinkProps, LinkLikeComponent} from './utilities/link'; | ||
export {createPolarisContext} from './utilities/create-polaris-context'; | ||
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. Just as a quick note in a follow-up PR I can probably remove this entirely from polaris |
||
export { | ||
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. These are used in web and we can't get around them for now :( |
||
ScrollLockManagerContext as _SECRET_INTERNAL_SCROLL_LOCK_MANAGER_CONTEXT, | ||
} from './utilities/scroll-lock-manager'; | ||
export { | ||
WithinContentContext as _SECRET_INTERNAL_WITHIN_CONTENT_CONTEXT, | ||
} from './utilities/within-content-context'; | ||
|
||
export {PolarisTestProvider} from './test-utilities/PolarisTestProvider'; |
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.
FrameProvider is inside
TestProvider
so we just need to pass our spies through