From 03e3d300a4c0e451eb6124ac418b0ed469b23a95 Mon Sep 17 00:00:00 2001 From: Anton Lantukh Date: Mon, 17 Jul 2023 21:43:42 +0200 Subject: [PATCH 1/3] feat(project): update react - Update React to 18.2.0 - Update testing librarires and fix tests - Update Node to 18.13.0 --- package.json | 9 +- .../__snapshots__/Account.test.tsx.snap | 2 +- .../Alert/__snapshots__/Alert.test.tsx.snap | 2 +- .../Button/__snapshots__/Button.test.tsx.snap | 2 +- .../CancelSubscriptionForm.test.tsx.snap | 2 +- .../__snapshots__/CardGrid.test.tsx.snap | 2 +- .../__snapshots__/Checkbox.test.tsx.snap | 2 +- .../__snapshots__/CheckoutForm.test.tsx.snap | 2 +- .../ChooseOfferForm.test.tsx.snap | 2 +- .../CollapsibleText.test.tsx.snap | 2 +- .../ConfirmationDialog.test.tsx.snap | 2 +- .../ConfirmationForm.test.tsx.snap | 2 +- .../CreditCardCVCField.test.tsx.snap | 2 +- .../CreditCardExpiryField.test.tsx.snap | 2 +- .../CreditCardNumberField.test.tsx.snap | 2 +- .../DemoConfigDialog.test.tsx.snap | 2 +- .../Dialog/__snapshots__/Dialog.test.tsx.snap | 2 +- .../DialogBackButton.test.tsx.snap | 2 +- .../EditPasswordForm.test.tsx.snap | 2 +- src/components/Epg/Epg.tsx | 4 +- .../__snapshots__/ErrorPage.test.tsx.snap | 2 +- .../__snapshots__/Favorites.test.tsx.snap | 2 +- .../Filter/__snapshots__/Filter.test.tsx.snap | 2 +- .../ForgotPasswordForm.test.tsx.snap | 2 +- .../Form/__snapshots__/Form.test.tsx.snap | 2 +- .../__snapshots__/FormFeedback.test.tsx.snap | 2 +- .../Header/__snapshots__/Header.test.tsx.snap | 2 +- .../__snapshots__/HelperText.test.tsx.snap | 2 +- .../__snapshots__/IconButton.test.tsx.snap | 2 +- .../LanguageMenu/LanguageMenu.test.tsx | 4 +- .../__snapshots__/LanguageMenu.test.tsx.snap | 2 +- .../Link/__snapshots__/Link.test.tsx.snap | 2 +- src/components/LoginForm/LoginForm.test.tsx | 81 +- .../__snapshots__/LoginForm.test.tsx.snap | 66 +- .../Logo/__snapshots__/Logo.test.tsx.snap | 2 +- .../MarkdownComponent.test.tsx.snap | 2 +- .../__snapshots__/MenuButton.test.tsx.snap | 2 +- .../Modal/__snapshots__/Modal.test.tsx.snap | 2 +- .../ModalCloseButton.test.tsx.snap | 2 +- .../NoPaymentRequired.test.tsx.snap | 2 +- .../__snapshots__/PasswordField.test.tsx.snap | 2 +- .../PasswordStrength.test.tsx.snap | 2 +- .../PayPal/__snapshots__/PayPal.test.tsx.snap | 2 +- .../__snapshots__/Payment.test.tsx.snap | 2 +- .../__snapshots__/PaymentFailed.test.tsx.snap | 2 +- .../PersonalDetailsForm.test.tsx.snap | 2 +- .../Player/__snapshots__/Player.test.tsx.snap | 2 +- .../__snapshots__/Popover.test.tsx.snap | 2 +- .../Radio/__snapshots__/Radio.test.tsx.snap | 2 +- .../RegistrationForm.test.tsx.snap | 2 +- .../RenewSubscriptionForm.test.tsx.snap | 2 +- .../ResetPasswordForm.test.tsx.snap | 2 +- .../__snapshots__/SearchBar.test.tsx.snap | 2 +- .../__snapshots__/ShareButton.test.tsx.snap | 2 +- .../Shelf/__snapshots__/Shelf.test.tsx.snap | 2 +- .../__snapshots__/Sidebar.test.tsx.snap | 2 +- .../SubscriptionCancelled.test.tsx.snap | 2 +- .../SubscriptionRenewed.test.tsx.snap | 2 +- .../__snapshots__/TextField.test.tsx.snap | 2 +- src/components/TileDock/TileDock.tsx | 6 +- .../__snapshots__/UserMenu.test.tsx.snap | 2 +- .../__snapshots__/VideoDetails.test.tsx.snap | 2 +- src/components/VideoLayout/VideoLayout.tsx | 2 +- .../__snapshots__/Welcome.test.tsx.snap | 2 +- .../__snapshots__/AccountModal.test.tsx.snap | 2 +- .../AdyenInitialPayment.tsx | 4 +- .../AdyenPaymentDetails.tsx | 2 +- .../Cinema/__snapshots__/Cinema.test.tsx.snap | 2 +- .../Layout/__snapshots__/Layout.test.tsx.snap | 2 +- src/containers/ShelfList/ShelfList.tsx | 75 +- src/hooks/useLiveChannels.test.ts | 194 +- src/hooks/useLiveChannels.ts | 10 +- src/hooks/useLiveProgram.test.ts | 44 +- src/hooks/useLiveProgram.ts | 2 +- src/hooks/usePlanByEpg.test.ts | 18 +- src/hooks/usePlanByEpg.ts | 59 +- .../About/__snapshots__/About.test.tsx.snap | 2 +- .../Home/__snapshots__/Home.test.tsx.snap | 2 +- src/pages/LegacySeries/LegacySeries.tsx | 52 +- .../PlaylistLiveChannels.tsx | 4 +- src/pages/User/User.test.tsx | 11 +- .../User/__snapshots__/User.test.tsx.snap | 2 +- src/stores/utils.ts | 4 +- test/testUtils.tsx | 21 +- yarn.lock | 7489 ++++++++--------- 85 files changed, 4207 insertions(+), 4080 deletions(-) diff --git a/package.json b/package.json index 858ce8f44..26037de62 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "JW Player", "private": true, "engines": { - "node": ">=18.0.0" + "node": ">=18.13.0" }, "scripts": { "prepare": "husky install", @@ -69,9 +69,8 @@ "@codeceptjs/configure": "^0.8.0", "@commitlint/cli": "^12.1.1", "@commitlint/config-conventional": "^12.1.1", - "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^11.2.6", - "@testing-library/react-hooks": "^8.0.1", + "@testing-library/jest-dom": "^5.16.5", + "@testing-library/react": "^14.0.0", "@types/dompurify": "^2.3.4", "@types/ini": "^1.3.31", "@types/jwplayer": "^8.2.13", @@ -128,7 +127,7 @@ "vite-plugin-pwa": "^0.14.0", "vite-plugin-static-copy": "^0.13.0", "vite-plugin-stylelint": "^4.0.1", - "vitest": "^0.32.3", + "vitest": "^0.33.0", "workbox-build": "^6.5.4", "workbox-window": "^6.5.4" }, diff --git a/src/components/Account/__snapshots__/Account.test.tsx.snap b/src/components/Account/__snapshots__/Account.test.tsx.snap index 69ec023a0..52dbbf55e 100644 --- a/src/components/Account/__snapshots__/Account.test.tsx.snap +++ b/src/components/Account/__snapshots__/Account.test.tsx.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[` > renders and matches snapshot 1`] = `
diff --git a/src/components/Alert/__snapshots__/Alert.test.tsx.snap b/src/components/Alert/__snapshots__/Alert.test.tsx.snap index b9fdf7f5d..d1a435c3b 100644 --- a/src/components/Alert/__snapshots__/Alert.test.tsx.snap +++ b/src/components/Alert/__snapshots__/Alert.test.tsx.snap @@ -1,3 +1,3 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[` > renders and matches snapshot 1`] = `
`; diff --git a/src/components/Button/__snapshots__/Button.test.tsx.snap b/src/components/Button/__snapshots__/Button.test.tsx.snap index 8642b5e18..766a87a85 100644 --- a/src/components/Button/__snapshots__/Button.test.tsx.snap +++ b/src/components/Button/__snapshots__/Button.test.tsx.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`