-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(app, components, shared-data, protocol-designer, react-api-c…
…lient): update to react 18 (#14114) Update all react projects to react 18 and manage its sub dependencies Co-authored-by: Shlok Amin <[email protected]>
- Loading branch information
Showing
463 changed files
with
5,641 additions
and
38,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import * as React from 'react' | ||
import { when } from 'jest-when' | ||
import { fireEvent, screen } from '@testing-library/react' | ||
import { renderWithProviders } from '@opentrons/components' | ||
|
||
import { i18n } from '../../i18n' | ||
|
@@ -41,17 +42,17 @@ describe('OnDeviceDisplayAppFallback', () => { | |
}) | ||
|
||
it('should render text and button', () => { | ||
const [{ getByText }] = render(props) | ||
getByText('An unknown error has occurred') | ||
getByText( | ||
render(props) | ||
screen.getByText('An unknown error has occurred') | ||
screen.getByText( | ||
'You need to restart the touchscreen. Then download the robot logs from the Opentrons App and send them to [email protected] for assistance.' | ||
) | ||
getByText('Restart touchscreen') | ||
screen.getByText('Restart touchscreen') | ||
}) | ||
|
||
it('should call a mock function when tapping reload button', () => { | ||
const [{ getByText }] = render(props) | ||
getByText('Restart touchscreen').click() | ||
render(props) | ||
fireEvent.click(screen.getByText('Restart touchscreen')) | ||
expect(mockTrackEvent).toHaveBeenCalledWith({ | ||
name: ANALYTICS_ODD_APP_ERROR, | ||
properties: { errorMessage: 'mock error' }, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.