|
1 | | -import { tableCypherQuery, barChartCypherQuery, mapChartCypherQuery, sunburstChartCypherQuery, iFrameText, markdownText, loadDashboardURL } from "../fixtures/cypher_queries" |
| 1 | +import { tableCypherQuery, barChartCypherQuery, mapChartCypherQuery, sunburstChartCypherQuery, iFrameText, markdownText, loadDashboardURL, sankeyChartCypherQuery } from "../fixtures/cypher_queries" |
2 | 2 |
|
3 | 3 | // Ignore warnings that may appear when using the Cypress dev server |
4 | 4 | Cypress.on('uncaught:exception', (err, runnable) => { |
@@ -131,6 +131,11 @@ describe('NeoDash E2E Tests', () => { |
131 | 131 | cy.get('main .react-grid-item:eq(2) .MuiCardContent-root svg > g > g').should('have.length', 6) |
132 | 132 | }) |
133 | 133 |
|
| 134 | + it('creates a sankey chart report', () => { |
| 135 | + createReportOfType('Sankey Chart', sankeyChartCypherQuery, true) |
| 136 | + cy.get('main .react-grid-item:eq(2) .MuiCardContent-root svg > g > path').should('have.attr', 'fill-opacity', 0.5) |
| 137 | + }) |
| 138 | + |
134 | 139 | it('creates a raw json report', () => { |
135 | 140 | createReportOfType('Raw JSON', barChartCypherQuery) |
136 | 141 | cy.get('main .react-grid-item:eq(2) .MuiCardContent-root textarea:nth-child(1)').should(($div) => { |
@@ -192,11 +197,16 @@ describe('NeoDash E2E Tests', () => { |
192 | 197 |
|
193 | 198 | }) |
194 | 199 |
|
195 | | -function createReportOfType(type, query) { |
| 200 | +function createReportOfType(type, query, fast=false) { |
196 | 201 | cy.get('main .react-grid-item:eq(2) button').click() |
197 | 202 | cy.get('main .react-grid-item:eq(2) button[aria-label="settings"]').click() |
198 | 203 | cy.get('main .react-grid-item:eq(2) .MuiInputLabel-root').contains("Type").next().click() |
199 | 204 | cy.contains(type).click() |
200 | | - cy.get('main .react-grid-item:eq(2) .ReactCodeMirror').type(query, { parseSpecialCharSequences: false }) |
| 205 | + if(fast){ |
| 206 | + cy.get('main .react-grid-item:eq(2) .ReactCodeMirror').type(query, { delay:1, parseSpecialCharSequences: false }) |
| 207 | + }else{ |
| 208 | + cy.get('main .react-grid-item:eq(2) .ReactCodeMirror').type(query, { parseSpecialCharSequences: false }) |
| 209 | + } |
| 210 | + |
201 | 211 | cy.get('main .react-grid-item:eq(2) button[aria-label="save"]').click() |
202 | 212 | } |
0 commit comments