|
| 1 | +/* |
| 2 | + * Copyright (c) Neo4j |
| 3 | + * Neo4j Sweden AB [http://neo4j.com] |
| 4 | + * |
| 5 | + * This file is part of Neo4j. |
| 6 | + * |
| 7 | + * Neo4j is free software: you can redistribute it and/or modify |
| 8 | + * it under the terms of the GNU General Public License as published by |
| 9 | + * the Free Software Foundation, either version 3 of the License, or |
| 10 | + * (at your option) any later version. |
| 11 | + * |
| 12 | + * This program is distributed in the hope that it will be useful, |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | + * GNU General Public License for more details. |
| 16 | + * |
| 17 | + * You should have received a copy of the GNU General Public License |
| 18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | + */ |
| 20 | + |
| 21 | +import { selectAllAndDelete } from '../support/commands' |
| 22 | + |
| 23 | +/* global Cypress, cy, before */ |
| 24 | + |
| 25 | +describe('Cypher Editor', () => { |
| 26 | + before(function () { |
| 27 | + cy.visit(Cypress.config('url')) |
| 28 | + cy.get('input[data-testid="boltaddress"]', { timeout: 40000 }) |
| 29 | + cy.ensureConnection() |
| 30 | + }) |
| 31 | + |
| 32 | + it('can autocomplete', () => { |
| 33 | + cy.executeCommand('create (:AutocompeleteLabel)') |
| 34 | + cy.getEditor().type(':') |
| 35 | + cy.getEditor().contains(':play') |
| 36 | + cy.getEditor().contains(':config') |
| 37 | + cy.getEditor().contains(':guide') |
| 38 | + |
| 39 | + cy.getEditor().type('{backspace}call dbms.listC') |
| 40 | + cy.getEditor().contains('listConfig') |
| 41 | + |
| 42 | + cy.getEditor().type(selectAllAndDelete) |
| 43 | + cy.getEditor().type('MATCH (:') |
| 44 | + cy.getEditor().contains(':AutocompeleteLabel') |
| 45 | + |
| 46 | + cy.getEditor().type(selectAllAndDelete) |
| 47 | + // cleanup |
| 48 | + cy.executeCommand('match (n:AutocompeleteLabel) delete n;') |
| 49 | + }) |
| 50 | +}) |
0 commit comments