Unverified Commit f0887fa0 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

test: replace explicit `padding-bottom` with `devIndicators: false` for scroll…

test: replace explicit `padding-bottom` with  `devIndicators: false` for scroll position testing (#76105)

### Why?

There were explicit `paddingBottom: 60` set to fixtures due to the dev
indicator blocking the scroll position. Since an option to disable it
was added at https://github.com/vercel/next.js/pull/76079, this PR
replaced them with `devIndicators: false`.

x-ref:
https://github.com/vercel/next.js/pull/76077#discussion_r1957164641
parent c02bca23
/** @type {import('next').NextConfig} */
module.exports = { module.exports = {
onDemandEntries: { onDemandEntries: {
// Make sure entries are not getting disposed. // Make sure entries are not getting disposed.
...@@ -6,4 +7,7 @@ module.exports = { ...@@ -6,4 +7,7 @@ module.exports = {
experimental: { experimental: {
strictNextHead: process.env.TEST_STRICT_NEXT_HEAD !== 'false', strictNextHead: process.env.TEST_STRICT_NEXT_HEAD !== 'false',
}, },
// scroll position can be finicky with the
// indicators showing so hide by default
devIndicators: false,
} }
...@@ -41,7 +41,7 @@ export default withRouter( ...@@ -41,7 +41,7 @@ export default withRouter(
render() { render() {
return ( return (
<div className="shallow-routing" style={{ paddingBottom: 60 }}> <div className="shallow-routing">
<Link href="/nav" id="home-link" style={linkStyle}> <Link href="/nav" id="home-link" style={linkStyle}>
Home Home
</Link> </Link>
......
...@@ -7,8 +7,7 @@ export default function Page() { ...@@ -7,8 +7,7 @@ export default function Page() {
const { items, loadMoreItems } = useContext(ItemsContext) const { items, loadMoreItems } = useContext(ItemsContext)
return ( return (
// Dev Indicator blocking the click. <div>
<div style={{ paddingBottom: 60 }}>
<h1>Page</h1> <h1>Page</h1>
<ul> <ul>
{items.map((item) => ( {items.map((item) => (
......
/** @type {import('next').NextConfig} */
module.exports = { module.exports = {
redirects: () => { redirects: () => {
return [ return [
...@@ -10,7 +11,5 @@ module.exports = { ...@@ -10,7 +11,5 @@ module.exports = {
}, },
// scroll position can be finicky with the // scroll position can be finicky with the
// indicators showing so hide by default // indicators showing so hide by default
devIndicators: { devIndicators: false,
appIsrStatus: false,
},
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment