Skip to content

Commit

Permalink
Merge pull request #784 from oskarhane/react
Browse files Browse the repository at this point in the history
Switch to React 16.4
  • Loading branch information
pe4cey authored Jun 19, 2018
2 parents 163da49 + ded70fb commit 20a3312
Show file tree
Hide file tree
Showing 170 changed files with 7,564 additions and 7,592 deletions.
11 changes: 1 addition & 10 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"presets": ["es2015", "stage-2", "react"],
"plugins": [
"preact-require",
[
"transform-react-jsx",
{
"pragma": "h"
}
]
]
"presets": ["es2015", "stage-2", "react"]
}
4,589 changes: 2,747 additions & 1,842 deletions LICENSES.txt

Large diffs are not rendered by default.

1,372 changes: 838 additions & 534 deletions NOTICE.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions e2e_tests/integration/0.index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@
const Carousel = '[data-test-id="carousel"]'
const SubmitQueryButton = '[data-test-id="submitQuery"]'
const Editor = '.ReactCodeMirror textarea'
const ClearEditorButton = '[data-test-id="clearEditorContent"]'

describe('Neo4j Browser', () => {
it('sets new login credentials', () => {
const newPassword = Cypress.env('browser-password') || 'newpassword'
cy.setInitialPassword(newPassword)
cy.disconnect()
})
it('populates the editor when clicking the connect banner', () => {
cy.get('[data-test-id="disconnectedBannerCode"]').click()
cy.get('.ReactCodeMirror').should('contain', ':server connect')
cy.get(ClearEditorButton).click()
})
it('can connect', () => {
const password = Cypress.env('browser-password') || 'newpassword'
cy.connect('neo4j', password)
Expand Down
67 changes: 67 additions & 0 deletions e2e_tests/integration/commands.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright (c) 2002-2018 "Neo4j, Inc"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/* global Cypress, cy, test, expect */

const commands = [
':style',
':server user add',
':server user list',
':server change-password',
':server status',
':server connect',
':help',
':play cypher',
':play https://guides.neo4j.com/reco',
':sysinfo',
':schema',
':history',
':config',
':params',
':param x => 1',
':param y: 2',
':queries',
':get /',
':unknown',
'RETURN rand()'
]

describe('Commands', () => {
it('can run all simple commands not connected without blowing up', () => {
commands.forEach(cmd => {
cy.executeCommand(cmd)
cy.executeCommand(':clear')
})
})
it('can show connection error', () => {
const password = 'unlikely password'
cy.connect('neo4j', password, undefined, false)
})
it('can connect', () => {
const password = Cypress.env('browser-password') || 'newpassword'
cy.connect('neo4j', password)
})
it('can run all simple commands while connected without blowing up', () => {
commands.forEach(cmd => {
cy.executeCommand(cmd)
cy.executeCommand(':clear')
})
})
})
38 changes: 15 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,16 @@
}
},
"jest": {
"setupFiles": [
"raf/polyfill.js"
],
"testPathIgnorePatterns": [
".jsx$",
"/e2e_tests/"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|html)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"^neo4j-driver-alias$": "neo4j-driver",
"^react-dom/server$": "preact-render-to-string",
"^react-addons-test-utils$": "preact-test-utils",
"^react-addons-transition-group$": "preact-transition-group",
"^react$": "preact-compat-enzyme",
"^react-dom$": "preact-compat-enzyme",
"^browser-styles(.*)$": "<rootDir>/src/browser/styles$1",
"^browser-components(.*)$": "<rootDir>/src/browser/components$1",
"worker-loader": "<rootDir>/__mocks__/workerLoaderMock.js"
Expand All @@ -71,7 +68,6 @@
"babel-jest": "^21.0.0",
"babel-loader": "^7.1.2",
"babel-plugin-module-resolver": "^2.4.0",
"babel-plugin-preact-require": "^1.0.0",
"babel-plugin-styled-components": "^1.2.0",
"babel-plugin-transform-react-jsx": "^6.23.0",
"babel-polyfill": "^6.26.0",
Expand All @@ -84,7 +80,6 @@
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.7",
"cypress": "^3.0.1",
"enzyme": "^2.9.1",
"eslint": "^4.6.1",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-jsx": "^4.0.1",
Expand All @@ -99,24 +94,23 @@
"file-loader": "^0.11.1",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"jest": "^21.0.1",
"jest-cli": "^21.0.1",
"husky": "^0.14.3",
"jest-cli": "^23.1.0",
"js2xmlparser": "^3.0.0",
"json-loader": "^0.5.7",
"lint-staged": "^4.1.3",
"ncp": "^2.0.0",
"nock": "^9.0.14",
"node-noop": "^1.0.0",
"postcss": "^6.0.11",
"postcss-cssnext": "^3.0.2",
"postcss-loader": "^2.0.5",
"preact-compat-enzyme": "^0.2.5",
"preact-render-to-string": "^3.6.3",
"preact-test-utils": "^0.1.3",
"precss": "^2.0.0",
"prettier-eslint": "^7.1.0",
"prettier-eslint-cli": "^4.3.0",
"react-addons-test-utils": "^15.0.2",
"raf": "^3.4.0",
"react-hot-loader": "^1.3.0",
"react-testing-library": "^4.0.1",
"redux-devtools": "^3.2.0",
"redux-devtools-dock-monitor": "^1.1.1",
"redux-devtools-log-monitor": "^1.0.11",
Expand All @@ -127,7 +121,8 @@
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dashboard": "^2.0.0",
"webpack-dev-server": "^2.7.1",
"worker-loader": "^0.8.0"
"worker-loader": "^0.8.0",
"xml2js": "^0.4.19"
},
"dependencies": {
"ascii-data-table": "^2.1.1",
Expand All @@ -137,21 +132,19 @@
"dnd-core": "^2.5.1",
"file-saver": "^1.3.8",
"firebase": "^4.3.0",
"husky": "^0.14.3",
"isomorphic-fetch": "^2.2.1",
"jsonic": "^0.3.0",
"lodash.debounce": "^4.0.8",
"neo4j-driver": "^1.6.1",
"node-noop": "^1.0.0",
"preact": "^8.2.5",
"preact-compat": "^3.17.0",
"preact-redux": "^2.0.2",
"preact-suber": "^1.0.3",
"react": "^16.4.0",
"react-addons-pure-render-mixin": "^15.0.2",
"react-dnd": "^2.5.1",
"react-dnd-html5-backend": "^2.5.1",
"react-dom": "^16.4.0",
"react-dropzone": "^4.1.2",
"react-icons": "^2.2.1",
"react-redux": "^5.0.7",
"react-suber": "1.0.4",
"react-timeago": "^3.4.3",
"redux": "^3.7.2",
"redux-observable": "^0.16.0",
Expand All @@ -163,7 +156,6 @@
"suber": "^5.0.1",
"swipe-js-iso": "^2.0.4",
"url-parse": "^1.1.9",
"uuid": "^3.0.1",
"xml2js": "^0.4.19"
"uuid": "^3.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<DesktopIntegration> calls onMount with data on mounting 1`] = `<div />`;
exports[`<DesktopIntegration> calls onMount with data on mounting 2`] = `<div />`;
exports[`<DesktopIntegration> calls onXxx with data on event XXX 1`] = `<div />`;
exports[`<DesktopIntegration> does not render anything if no integration point 1`] = `<div />`;
exports[`<DesktopIntegration> does not render anything if there is an integration point 1`] = `<div />`;
2 changes: 1 addition & 1 deletion src/browser/components/DesktopIntegration/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import { Component } from 'preact'
import { Component } from 'react'
import { getActiveGraph, getCredentials, eventToHandler } from './helpers'

export default class DesktopIntegration extends Component {
Expand Down
Loading

0 comments on commit 20a3312

Please sign in to comment.