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

Feature/upgrade react and tests #20653

Merged
merged 257 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
ca30218
update react version
vraja-pro Sep 20, 2023
0255313
remove enzyme
vraja-pro Sep 20, 2023
6f5c09c
restore styled components version
vraja-pro Sep 20, 2023
79796fd
restore ImageSelectTest
vraja-pro Sep 20, 2023
b935644
restore twitter and facebook preview tests
vraja-pro Sep 20, 2023
2cf660b
groundwork for search metadata previews
vraja-pro Sep 20, 2023
5fb6e1f
upgrade react version for analysis-report
vraja-pro Sep 20, 2023
98ec2bd
bump react version in helpers
vraja-pro Sep 20, 2023
631bcc6
replacement variable editor groundwork
vraja-pro Sep 20, 2023
00903d2
fix lint for ReplacementVariableEditorTest before converting test
vraja-pro Sep 21, 2023
9aa5a0e
add react testing library to dev dependencies in root
vraja-pro Sep 21, 2023
8a5bc17
add react testing library to components package
vraja-pro Sep 21, 2023
6237789
removed enzyme configuration
vraja-pro Sep 21, 2023
32c9f0c
remove enzyme configuration from yoast-components
vraja-pro Sep 21, 2023
f573431
remove enzyme configuration from setup of yoast-components
vraja-pro Sep 21, 2023
405fc95
remove enzyme configuration from setup of components
vraja-pro Sep 21, 2023
32901b7
cleanup enzyme code from AnalysisChecklistTest
vraja-pro Sep 21, 2023
4644d35
cleanup enzyme code from KeywordInput test
vraja-pro Sep 21, 2023
b9b727a
cleanup enzyme code from PrePublish test
vraja-pro Sep 21, 2023
98a286d
cleanup enzyme code from SEMrushCountrySelector test
vraja-pro Sep 21, 2023
1458dc6
Cleanup enzyme code from SEMrushKeyphrasesTable
vraja-pro Sep 21, 2023
3014443
cleanup enzyme code from SEMrushRelatedKeyphrasesModal test
vraja-pro Sep 21, 2023
c140050
cleanup enzyme code from WincherKeyphrasesTable test
vraja-pro Sep 21, 2023
d38a364
cleanup enzyme code from WincherTableRow
vraja-pro Sep 21, 2023
7b648ed
Cleanup enzyme code from Indexation test
vraja-pro Sep 21, 2023
35ca1d3
cleanup enzyme code from FleschReadingEase test
vraja-pro Sep 21, 2023
e361449
cleanup enzyme code from insights collapsible test
vraja-pro Sep 21, 2023
ba5eea2
cleanup enzyme code from insight-modal test
vraja-pro Sep 21, 2023
dce5fcf
cleanup enzyme text formality test
vraja-pro Sep 21, 2023
6020cdb
cleanup enzyme code from test-length test
vraja-pro Sep 21, 2023
2154529
cleanup enzyme code from KeywordInput test
vraja-pro Sep 21, 2023
0da68f6
remove screen reader shortcut test
vraja-pro Sep 21, 2023
58880cf
remove yoast modal test
vraja-pro Sep 21, 2023
602ee54
cleanup enzyme code from snippet editor test
vraja-pro Sep 21, 2023
da78903
cleanup enzyme code from snippet preview test
vraja-pro Sep 21, 2023
42e2e7a
cleanup enzyme code from snippet editor test
vraja-pro Sep 21, 2023
ef928ce
cleanup enzyme code from snippet preview test
vraja-pro Sep 21, 2023
d743c1e
remove rtl from components package
vraja-pro Sep 21, 2023
159f668
add renderer to dev dependencies in js package
vraja-pro Sep 21, 2023
2e634d5
fix snapshot for HelpTextWrapper
vraja-pro Sep 21, 2023
92e556c
fix snapshot for image select test
vraja-pro Sep 21, 2023
a7254bc
uncommented test to avoid error
vraja-pro Sep 21, 2023
aac1472
remove snapshot for outdated test
vraja-pro Sep 21, 2023
5438e69
add test utils to testPathIgnorePatterns
vraja-pro Sep 21, 2023
61d886c
remove -u from jest script
vraja-pro Sep 21, 2023
2242f09
removed snapshot tests text-formality-upsell
vraja-pro Sep 21, 2023
9b409cf
remove @wordpress/data mock
vraja-pro Sep 21, 2023
fec91a7
Upgrade @wordpress/element and @testing-library/jest-dom
igorschoester Sep 25, 2023
40c2c89
Fix WP data mock in search test
igorschoester Sep 25, 2023
ac896cb
Seems Jest can not find the root node_modules
igorschoester Sep 25, 2023
9a640fd
Add missing UI lib snapshot
igorschoester Sep 25, 2023
aa5d3cb
Fix shortcut in snapshot
igorschoester Sep 25, 2023
1f63aeb
Fix components tests: prop type warnings
igorschoester Sep 25, 2023
3c1b0b4
Update components snapshot
igorschoester Sep 25, 2023
4029a33
Migrate "it won't allow you to index a non production environment"
igorschoester Sep 25, 2023
bdf1a8e
Migrate "will show you when the indexation is complete"
igorschoester Sep 26, 2023
559caa3
Fix Indexation components React 18 compatibility
igorschoester Sep 26, 2023
3a60352
Migrate "shows an error when something goes wrong"
igorschoester Sep 26, 2023
79f2be5
Migrate "executes registered pre- and postindexing actions"
igorschoester Sep 26, 2023
df6a9ef
Migrate AnalysisCheckList tests
igorschoester Sep 26, 2023
c9eca16
Migrate PrePublish tests
igorschoester Sep 26, 2023
a5f38fa
Merge pull request #20681 from Yoast/20668-migrate-indexation-tests
vraja-pro Sep 26, 2023
8266ef8
Merge pull request #20683 from Yoast/20670-migrate-prepublish-tests
vraja-pro Sep 26, 2023
67a95d4
Merge pull request #20682 from Yoast/20669-migrate-analysis-checklist…
vraja-pro Sep 26, 2023
41858b1
Migrate SEMrushCountrySelector tests
igorschoester Sep 27, 2023
6d8e3a9
Migrate SEMrushKeyphrasesTable tests
igorschoester Sep 27, 2023
1981583
update name of lifecycle hook to remove warnings in tests
vraja-pro Sep 27, 2023
01c1538
migrate replacement variable edito standalone snapshot
vraja-pro Sep 27, 2023
ee5d619
Add SVG mock
igorschoester Sep 27, 2023
4d7fd43
Remove WP components mock
igorschoester Sep 27, 2023
76d1391
Migrate SEMrushRelatedKeyphrasesModal tests
igorschoester Sep 27, 2023
00de594
add test utils
vraja-pro Sep 27, 2023
6a0d219
update dependencies and add eslint dependencies
vraja-pro Sep 27, 2023
8975416
add eslintrc file to replacement variable editor package
vraja-pro Sep 27, 2023
7a2c11d
clean up eslint rules from eslintrc in root
vraja-pro Sep 27, 2023
98d26d2
cleanup rules
vraja-pro Sep 27, 2023
d423694
Update packages/js/tests/components/SEMrushCountrySelector.test.js
vraja-pro Sep 28, 2023
2184cbd
Merge pull request #20686 from Yoast/20671-migrate-semrush-tests
vraja-pro Sep 28, 2023
a35e6fa
WIP refactoring
pls78 Sep 27, 2023
507c113
Move eslint rules to search metadata preview package
vraja-pro Sep 27, 2023
cc390bd
add test utils file
vraja-pro Sep 27, 2023
ba367c2
Update lifecycle hook name to remove warning
vraja-pro Sep 27, 2023
5d910c4
tests for SnippetEditor with testing library
vraja-pro Sep 28, 2023
512a854
add test to check onChange is called
vraja-pro Sep 28, 2023
b20bd17
Add tests
pls78 Sep 29, 2023
6beb4a8
ESlint: ignore 2 more "root" folders
igorschoester Oct 2, 2023
3cc1c6e
Change tabs to spaces for unity
igorschoester Oct 2, 2023
704cfc5
Merge pull request #20685 from Yoast/20675-replacement-variable-edito…
igorschoester Oct 2, 2023
41c43a2
ESlint: ignore 2 more "root" folders
igorschoester Oct 2, 2023
0573a56
Change tabs to spaces for unity
igorschoester Oct 2, 2023
2f0cddc
Change spaces to tabs for unity
igorschoester Oct 2, 2023
aeb0c88
Fix typo
igorschoester Oct 2, 2023
1307c4a
Add missing snapshot for test
igorschoester Oct 2, 2023
3b8197c
Remove unused import
igorschoester Oct 2, 2023
376119d
Merge branch 'feature/upgrade-react-and-tests' into refactor_snippete…
pls78 Oct 2, 2023
1927349
Update packages/search-metadata-previews/tests/SnippetEditorTest.js
pls78 Oct 3, 2023
6e79fc3
Fix wrong override
pls78 Oct 3, 2023
1ee29ed
Remove unused package
pls78 Oct 3, 2023
4ba04a7
Update snapshot
pls78 Oct 3, 2023
a2ca27e
Remove useless section
pls78 Oct 5, 2023
8bddfd4
Revert "Remove useless section"
pls78 Oct 9, 2023
8c19f4f
Remove search-metadata-previews overrides
pls78 Oct 9, 2023
ef40281
Update snapshot
pls78 Oct 9, 2023
c4a1368
Add missing test, and refactoring the existing one.
pls78 Oct 9, 2023
319fb85
Remove no longer used dev dep
igorschoester Oct 11, 2023
0c91892
Merge pull request #20709 from Yoast/refactor_snippeteditor_tests
igorschoester Oct 11, 2023
5c8756c
Migrate KeywordInput tests
igorschoester Oct 16, 2023
a2dea87
Fix @yoast/externals/contexts mocks
igorschoester Oct 16, 2023
2175eef
Fix EditorModal component's React prop type warning
igorschoester Oct 17, 2023
4bde674
Merge pull request #20765 from Yoast/20673-jstestscomponentscontentan…
pls78 Oct 17, 2023
9fc04d8
Migrate FleschReadingEase tests
igorschoester Oct 16, 2023
386ac76
Migrate InsightsCollapsible tests
igorschoester Oct 16, 2023
cdcf989
Migrate InsightsModal tests
igorschoester Oct 17, 2023
a5e0f6b
Migrate TextFormality tests
igorschoester Oct 17, 2023
9ee210a
Migrate TextLength tests
igorschoester Oct 17, 2023
d3c0003
Merge pull request #20771 from Yoast/20674-migrate-insights-feature-t…
thijsoo Oct 17, 2023
4c27c91
Replace packages/js test suite
igorschoester Apr 22, 2023
f6faa1a
Upgrade settings/search tests
igorschoester Apr 22, 2023
52d4eb7
Add peer dependencies of our replacement-variable-editor package to t…
igorschoester Aug 24, 2023
4140aa4
bump wordpress/components
vraja-pro Aug 24, 2023
bf19262
remove enzyme and fix snapshot test
vraja-pro Sep 20, 2023
03245e5
remove enzyme and update react
vraja-pro Sep 20, 2023
7c1363d
fix social twitter and facebook preview tests
vraja-pro Sep 20, 2023
80b8ff9
update react version
vraja-pro Sep 20, 2023
f59789d
remove enzyme
vraja-pro Sep 20, 2023
a3c2cde
restore styled components version
vraja-pro Sep 20, 2023
6dfe36d
restore ImageSelectTest
vraja-pro Sep 20, 2023
792521d
restore twitter and facebook preview tests
vraja-pro Sep 20, 2023
8a0aeb1
groundwork for search metadata previews
vraja-pro Sep 20, 2023
f2c57c3
upgrade react version for analysis-report
vraja-pro Sep 20, 2023
5ae80cb
bump react version in helpers
vraja-pro Sep 20, 2023
ca2137d
replacement variable editor groundwork
vraja-pro Sep 20, 2023
0a7f21f
fix lint for ReplacementVariableEditorTest before converting test
vraja-pro Sep 21, 2023
620efc8
add react testing library to dev dependencies in root
vraja-pro Sep 21, 2023
bc30ad7
add react testing library to components package
vraja-pro Sep 21, 2023
07a23bd
removed enzyme configuration
vraja-pro Sep 21, 2023
9c3c939
remove enzyme configuration from yoast-components
vraja-pro Sep 21, 2023
daf6b0e
remove enzyme configuration from setup of yoast-components
vraja-pro Sep 21, 2023
cf67ce6
remove enzyme configuration from setup of components
vraja-pro Sep 21, 2023
557e5e2
cleanup enzyme code from AnalysisChecklistTest
vraja-pro Sep 21, 2023
5ae315a
cleanup enzyme code from KeywordInput test
vraja-pro Sep 21, 2023
755cae3
cleanup enzyme code from PrePublish test
vraja-pro Sep 21, 2023
181d02f
cleanup enzyme code from SEMrushCountrySelector test
vraja-pro Sep 21, 2023
20d97f8
Cleanup enzyme code from SEMrushKeyphrasesTable
vraja-pro Sep 21, 2023
5096149
cleanup enzyme code from SEMrushRelatedKeyphrasesModal test
vraja-pro Sep 21, 2023
2519749
cleanup enzyme code from WincherKeyphrasesTable test
vraja-pro Sep 21, 2023
09ac99b
cleanup enzyme code from WincherTableRow
vraja-pro Sep 21, 2023
be63d44
Cleanup enzyme code from Indexation test
vraja-pro Sep 21, 2023
38b844d
cleanup enzyme code from FleschReadingEase test
vraja-pro Sep 21, 2023
d536909
cleanup enzyme code from insights collapsible test
vraja-pro Sep 21, 2023
2382d8d
cleanup enzyme code from insight-modal test
vraja-pro Sep 21, 2023
e9e2317
cleanup enzyme text formality test
vraja-pro Sep 21, 2023
e64f622
cleanup enzyme code from test-length test
vraja-pro Sep 21, 2023
598c849
cleanup enzyme code from KeywordInput test
vraja-pro Sep 21, 2023
9186786
remove screen reader shortcut test
vraja-pro Sep 21, 2023
a9dabc7
remove yoast modal test
vraja-pro Sep 21, 2023
cb0ab4f
cleanup enzyme code from snippet editor test
vraja-pro Sep 21, 2023
808a058
cleanup enzyme code from snippet preview test
vraja-pro Sep 21, 2023
8ef9d7b
remove rtl from components package
vraja-pro Sep 21, 2023
2baf0b0
add renderer to dev dependencies in js package
vraja-pro Sep 21, 2023
b1da2c3
fix snapshot for HelpTextWrapper
vraja-pro Sep 21, 2023
6086d02
fix snapshot for image select test
vraja-pro Sep 21, 2023
d354af2
uncommented test to avoid error
vraja-pro Sep 21, 2023
e3119f6
remove snapshot for outdated test
vraja-pro Sep 21, 2023
a19e9f7
add test utils to testPathIgnorePatterns
vraja-pro Sep 21, 2023
bb201ff
removed snapshot tests text-formality-upsell
vraja-pro Sep 21, 2023
63652ca
remove @wordpress/data mock
vraja-pro Sep 21, 2023
a037412
Upgrade @wordpress/element and @testing-library/jest-dom
igorschoester Sep 25, 2023
f56a41a
Fix WP data mock in search test
igorschoester Sep 25, 2023
70613b1
Seems Jest can not find the root node_modules
igorschoester Sep 25, 2023
ff73145
Add missing UI lib snapshot
igorschoester Sep 25, 2023
53dface
Fix shortcut in snapshot
igorschoester Sep 25, 2023
b4c726a
Fix components tests: prop type warnings
igorschoester Sep 25, 2023
e9f1fac
Update components snapshot
igorschoester Sep 25, 2023
00142d8
Migrate "it won't allow you to index a non production environment"
igorschoester Sep 25, 2023
6ea641c
Migrate "will show you when the indexation is complete"
igorschoester Sep 26, 2023
38bd3b3
Fix Indexation components React 18 compatibility
igorschoester Sep 26, 2023
fbc7d6a
Migrate "shows an error when something goes wrong"
igorschoester Sep 26, 2023
be728eb
Migrate "executes registered pre- and postindexing actions"
igorschoester Sep 26, 2023
10eeaa3
Migrate AnalysisCheckList tests
igorschoester Sep 26, 2023
69e1fcf
Migrate PrePublish tests
igorschoester Sep 26, 2023
987f489
Migrate SEMrushCountrySelector tests
igorschoester Sep 27, 2023
8848181
Migrate SEMrushKeyphrasesTable tests
igorschoester Sep 27, 2023
94d5ecb
update name of lifecycle hook to remove warnings in tests
vraja-pro Sep 27, 2023
51e0a01
migrate replacement variable edito standalone snapshot
vraja-pro Sep 27, 2023
4fc02d7
Add SVG mock
igorschoester Sep 27, 2023
5bdef07
Remove WP components mock
igorschoester Sep 27, 2023
2efc805
Migrate SEMrushRelatedKeyphrasesModal tests
igorschoester Sep 27, 2023
006d348
add test utils
vraja-pro Sep 27, 2023
064e1a4
update dependencies and add eslint dependencies
vraja-pro Sep 27, 2023
8265dee
add eslintrc file to replacement variable editor package
vraja-pro Sep 27, 2023
206ca87
clean up eslint rules from eslintrc in root
vraja-pro Sep 27, 2023
3f54878
cleanup rules
vraja-pro Sep 27, 2023
58c8ade
Update packages/js/tests/components/SEMrushCountrySelector.test.js
vraja-pro Sep 28, 2023
f17e8cc
WIP refactoring
pls78 Sep 27, 2023
ebeec29
Move eslint rules to search metadata preview package
vraja-pro Sep 27, 2023
72ab7ad
add test utils file
vraja-pro Sep 27, 2023
704691b
Update lifecycle hook name to remove warning
vraja-pro Sep 27, 2023
bdc7b2e
tests for SnippetEditor with testing library
vraja-pro Sep 28, 2023
434e9f3
add test to check onChange is called
vraja-pro Sep 28, 2023
bd29ee8
Add tests
pls78 Sep 29, 2023
f1d15db
ESlint: ignore 2 more "root" folders
igorschoester Oct 2, 2023
5089694
Change tabs to spaces for unity
igorschoester Oct 2, 2023
3b2b4dc
ESlint: ignore 2 more "root" folders
igorschoester Oct 2, 2023
553d7fb
Change tabs to spaces for unity
igorschoester Oct 2, 2023
9beaee3
Change spaces to tabs for unity
igorschoester Oct 2, 2023
6bc2ccd
Fix typo
igorschoester Oct 2, 2023
0896e33
Add missing snapshot for test
igorschoester Oct 2, 2023
5aa2e54
Remove unused import
igorschoester Oct 2, 2023
a8943c3
Update packages/search-metadata-previews/tests/SnippetEditorTest.js
pls78 Oct 3, 2023
5a7dffc
Fix wrong override
pls78 Oct 3, 2023
1679ba6
Remove unused package
pls78 Oct 3, 2023
b581695
Update snapshot
pls78 Oct 3, 2023
50faa93
Remove useless section
pls78 Oct 5, 2023
b4b6148
Revert "Remove useless section"
pls78 Oct 9, 2023
2cfd333
Remove search-metadata-previews overrides
pls78 Oct 9, 2023
5774dc3
Update snapshot
pls78 Oct 9, 2023
f4873c4
Add missing test, and refactoring the existing one.
pls78 Oct 9, 2023
49a41f8
Remove no longer used dev dep
igorschoester Oct 11, 2023
4a98e69
Migrate KeywordInput tests
igorschoester Oct 16, 2023
5318833
Fix @yoast/externals/contexts mocks
igorschoester Oct 16, 2023
7bee046
Fix EditorModal component's React prop type warning
igorschoester Oct 17, 2023
52d11fb
Migrate FleschReadingEase tests
igorschoester Oct 16, 2023
713c2ce
Migrate InsightsCollapsible tests
igorschoester Oct 16, 2023
51c3d0c
Migrate InsightsModal tests
igorschoester Oct 17, 2023
0da2c1c
Migrate TextFormality tests
igorschoester Oct 17, 2023
d5a8862
Migrate TextLength tests
igorschoester Oct 17, 2023
8156809
Merge remote-tracking branch 'origin/feature/upgrade-react-and-tests'…
vraja-pro Oct 25, 2023
6d2b560
Revert "Merge remote-tracking branch 'origin/feature/upgrade-react-an…
vraja-pro Oct 25, 2023
4a6e172
Merge remote-tracking branch 'origin/trunk' into feature/upgrade-reac…
vraja-pro Oct 25, 2023
198ec3a
Revert "cleanup enzyme text formality test"
vraja-pro Oct 25, 2023
25c6edb
temporary eslint fix
vraja-pro Oct 25, 2023
4e086a5
replaced componentWillReceiveProps with componentDidUpdate
vraja-pro Oct 27, 2023
ac846c4
set state creates an error
vraja-pro Oct 27, 2023
4b8d70f
fix error of setState
vraja-pro Oct 27, 2023
b5c3cb6
Merge pull request #20805 from Yoast/19867-replacing-componentwillrec…
pls78 Oct 30, 2023
c2ccd89
fix react as dependency
vraja-pro Oct 30, 2023
127e19a
fix react dependency
vraja-pro Oct 30, 2023
c1bd345
Merge branch 'trunk' into feature/upgrade-react-and-tests
pls78 Oct 30, 2023
43fed42
migrate WincherKeyphrasesTable tests
vraja-pro Oct 25, 2023
816ef5f
Migrate WincherTableRow tests
vraja-pro Oct 25, 2023
b05fe43
Merge pull request #20799 from Yoast/20672-wincher-tests
pls78 Oct 30, 2023
f143979
cleanup dependencies form root
vraja-pro Oct 30, 2023
cbfbe39
Restore jest dependencies
vraja-pro Oct 31, 2023
b89d96b
Components: move React and ReactDOM to be actual dependencies
igorschoester Oct 31, 2023
a7576a8
ReplacementVariableEditor: move React and ReactDOM to be actual depen…
igorschoester Oct 31, 2023
acad440
SocialMetadataPreviews: remove testing-library again
igorschoester Oct 31, 2023
07ac61c
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/u…
igorschoester Nov 1, 2023
e4d7a80
update eslintrc react version
vraja-pro Nov 28, 2023
d3fb4b3
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/u…
igorschoester Nov 29, 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
15 changes: 1 addition & 14 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parserOptions:

