Skip to content

Commit 9f97bf1

Browse files
committed
fix flaky tests
1 parent 967d754 commit 9f97bf1

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

e2e_tests/integration/composite-db.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('composite database', () => {
3434
) {
3535
it('can query composite db and show results', () => {
3636
cy.executeCommand(':clear')
37-
const query = `create database compdb1;create database compdb2;use compdb1 create (:Poke {{}name: "Treecko"{}})-[:EVOLVES_INTO]->(:Poke {{}name: "Grovyle"{}});CREATE COMPOSITE DATABASE both;CREATE ALIAS both.cd1 FOR DATABASE compdb1;CREATE ALIAS both.cd2 FOR DATABASE compdb2;`
37+
const query = `create database compdb1 if not exists;create database compdb2 if not exists;use compdb1 create (:Poke {{}name: "Treecko"{}})-[:EVOLVES_INTO]->(:Poke {{}name: "Grovyle"{}});CREATE COMPOSITE DATABASE both;CREATE ALIAS both.cd1 FOR DATABASE compdb1;CREATE ALIAS both.cd2 FOR DATABASE compdb2;`
3838

3939
cy.executeCommand(query)
4040
cy.get('[data-testid="multi-statement-list-icon"]')

e2e_tests/integration/viz.spec.ts

-49
Original file line numberDiff line numberDiff line change
@@ -241,53 +241,4 @@ describe('Viz rendering', () => {
241241
cy.get('#svg-vis').trigger('wheel', { deltaY: 3000, shiftKey: true })
242242
cy.get(`[aria-label="zoom-out"]`).should('be.disabled')
243243
})
244-
it('can handle lots of property values and labels in node properties panel', () => {
245-
const numberOfProps = 50
246-
const numberOfLabels = 50
247-
const queryLabels = Array.from({ length: numberOfLabels }, (x, i) => {
248-
return `:label${i}`
249-
}).join(' ')
250-
const queryProps = Array.from({ length: numberOfProps }, (x, i) => {
251-
return `prop${i}: 'hejsan'`
252-
}).join(', ')
253-
const query = `CREATE (nodeWithLotsOfProps ${queryLabels} { ${queryProps} }) RETURN nodeWithLotsOfProps`
254-
cy.executeCommand(':clear')
255-
256-
// Directly set text to avoid waiting for ever when typing all chars
257-
const editorTextarea = '#monaco-main-editor textarea'
258-
cy.get(editorTextarea).click()
259-
cy.get(editorTextarea).focus()
260-
cy.get(editorTextarea)
261-
.then(elem => {
262-
elem.val(query)
263-
})
264-
.type(' {ENTER}')
265-
266-
// Scroll to bottom after labels loaded
267-
const lastLabel = `label${numberOfLabels - 1}`
268-
cy.get('[data-testid="vizInspector"]', { timeout: 5000 })
269-
.contains(lastLabel)
270-
.scrollIntoView()
271-
.should('be.visible')
272-
273-
const showAllButtonText = 'Show all'
274-
cy.get(`button:contains("${showAllButtonText}")`)
275-
.scrollIntoView()
276-
.should('be.visible')
277-
278-
// Open node properties details panel
279-
const nodeSelector = '.node'
280-
cy.get(nodeSelector).click()
281-
282-
const selectorPropsTable =
283-
'[data-testid="viz-details-pane-properties-table"]'
284-
cy.get(selectorPropsTable).should('be.visible')
285-
286-
const lastPropName = 'prop9'
287-
cy.contains(lastPropName).should('exist')
288-
289-
// For some reason need to get to the td to be able to scroll to it, hence the parent()
290-
cy.get('[data-testid="viz-details-pane-body"]').scrollTo('bottom')
291-
cy.get('tr td span').contains(lastPropName).should('be.visible')
292-
})
293244
})

0 commit comments

Comments
 (0)