Skip to content

Commit

Permalink
test(cypress): Scroll element in the center of the view
Browse files Browse the repository at this point in the history
This avoid elements to be hided by a fixed top bar.
Especially useful for the file list.

Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Mar 12, 2024
1 parent f56bd2e commit 0710141
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default defineConfig({
// faster video processing
videoCompression: false,

// Prevent elements to be scrolled under a top bar during actions (click, clear, type, etc). Default is 'top'.
// https://github.com/cypress-io/cypress/issues/871
scrollBehavior: 'center',

// Visual regression testing
env: {
failSilently: false,
Expand Down

0 comments on commit 0710141

Please sign in to comment.