Skip to content

Commit

Permalink
make scrolling into view less flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed Jan 11, 2023
1 parent ac65b68 commit ecf393b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions e2e_tests/integration/viz.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

/* global Cypress, cy, before */

import { SubmitQueryButton } from '../support/commands'

const GREY = 'rgb(165, 171, 182)' // Default color for nodes and relationships
const ORANGE = 'rgb(247, 151, 103)'
const PURPLE = 'rgb(201, 144, 192)' // Default first color for a new node label
Expand Down Expand Up @@ -265,7 +263,13 @@ describe('Viz rendering', () => {
})
.type(' {ENTER}')

// Check that can scroll overview panel
// Scroll to bottom after labels loaded
const lastLabel = `label${numberOfLabels - 1}`
cy.get('[data-testid="vizInspector"]', { timeout: 5000 })
.contains(lastLabel)
.scrollIntoView()
.should('be.visible')

const showAllButtonText = 'Show all'
cy.get(`button:contains("${showAllButtonText}")`)
.scrollIntoView()
Expand Down

0 comments on commit ecf393b

Please sign in to comment.