kopia lustrzana https://github.com/OpenDroneMap/WebODM
More UI tests, transform properties ES6 plugin setup
rodzic
fb73197a0b
commit
5a3c87fbf6
9
.babelrc
9
.babelrc
|
@ -1,3 +1,10 @@
|
|||
{
|
||||
"presets": ["es2015", "react"]
|
||||
"presets": ["es2015", "react"],
|
||||
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": ["syntax-class-properties",
|
||||
"transform-class-properties"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import './vendor/google-code-prettify/prettify';
|
|||
import './vendor/google-code-prettify/prettify.css';
|
||||
import update from 'immutability-helper';
|
||||
import Utils from './classes/Utils';
|
||||
import $ from 'jquery';
|
||||
|
||||
class Console extends React.Component {
|
||||
constructor(props){
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import AssetDownloadButtons from '../AssetDownloadButtons';
|
||||
|
||||
describe('<AssetDownloadButtons />', () => {
|
||||
it('renders without exploding', () => {
|
||||
const wrapper = shallow(<AssetDownloadButtons task={{project: 1, id: 1, available_assets: ["orthophoto.tif", "dsm.tif"]}} />);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
})
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import EditPresetDialog from '../EditPresetDialog';
|
||||
|
||||
describe('<EditPresetDialog />', () => {
|
||||
it('renders without exploding', () => {
|
||||
const wrapper = shallow(<EditPresetDialog
|
||||
|
||||
/>);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
})
|
||||
});
|
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import Console from '../Console';
|
||||
|
||||
describe('<Console />', () => {
|
||||
it('renders without exploding', () => {
|
||||
const wrapper = shallow(<Console />);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
})
|
||||
});
|
|
@ -1,3 +1,4 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import Dashboard from '../Dashboard';
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import MapView from '../MapView';
|
||||
|
||||
describe('<MapView />', () => {
|
||||
it('renders without exploding', () => {
|
||||
const wrapper = shallow(<MapView mapItems={[{mapType: "orthophoto", tiles: ["/tiles.json"]}]} />);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
})
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
// import ModelView from '../ModelView';
|
||||
|
||||
// TODO: this needs some debugging since Potree has troubles with requirements
|
||||
|
||||
describe('<ModelView />', () => {
|
||||
it('TODO: renders without exploding', () => {
|
||||
expect(true).toBe(true);
|
||||
// const wrapper = shallow(<ModelView task={{id: 1, project: 1}} />);
|
||||
// expect(wrapper.exists()).toBe(true);
|
||||
})
|
||||
});
|
|
@ -4,3 +4,5 @@ Currently we don't transpile SCSS files when
|
|||
testing with Jest. We might want to change
|
||||
this in the future if we start doing snapshot
|
||||
testing */
|
||||
|
||||
export default {};
|
|
@ -1,6 +1,7 @@
|
|||
module.exports = {
|
||||
roots: ["./app/static/app/js"],
|
||||
"moduleNameMapper": {
|
||||
"^.*\\.scss$": "./tests/mocks/empty.scss.js" // TODO: how to use an absolute path?
|
||||
"^.*\\.s?css$": "<rootDir>/app/static/app/js/tests/mocks/empty.scss.js",
|
||||
"jquery": "<rootDir>/app/static/app/js/vendor/jquery-1.11.2.min.js"
|
||||
}
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "webodm",
|
||||
"name": "WebODM",
|
||||
"version": "0.4.0",
|
||||
"description": "Open Source Drone Image Processing",
|
||||
"main": "index.js",
|
||||
|
|
Ładowanie…
Reference in New Issue