mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Make Welcome page into a simple React app (#4147)
* Make Welcome page into a simple React app This removes a dependency on datatables, we should be able to get rid of it as we re-write the Table and PivotTable viz * tests/lint * Bump node version to latest
This commit is contained in:
committed by
GitHub
parent
b9af019567
commit
c49fb0aa9b
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import DashboardTable from '../../../javascripts/welcome/DashboardTable';
|
||||
|
||||
const $ = window.$ = require('jquery');
|
||||
|
||||
|
||||
describe('DashboardTable', () => {
|
||||
const mockedProps = {};
|
||||
let stub;
|
||||
beforeEach(() => {
|
||||
stub = sinon.stub($, 'getJSON');
|
||||
});
|
||||
afterEach(() => {
|
||||
stub.restore();
|
||||
});
|
||||
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
React.isValidElement(<DashboardTable {...mockedProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
it('renders', () => {
|
||||
const wrapper = mount(<DashboardTable {...mockedProps} />);
|
||||
expect(stub.callCount).to.equal(1);
|
||||
expect(wrapper.find('img')).to.have.length(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user