Skip to content

Commit 5045f32

Browse files
Bump @testing-library/react from 14.2.2 to 15.0.5 (#13810)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: William Durand <[email protected]>
1 parent a3b14ec commit 5045f32

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
"@babel/register": "^7.28.3",
261261
"@emotion/core": "^11.0.0",
262262
"@testing-library/jest-dom": "^6.9.1",
263-
"@testing-library/react": "^14.2.2",
263+
"@testing-library/react": "^15.0.5",
264264
"@testing-library/user-event": "^14.6.1",
265265
"autoprefixer": "^10.4.22",
266266
"babel-gettext-extractor": "https://github.com/willdurand/babel-gettext-extractor#5.1.0",

tests/unit/amo/components/TestAddonsCard.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ describe(__filename, () => {
150150
expect(screen.getAllByRole('alert')).toHaveLength(
151151
DEFAULT_API_PAGE_SIZE * 4,
152152
);
153-
// By default we do not want "theme" placeholders.
154-
const imgs = screen.getAllByRole('img');
153+
// We can't use `getAllByRole('img')` because the `img` doesnt' have an
154+
// `alt` text in `SearchResult` when rendered as a placeholder.
155+
const imgs = screen.getAllByClassName('SearchResult-icon--loading');
155156
expect(imgs).toHaveLength(DEFAULT_API_PAGE_SIZE);
156-
expect(imgs[0]).toHaveClass('SearchResult-icon--loading');
157157
});
158158

159159
it('handles an empty set of addons', () => {
@@ -162,15 +162,18 @@ describe(__filename, () => {
162162
expect(screen.queryByRole('img')).not.toBeInTheDocument();
163163
});
164164

165-
it('allows you configure the number of placeholders', () => {
165+
it('allows you to configure the number of placeholders', () => {
166166
const placeholderCount = 2;
167167
render({
168168
addons: null,
169169
loading: true,
170170
placeholderCount,
171171
});
172-
173-
expect(screen.getAllByRole('img')).toHaveLength(placeholderCount);
172+
// We can't use `getAllByRole('img')` because the `img` doesnt' have an
173+
// `alt` text in `SearchResult` when rendered as a placeholder.
174+
expect(screen.getAllByClassName('SearchResult-result')).toHaveLength(
175+
placeholderCount,
176+
);
174177
});
175178

176179
it('renders addons even when loading', () => {

yarn.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,18 +1902,18 @@
19021902
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918"
19031903
integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==
19041904

1905-
"@testing-library/dom@^9.0.0":
1906-
version "9.2.0"
1907-
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.2.0.tgz#0e1f45e956f2a16f471559c06edd8827c4832f04"
1908-
integrity sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA==
1905+
"@testing-library/dom@^10.0.0":
1906+
version "10.4.1"
1907+
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.4.1.tgz#d444f8a889e9a46e9a3b4f3b88e0fcb3efb6cf95"
1908+
integrity sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==
19091909
dependencies:
19101910
"@babel/code-frame" "^7.10.4"
19111911
"@babel/runtime" "^7.12.5"
19121912
"@types/aria-query" "^5.0.1"
1913-
aria-query "^5.0.0"
1914-
chalk "^4.1.0"
1913+
aria-query "5.3.0"
19151914
dom-accessibility-api "^0.5.9"
19161915
lz-string "^1.5.0"
1916+
picocolors "1.1.1"
19171917
pretty-format "^27.0.2"
19181918

19191919
"@testing-library/jest-dom@^6.9.1":
@@ -1928,13 +1928,13 @@
19281928
picocolors "^1.1.1"
19291929
redent "^3.0.0"
19301930

1931-
"@testing-library/react@^14.2.2":
1932-
version "14.2.2"
1933-
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.2.2.tgz#74f855215c57d423282486a395a4348a837d3c5a"
1934-
integrity sha512-SOUuM2ysCvjUWBXTNfQ/ztmnKDmqaiPV3SvoIuyxMUca45rbSWWAT/qB8CUs/JQ/ux/8JFs9DNdFQ3f6jH3crA==
1931+
"@testing-library/react@^15.0.5":
1932+
version "15.0.5"
1933+
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-15.0.5.tgz#71bcc875e1142c3924cac7bdd7dc9a6db0bb1d42"
1934+
integrity sha512-ttodVWYA2i2w4hRa6krKrmS1vKxAEkwDz34y+CwbcrbZUxFzUYN3a5xZyFKo+K6LBseCRCUkwcjATpaNn/UsIA==
19351935
dependencies:
19361936
"@babel/runtime" "^7.12.5"
1937-
"@testing-library/dom" "^9.0.0"
1937+
"@testing-library/dom" "^10.0.0"
19381938
"@types/react-dom" "^18.0.0"
19391939

19401940
"@testing-library/user-event@^14.6.1":
@@ -2712,7 +2712,7 @@ argparse@^2.0.1:
27122712
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
27132713
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
27142714

2715-
aria-query@^5.0.0:
2715+
aria-query@5.3.0, aria-query@^5.0.0:
27162716
version "5.3.0"
27172717
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e"
27182718
integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==
@@ -3359,7 +3359,7 @@ center-align@^0.1.1:
33593359
align-text "^0.1.3"
33603360
lazy-cache "^1.0.3"
33613361

3362-
[email protected], chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
3362+
[email protected], chalk@^4.0.0, chalk@^4.1.2:
33633363
version "4.1.2"
33643364
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
33653365
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -8618,7 +8618,7 @@ [email protected]:
86188618
resolved "https://registry.yarnpkg.com/photoswipe/-/photoswipe-5.4.4.tgz#e045dc036453493188d5c8665b0e8f1000ac4d6e"
86198619
integrity sha512-WNFHoKrkZNnvFFhbHL93WDkW3ifwVOXSW3w1UuZZelSmgXpIGiZSNlZJq37rR8YejqME2rHs9EhH9ZvlvFH2NA==
86208620

8621-
picocolors@^1.0.0, picocolors@^1.1.1:
8621+
picocolors@1.1.1, picocolors@^1.0.0, picocolors@^1.1.1:
86228622
version "1.1.1"
86238623
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
86248624
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==

0 commit comments

Comments
 (0)