File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -309,15 +309,13 @@ describe("scroll() full height target", () => {
309
309
describe ( "scroll() container tracking" , ( ) => {
310
310
it ( "correctly tracks position of a target with container of fixed height" , ( ) => {
311
311
cy . visit ( "?test=scroll-explicit-height" )
312
- . wait ( 100 )
313
- . get ( "#scroll-container" )
314
- . viewport ( 800 , 500 )
315
- . scrollTo ( 0 , 1000 )
312
+ . viewport ( 800 , 800 )
316
313
. wait ( 100 )
317
314
. get ( "#item-0" )
318
315
. should ( ( [ $element ] : any ) => {
319
316
expect ( $element . style . opacity ) . to . equal ( "0" )
320
317
} )
318
+ . get ( "#scroll-container" )
321
319
. scrollTo ( 0 , 1000 )
322
320
. wait ( 100 )
323
321
. get ( "#item-2" )
Original file line number Diff line number Diff line change @@ -77,11 +77,13 @@ export function useScroll({
77
77
if ( needsStart . current ) {
78
78
invariant (
79
79
! isRefPending ( container ) ,
80
- "Container ref is defined but not hydrated"
80
+ "Container ref is defined but not hydrated" ,
81
+ "use-scroll-ref"
81
82
)
82
83
invariant (
83
84
! isRefPending ( target ) ,
84
- "Target ref is defined but not hydrated"
85
+ "Target ref is defined but not hydrated" ,
86
+ "use-scroll-ref"
85
87
)
86
88
return start ( )
87
89
} else {
You can’t perform that action at this time.
0 commit comments