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,11 @@ import { shallow } from 'enzyme';
import Button from './button';
function renderShallow (props) {
function render (props = {}) {
if (props && props.label === undefined) {
props.label = 'test';
}
return shallow(
<Button { ...props } />
);
@@ -28,11 +32,11 @@ function renderShallow (props) {
describe('ui/Button', () => {
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');
});
});
});