settings:
react:
version: "16.8"
version: "18.2"

rules:
no-prototype-builtins: 0
Expand Down Expand Up @@ -36,19 +36,6 @@ overrides:
react/default-props-match-prop-types: 1
react/no-unused-prop-types: 1
require-jsdoc: 1
- files:
- "packages/replacement-variable-editor/**/*.js"
rules:
react/jsx-no-bind: 1
react/require-default-props: 1
- files:
- "packages/search-metadata-previews/**/*.js"
rules:
react/jsx-no-bind: 1
react/no-unused-state: 1
react/no-access-state-in-setstate: 1
react/require-default-props: 1
react/default-props-match-prop-types: 1
- files:
- "packages/yoastseo/**/*.js"
settings:
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"prestart": "grunt build:css && grunt copy:js-dependencies",
"start": "wp-scripts start --config config/webpack/webpack.config.js"
},
"dependencies": {},
"dependencies": {
"@draft-js-plugins/mention": "^5.0.0",
"draft-js": "^0.11.7"
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@slack/webhook": "^5.0.2",
Expand All @@ -56,9 +59,6 @@
"core-js": "^2.6.12",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.1",
"eslint": "^7.32.0",
"eslint-config-yoast": "^6.0.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
Expand All @@ -74,9 +74,6 @@
"node-fetch": "^2.6.1",
"postcss": "^8.4.14",
"postcss-cli": "^9.1.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-test-renderer": "^16.14.0",
"readline-sync": "^1.4.9",
"shusher": "^0.1.1",
"tmp": "^0.1.0",
Expand Down
10 changes: 4 additions & 6 deletions packages/analysis-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"@yoast/style-guide": "^0.13.0",
"lodash": "^4.17.11",
"prop-types": "^15.6.0",
"styled-components": "^5.3.6"
"styled-components": "^5.3.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/core": "^7.17.10",
Expand All @@ -39,11 +41,7 @@
"eslint-plugin-react": "^7.29.4",
"jest": "^27.5.1",
"jest-styled-components": "^7.0.8",
"react-test-renderer": "^16.14.0"
},
"peerDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-test-renderer": "^18.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 0 additions & 4 deletions packages/components/jest/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
import "raf/polyfill";
import "jest-styled-components";
import Enzyme from "enzyme";
import EnzymeAdapter from "enzyme-adapter-react-16";

