Skip to content

Commit

Permalink
Upgrade Testing Library dependencies to latest version (#10509)
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops authored Jun 6, 2024
1 parent 658e64d commit 71d32a6
Show file tree
Hide file tree
Showing 9 changed files with 2,960 additions and 4,077 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "14.5.2",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "29.5.12",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ exports[`allows tooltip via container component 1`] = `
width="200"
>
<g
clip-path="url(#victory-clip-4)"
clip-path="url(#victory-clip-6)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-4"
id="victory-clip-6"
>
<rect
height="100"
Expand All @@ -42,12 +42,12 @@ exports[`allows tooltip via container component 1`] = `
/>
</g>
<g
clip-path="url(#victory-clip-5)"
clip-path="url(#victory-clip-7)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-5"
id="victory-clip-7"
>
<rect
height="100"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ exports[`allows tooltip via container component 1`] = `
width="200"
>
<g
clip-path="url(#victory-clip-4)"
clip-path="url(#victory-clip-6)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-4"
id="victory-clip-6"
>
<rect
height="100"
Expand All @@ -42,12 +42,12 @@ exports[`allows tooltip via container component 1`] = `
/>
</g>
<g
clip-path="url(#victory-clip-5)"
clip-path="url(#victory-clip-7)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-5"
id="victory-clip-7"
>
<rect
height="100"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ exports[`allows tooltip via container component 1`] = `
width="200"
>
<g
clip-path="url(#victory-clip-2)"
clip-path="url(#victory-clip-4)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-2"
id="victory-clip-4"
>
<rect
height="100"
Expand All @@ -42,12 +42,12 @@ exports[`allows tooltip via container component 1`] = `
/>
</g>
<g
clip-path="url(#victory-clip-3)"
clip-path="url(#victory-clip-5)"
style="height: 100%; width: 100%;"
>
<defs>
<clippath
id="victory-clip-3"
id="victory-clip-5"
>
<rect
height="100"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ exports[`Nav Nav List with flyout 1`] = `
data-popper-escaped="true"
data-popper-placement="right-start"
data-popper-reference-hidden="true"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 0; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 1; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
>
<div>
Flyout test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ exports[`SearchInput advanced search 1`] = `
data-popper-escaped="true"
data-popper-placement="bottom-start"
data-popper-reference-hidden="true"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 1; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 0; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
/>
</div>
</DocumentFragment>
Expand Down Expand Up @@ -590,7 +590,7 @@ exports[`SearchInput renders search input in strict mode 1`] = `
data-popper-escaped="true"
data-popper-placement="bottom-start"
data-popper-reference-hidden="true"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 1; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
style="position: absolute; left: 0px; top: 0px; z-index: 9999; opacity: 0; transition: opacity 0ms cubic-bezier(.54, 1.5, .38, 1.11); min-width: 0px; transform: translate(0px, 0px);"
/>
</div>
</DocumentFragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const items = [
];

const anchors = [
<SimpleListItem key="i1" component="a">
<SimpleListItem key="i1" component="a" href="#foo">
Item 1
</SimpleListItem>,
<SimpleListItem key="i2" component="a">
<SimpleListItem key="i2" component="a" href="#bar">
Item 2
</SimpleListItem>,
<SimpleListItem key="i3" component="a">
<SimpleListItem key="i3" component="a" href="#baz">
Item 3
</SimpleListItem>
];
Expand Down
17 changes: 10 additions & 7 deletions packages/react-docs/patternfly-a11y.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function waitFor(page) {
}

const urls = Object.keys(fullscreenRoutes)
.map(key => {
.map((key) => {
if (fullscreenRoutes[key].isFullscreenOnly) {
return key;
} else {
Expand All @@ -21,14 +21,16 @@ const urls = Object.keys(fullscreenRoutes)
return path.replace(/\/react-demos$/, '');
} else {
// some demos have been moved to the component section, so their default tab has a trailing 'react-demos'
if (path.match(/\/components\/.*\/react-demos$/g)){
if (path.includes('/application-launcher/') ||
if (path.match(/\/components\/.*\/react-demos$/g)) {
if (
path.includes('/application-launcher/') ||
path.includes('/context-selector/') ||
path.includes('/date-and-time-picker/') ||
path.includes('/password-generator/') ||
path.includes('/password-strength/') ||
path.includes('/custom-menus/') ||
path.includes('/options-menu/')) {
path.includes('/options-menu/')
) {
return path.replace(/\/react-demos$/, '');
}
}
Expand All @@ -48,7 +50,7 @@ module.exports = {
url: '/',
label: 'home fullscreen nav expanded',
viewportDimensions: { width: 1920, height: 1080 },
afterNav: async page => {
afterNav: async (page) => {
await page.click('button#nav-toggle');
}
},
Expand All @@ -66,7 +68,7 @@ module.exports = {
url: '/',
label: 'home mobile nav expanded',
viewportDimensions: { width: 400, height: 900 },
afterNav: async page => {
afterNav: async (page) => {
await page.click('button#nav-toggle');
}
},
Expand All @@ -91,7 +93,8 @@ module.exports = {
'color-contrast',
'landmark-no-duplicate-main',
'landmark-main-is-top-level',
'scrollable-region-focusable'
'scrollable-region-focusable',
'aria-required-children'
].join(','),
ignoreIncomplete: true
};
Loading

0 comments on commit 71d32a6

Please sign in to comment.