fix: fix template testing

This commit is contained in:
woothu 2020-07-30 12:32:59 +02:00
parent 52163bbf8f
commit 68ce41db68
7 changed files with 943 additions and 918 deletions

1829
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@
"@coreui/coreui": "^3.2.2", "@coreui/coreui": "^3.2.2",
"@coreui/icons": "2.0.0-beta.4", "@coreui/icons": "2.0.0-beta.4",
"@coreui/icons-react": "^1.0.1", "@coreui/icons-react": "^1.0.1",
"@coreui/react": "^3.0.3", "@coreui/react": "^3.2.0",
"@coreui/react-chartjs": "^1.0.0", "@coreui/react-chartjs": "^1.0.0",
"@coreui/utils": "^1.3.1", "@coreui/utils": "^1.3.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",

View File

@ -1,9 +1,21 @@
import React from 'react'; import React from 'react'
import {shallow} from 'enzyme/build'; import { shallow } from 'enzyme/build'
import App from './App'; import App from './App'
import ChartLineSimple from './views/charts/ChartLineSimple'
import Dashboard from './views/dashboard/Dashboard.js'
it('mounts without crashing', () => { it('mounts without crashing', () => {
const wrapper = shallow(<App />); const wrapper = shallow(<App/>)
wrapper.unmount() wrapper.unmount()
}); })
it('mounts dashboard without crashing', () => {
const wrapper = shallow(<Dashboard/>)
wrapper.unmount()
})
it('mounts charts without crashing', () => {
const wrapper = shallow(<ChartLineSimple/> )
wrapper.unmount()
})

View File

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { getColor } from '@coreui/utils/src' import { getColor } from '@coreui/utils'
import { CChartBar } from '@coreui/react-chartjs' import { CChartBar } from '@coreui/react-chartjs'
const ChartBarSimple = props => { const ChartBarSimple = props => {

View File

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { getColor, deepObjectsMerge } from '@coreui/utils/src' import { getColor, deepObjectsMerge } from '@coreui/utils'
import { CChartLine } from '@coreui/react-chartjs' import { CChartLine } from '@coreui/react-chartjs'
const ChartLineSimple = props => { const ChartLineSimple = props => {

View File

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
import { CChartLine } from '@coreui/react-chartjs' import { CChartLine } from '@coreui/react-chartjs'
import { getStyle, hexToRgba } from '@coreui/utils/src' import { getStyle, hexToRgba } from '@coreui/utils'
const brandSuccess = getStyle('success') || '#4dbd74' const brandSuccess = getStyle('success') || '#4dbd74'
const brandInfo = getStyle('info') || '#20a8d8' const brandInfo = getStyle('info') || '#20a8d8'

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState, createRef } from 'react' import React, { useEffect, useState, createRef } from 'react'
import classNames from 'classnames' import classNames from 'classnames'
import { CRow, CCol } from '@coreui/react' import { CRow, CCol } from '@coreui/react'
import { rgbToHex } from '@coreui/utils/src' import { rgbToHex } from '@coreui/utils'
const ThemeView = () => { const ThemeView = () => {
const [color, setColor] = useState('rgb(255, 255, 255)') const [color, setColor] = useState('rgb(255, 255, 255)')