From 1d216d1ff37b3e0d86bd7d4e682968e9e534dc87 Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Fri, 31 Mar 2023 08:47:00 -0500 Subject: [PATCH 1/2] Update scrollintoview.mdx --- docs/api/actions/scrollintoview.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/actions/scrollintoview.mdx b/docs/api/actions/scrollintoview.mdx index 3a2731455b..d949b0f07c 100644 --- a/docs/api/actions/scrollintoview.mdx +++ b/docs/api/actions/scrollintoview.mdx @@ -55,7 +55,8 @@ Pass in an options object to change the default behavior of `.scrollIntoView()`. ### Scrolling ```javascript -cy.get('button#checkout').scrollIntoView().should('be.visible') +cy.get('button#checkout').scrollIntoView() +cy.get('button#checkout').should('be.visible') ``` ### Options From e025feca1dc14437861c58bb23a8718223754948 Mon Sep 17 00:00:00 2001 From: Emily Rohrbough Date: Fri, 31 Mar 2023 08:49:26 -0500 Subject: [PATCH 2/2] Update scrollintoview.mdx --- docs/api/actions/scrollintoview.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/actions/scrollintoview.mdx b/docs/api/actions/scrollintoview.mdx index d949b0f07c..a93db1ffe1 100644 --- a/docs/api/actions/scrollintoview.mdx +++ b/docs/api/actions/scrollintoview.mdx @@ -112,7 +112,8 @@ or #### Assert element is visible after scrolling it into view ```javascript -cy.get('#scroll-horizontal button').scrollIntoView().should('be.visible') +cy.get('#scroll-horizontal button').scrollIntoView() +cy.get('#scroll-horizontal button').should('be.visible') ``` The commands above will display in the Command Log as: