-
-
Notifications
You must be signed in to change notification settings - Fork 630
feat(frontend): bump @heroui/react from 2.8.10 to 3.0.1 and fix failing tests #4434
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
base: main
Are you sure you want to change the base?
Changes from all commits
0c68c93
ccb77a4
f3fcaec
1d3231e
72a658f
89c8a06
7df6b7f
3395796
8d959ca
f87d9a9
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 |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| const React = require('react') | ||
|
|
||
| const passthrough = (name) => { | ||
| const C = ({ children, className, ...props }) => | ||
|
Check warning on line 4 in frontend/__mocks__/@heroui/react.js
|
||
| React.createElement('div', { 'data-testid': name, className, ...props }, children) | ||
| C.displayName = name | ||
| return C | ||
| } | ||
|
|
||
| module.exports = { | ||
| Breadcrumbs: ({ children, className, separator, 'aria-label': ariaLabel, ...props }) => { | ||
|
Check warning on line 11 in frontend/__mocks__/@heroui/react.js
|
||
| const items = React.Children.toArray(children) | ||
| return React.createElement('nav', { 'aria-label': ariaLabel, className }, | ||
| React.createElement('ol', { 'data-slot': 'list' }, | ||
| items.map((item, i) => | ||
| React.createElement(React.Fragment, { key: i }, | ||
|
Check warning on line 16 in frontend/__mocks__/@heroui/react.js
|
||
| item, | ||
| i < items.length - 1 | ||
| ? React.createElement('li', { 'data-slot': 'separator' }, separator) | ||
| : null | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| }, | ||
| BreadcrumbsItem: ({ children, className, isDisabled, ...props }) => React.createElement('li', { className, 'aria-disabled': isDisabled || undefined, ...props }, children), | ||
|
Check warning on line 26 in frontend/__mocks__/@heroui/react.js
|
||
| BreadcrumbsRoot: passthrough('BreadcrumbsRoot'), | ||
| Button: ({ children, variant, className, ...props }) => React.createElement('button', { 'data-testid': 'dropdown-button', 'data-variant': variant, className, ...props }, children), | ||
|
Check warning on line 28 in frontend/__mocks__/@heroui/react.js
|
||
| ButtonRoot: passthrough('ButtonRoot'), | ||
| Dropdown: ({ children, ...props }) => React.createElement('div', { 'data-testid': 'dropdown' }, children), | ||
|
Check warning on line 30 in frontend/__mocks__/@heroui/react.js
|
||
| DropdownTrigger: ({ children }) => React.createElement('div', { 'data-testid': 'dropdown-trigger' }, children), | ||
|
Check warning on line 31 in frontend/__mocks__/@heroui/react.js
|
||
| DropdownMenu: ({ children, onAction, selectedKeys, selectionMode, ...props }) => React.createElement('div', { 'data-testid': 'dropdown-menu', 'data-selected-keys': selectedKeys, 'data-selection-mode': selectionMode, ...props }, children), | ||
|
Check warning on line 32 in frontend/__mocks__/@heroui/react.js
|
||
| DropdownItem: ({ children, onPress, ...props }) => React.createElement('div', { 'data-testid': 'dropdown-item', onClick: onPress, ...props }, children), | ||
|
Check warning on line 33 in frontend/__mocks__/@heroui/react.js
|
||
| DropdownSection: ({ children, 'data-title': title, ...props }) => React.createElement('div', { 'data-testid': 'dropdown-section', 'data-title': title, ...props }, title ? React.createElement('span', { 'data-testid': 'dropdown-section-title' }, title) : null, children), | ||
|
Check warning on line 34 in frontend/__mocks__/@heroui/react.js
|
||
| DropdownRoot: passthrough('DropdownRoot'), | ||
| DropdownPopover: passthrough('DropdownPopover'), | ||
| Input: ({ className, id, type, value, onChange, placeholder, ...props }) => React.createElement('input', { id, type: type || 'text', value, onChange, placeholder, className }), | ||
|
Check warning on line 37 in frontend/__mocks__/@heroui/react.js
|
||
| InputRoot: passthrough('InputRoot'), | ||
| Autocomplete: passthrough('Autocomplete'), | ||
| AutocompleteRoot: passthrough('AutocompleteRoot'), | ||
| ListBoxItem: ({ children, ...props }) => React.createElement('div', props, children), | ||
|
Check warning on line 41 in frontend/__mocks__/@heroui/react.js
|
||
| PaginationRoot: passthrough('PaginationRoot'), | ||
| PaginationContent: passthrough('PaginationContent'), | ||
| PaginationItem: passthrough('PaginationItem'), | ||
| PaginationLink: passthrough('PaginationLink'), | ||
| PaginationPrevious: passthrough('PaginationPrevious'), | ||
| PaginationNext: passthrough('PaginationNext'), | ||
| PaginationEllipsis: passthrough('PaginationEllipsis'), | ||
| ToastProvider: () => null, | ||
| Tooltip: passthrough('Tooltip'), | ||
| Modal: passthrough('Modal'), | ||
| ModalRoot: passthrough('ModalRoot'), | ||
| ModalBody: passthrough('ModalBody'), | ||
| ModalHeader: passthrough('ModalHeader'), | ||
| ModalFooter: passthrough('ModalFooter'), | ||
| ModalContent: passthrough('ModalContent'), | ||
| ModalTrigger: passthrough('ModalTrigger'), | ||
| Skeleton: passthrough('Skeleton'), | ||
| Select: passthrough('Select'), | ||
| SelectItem: passthrough('SelectItem'), | ||
| addToast: jest.fn(), | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.