UI 2 tests & webpack dapp build updates/fixes (#5561)

* Tests are executing again

* Fix tests

* Add missing contextTypes

* IdentityIcon without Connect()

* Update ~/ui tests

* Update spec locations

* Filename case

* Fix playground dapp build
This commit is contained in:
Jaco Greeff
2017-05-05 15:14:05 +02:00
committed by GitHub
parent 9b025cf8c1
commit d91fae4e54
45 changed files with 417 additions and 378 deletions

View File

@@ -57,7 +57,7 @@ function render (store) {
return component;
}
describe('views/Connection', () => {
describe('shell/Connection', () => {
it('renders defaults', () => {
expect(render()).to.be.ok;
});

View File

@@ -80,7 +80,7 @@ function create () {
return store;
}
describe('views/Dapps/DappStore', () => {
describe('shell/Dapps/DappStore', () => {
beforeEach(() => {
stubGlobals();
});

View File

@@ -62,7 +62,7 @@ function render (props = { visible: true }) {
return component;
}
describe('modals/FirstRun', () => {
describe('shell/FirstRun', () => {
it('renders defaults', () => {
expect(render()).to.be.ok;
});

View File

@@ -30,7 +30,7 @@ function create () {
return store;
}
describe('views/ParityBar/AccountStore', () => {
describe('shell/ParityBar/AccountStore', () => {
beforeEach(() => {
create();
});

View File

@@ -59,7 +59,7 @@ function render (props = {}, state = {}) {
return component;
}
describe('views/ParityBar', () => {
describe('shell/ParityBar', () => {
beforeEach(() => {
render({ dapp: true });
});
@@ -84,12 +84,6 @@ describe('views/ParityBar', () => {
expect(bar.find('div')).not.to.have.length(0);
});
it('renders the Account selector button', () => {
const icon = bar.find('Button').first().props().icon;
expect(icon.type.displayName).to.equal('Connect(IdentityIcon)');
});
it('renders the Parity button', () => {
const label = shallow(bar.find('Button').at(1).props().label);
@@ -157,10 +151,6 @@ describe('views/ParityBar', () => {
instance.renderExpanded.restore();
});
it('renders the bar on with opened === false', () => {
expect(component.find('Link[to="/apps"]')).to.have.length(1);
});
it('renders expanded with opened === true', () => {
expect(instance.renderExpanded).not.to.have.been.called;
instance.setState({ opened: true });

View File

@@ -40,7 +40,7 @@ function createApi (networkVersion) {
};
}
describe('views/Application/Requests/savedRequests', () => {
describe('shell/Requests/savedRequests', () => {
beforeEach((done) => {
store.set(LS_REQUESTS_KEY, {
[NETWORK_ID]: {

View File

@@ -18,7 +18,7 @@ import Store from './store';
let store;
describe('modals/UpgradeParity/store', () => {
describe('shell/UpgradeParity/store', () => {
describe('@actions', () => {
beforeEach(() => {
store = new Store();