UI component updates (#4010)

* Update blockStatus & test results

* IdentityIcon rendering tests for #3950

* Update IdentityName with external messages

* Expand to cover basic layout sections

* ConfirmDialog rendering tests

* TxHash expansion & tests

* Cleanup ui/*.spec.js PropType warnings

* Use react-intl plural for confirmation/confirmations (verified manually)
This commit is contained in:
Jaco Greeff
2017-01-05 12:06:46 +01:00
committed by GitHub
parent 602a4429cc
commit ddeb06d9cc
16 changed files with 652 additions and 69 deletions

View File

@@ -19,7 +19,7 @@ import { shallow } from 'enzyme';
import Container from './container';
function renderShallow (props) {
function render (props) {
return shallow(
<Container { ...props } />
);
@@ -28,11 +28,24 @@ function renderShallow (props) {
describe('ui/Container', () => {
describe('rendering', () => {
it('renders defaults', () => {
expect(renderShallow()).to.be.ok;
expect(render()).to.be.ok;
});
it('renders with the specified className', () => {
expect(renderShallow({ className: 'testClass' })).to.have.className('testClass');
expect(render({ className: 'testClass' })).to.have.className('testClass');
});
});
describe('sections', () => {
it('renders the Card', () => {
expect(render().find('Card')).to.have.length(1);
});
it('renders the Title', () => {
const title = render({ title: 'title' }).find('Title');
expect(title).to.have.length(1);
expect(title.props().title).to.equal('title');
});
});
});