Enzyme.configure( { adapter: new EnzymeAdapter() } );
10 changes: 3 additions & 7 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"interpolate-components": "^1.1.1",
"lodash": "^4.17.11",
"prop-types": "^15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-modal": "^3.8.1",
"react-select": "^3.1.0",
"react-tabs": "^2.3.0",
Expand All @@ -44,15 +46,9 @@
"devDependencies": {
"@yoast/browserslist-config": "^1.2.2",
"browserslist": "^4.7.3",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"jest-styled-components": "^7.0.3",
"raf": "^3.4.0",
"react-test-renderer": "^16.14.0"
},
"peerDependencies": {
"react": "^16.14.0",
"react-dom": "^16.14.0"
"react-test-renderer": "^18.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
70 changes: 0 additions & 70 deletions packages/components/tests/ScreenReaderShortcutTest.js

This file was deleted.

12 changes: 8 additions & 4 deletions packages/components/tests/ScreenReaderTextTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ describe( "ScreenReaderText", () => {
renderer.render( <ScreenReaderText><div /></ScreenReaderText> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `children` of type `object` supplied to `ScreenReaderText`, expected `string`." );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] )
.toBe( "Invalid prop `children` of type `object` supplied to `ScreenReaderText`, expected `string`." );
} );

it( "generates a warning when no children are passed in.", () => {
console.error = jest.fn();
renderer.render( <ScreenReaderText /> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type" );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] )
.toBe( "The prop `children` is marked as required in `ScreenReaderText`, but its value is `undefined`." );
} );
} );
77 changes: 0 additions & 77 deletions packages/components/tests/YoastModalTest.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/components/tests/__snapshots__/WordListTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ exports[`WordList renders correctly without items 1`] = `
Wordlist
</strong>
</p>

<ol
className="__list"
/>

</div>
`;

Expand All @@ -26,7 +24,6 @@ exports[`WordList renders wordlist as list items 1`] = `
Wordlist
</strong>
</p>

<ol
className="__list"
>
Expand All @@ -46,6 +43,5 @@ exports[`WordList renders wordlist as list items 1`] = `
word3
</li>
</ol>

</div>
`;
5 changes: 3 additions & 2 deletions packages/components/tests/button/ButtonsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ describe( "Button", () => {
);

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `variant` of value `[object Object]` supplied to `Button`" );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] ).toContain( "Invalid prop `variant` of value `[object Object]` supplied to `Button`" );
} );
} );

Expand Down
10 changes: 6 additions & 4 deletions packages/components/tests/inputTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ describe( "Input", () => {
renderer.render( <Input type="invalidType" /> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `type` of value `invalidType` supplied to `Input`" );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] ).toContain( "Invalid prop `type` of value `invalidType` supplied to `Input`" );
} );

it( "generates an input based on the defaults and additional, optional attributes", () => {
Expand Down Expand Up @@ -72,7 +73,8 @@ describe( "Input", () => {
renderer.render( <Input name="textInput" onChange={ 0 } /> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `onChange` of type `number` supplied to `Input`, expected `function`." );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] ).toBe( "Invalid prop `onChange` of type `number` supplied to `Input`, expected `function`." );
} );
} );
5 changes: 3 additions & 2 deletions packages/components/tests/inputs/TextAreaTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ describe( "TextArea", () => {
);

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `id` of type `boolean` supplied to `TextArea`, expected `string`." );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] ).toBe( "Invalid prop `id` of type `boolean` supplied to `TextArea`, expected `string`." );
} );
} );
11 changes: 7 additions & 4 deletions packages/components/tests/inputs/TextInputTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ describe( "TextInput", () => {
renderer.render( <TextInput label="hey" type="invalidType" /> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `type` of value `invalidType` supplied to `TextInput`" );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] ).toContain( "Invalid prop `type` of value `invalidType` supplied to `TextInput`" );
} );

it( "generates an input based on the defaults and additional, optional attributes", () => {
Expand Down Expand Up @@ -88,7 +89,9 @@ describe( "TextInput", () => {
renderer.render( <TextInput label="hi" name="textInput" onChange={ 0 } /> );

expect( console.error ).toBeCalled();
expect( console.error.mock.calls[ 0 ][ 0 ] )
.toContain( "Warning: Failed prop type: Invalid prop `onChange` of type `number` supplied to `TextInput`, expected `function`." );
expect( console.error.mock.calls[ 0 ][ 0 ] ).toBe( "Warning: Failed %s type: %s%s" );
expect( console.error.mock.calls[ 0 ][ 1 ] ).toBe( "prop" );
expect( console.error.mock.calls[ 0 ][ 2 ] )
.toBe( "Invalid prop `onChange` of type `number` supplied to `TextInput`, expected `function`." );
} );
} );
Loading