Skip to content
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

build(deps): upgrade to react 18 #700

Merged
merged 26 commits into from
Dec 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6f0f2a2
build(deps): update jest-watch-typeahead from v0.6.5 to v2.2.2
theborakompanioni Nov 26, 2023
47f45df
build(deps): update jest-websocket-mock to v2.5.0
theborakompanioni Nov 26, 2023
f557587
build(deps): update to react 18 (wip)
theborakompanioni Nov 27, 2023
caa3d23
fix(test): Wallet component tests after upgrade to react 18
theborakompanioni Nov 27, 2023
305dded
fix(test): Wallets component tests after upgrade to react 18
theborakompanioni Nov 27, 2023
61d0d9e
fix(test): fix other tests after update to react 18
theborakompanioni Nov 27, 2023
76a2959
build(deps): update i18next dependencies
theborakompanioni Nov 27, 2023
863b494
fix(ts): fix typescript errors after update to react 18
theborakompanioni Nov 27, 2023
3ef9e5d
fix: use createRoot in index.tsx
theborakompanioni Nov 27, 2023
025f721
build(deps): update react-router-dom to v6.20.0
theborakompanioni Nov 27, 2023
f283e8b
refactor: WebsocketContext from jsx to tsx
theborakompanioni Nov 27, 2023
e2e03bc
refactor: ShareButton from jsx to tsx
theborakompanioni Nov 27, 2023
34319af
refactor: i18n files from js to ts
theborakompanioni Nov 27, 2023
8690fe8
chore(build): disallow javascript
theborakompanioni Nov 27, 2023
055adea
chore: adhere to new i18next release rules
theborakompanioni Nov 27, 2023
7172130
ui: add success page to wallet import flow
theborakompanioni Nov 27, 2023
77100d4
chore: enable react-router v7 futures
theborakompanioni Nov 27, 2023
86f34ae
chore(build): prevent build warning by installing babel plugin
theborakompanioni Nov 27, 2023
3b00259
chore(test): prevent test env warning
theborakompanioni Nov 27, 2023
0f01425
build(deps): update build dependencies
theborakompanioni Nov 27, 2023
6cbaf6b
fix(test): prevent log message in Wallets.test.tsx
theborakompanioni Nov 27, 2023
3426583
test(websocket): enable websocket indicator test in App.test.tsx
theborakompanioni Nov 27, 2023
564b239
ui(import): add link to main wallet view to import success page
theborakompanioni Nov 30, 2023
0f02a2e
build(deps): update react-bootstrap to v2.9.1
theborakompanioni Dec 1, 2023
b281208
build(deps): update dependencies
theborakompanioni Dec 1, 2023
d677e8c
chore: remove in-flight session request handling
theborakompanioni Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(test): Wallet component tests after upgrade to react 18
theborakompanioni committed Dec 1, 2023
commit caa3d237c7ae7c4ebcf5ef0857a788718ca5f4e3
14 changes: 4 additions & 10 deletions src/components/Wallet.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { BrowserRouter } from 'react-router-dom'
import { render, screen, waitFor } from '../testUtils'
import { act } from 'react-dom/test-utils'
import { render, screen, waitFor, act } from '@testing-library/react'
import user from '@testing-library/user-event'
import * as apiMock from '../libs/JmWalletApi'
import { walletDisplayName } from '../utils'
@@ -68,16 +67,14 @@ describe('<Wallet />', () => {
expect(screen.queryByText('wallets.wallet_preview.button_open')).not.toBeInTheDocument()
expect(screen.queryByText('wallets.wallet_preview.button_lock')).not.toBeInTheDocument()

act(() => {
user.paste(screen.getByPlaceholderText('wallets.wallet_preview.placeholder_password'), dummyPassword)
await act(async () => {
await user.click(screen.getByPlaceholderText('wallets.wallet_preview.placeholder_password'))
await user.paste(dummyPassword)
})

await act(async () => {
const unlockWalletButton = screen.getByText('wallets.wallet_preview.button_unlock')
await user.click(unlockWalletButton)

await waitFor(() => screen.findByText(/wallets.wallet_preview.button_unlocking/))
await waitFor(() => screen.findByText('wallets.wallet_preview.button_unlock'))
})

expect(mockUnlockWallet).toHaveBeenCalledWith(dummyWalletFileName, dummyPassword)
@@ -132,9 +129,6 @@ describe('<Wallet />', () => {
await act(async () => {
const lockWalletButton = screen.getByText('wallets.wallet_preview.button_lock')
await user.click(lockWalletButton)

await waitFor(() => screen.findByText(/wallet_preview.button_locking/))
await waitFor(() => screen.findByText('wallets.wallet_preview.button_lock'))
})

expect(mockLockWallet).toHaveBeenCalledWith(dummyWalletFileName, { confirmed: false })