Skip to content

Commit

Permalink
Polish 6.5 (#24556)
Browse files Browse the repository at this point in the history
* Updates waterfall item design for timeline rows

* Adjusts span and tx flyouts and updates tooltips to EUI

* Heading size fixes and clean up

* Updates tooltip snapshots

* Review tweaks and snapshot updates

* Revert experiment :)

Co-Authored-By: jasonrhodes <jason.matthew.rhodes@gmail.com>

* Fixes bug with v1 waterfall state

* Fixes bug with timeline bar height

* Updates snapshot tests

* Updated test so it doesn't mount and rely on EUI makeId() which is non-deterministic per test run
  • Loading branch information
jasonrhodes committed Oct 26, 2018
1 parent b8b0229 commit 3a2db6e
Show file tree
Hide file tree
Showing 14 changed files with 2,238 additions and 2,029 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,36 @@
import React from 'react';
import DetailView from '../index';
import props from './props.json';
import { shallow } from 'enzyme';

import {
mountWithRouterAndStore,
mockMoment,
toJson
} from '../../../../../utils/testHelpers';
import { mockMoment } from '../../../../../utils/testHelpers';

describe('DetailView', () => {
let storeState;
beforeEach(() => {
// Avoid timezone issues
mockMoment();

storeState = {
location: { search: '' }
};
});

it('should render empty state', () => {
const wrapper = mountWithRouterAndStore(
<DetailView errorGroup={[]} urlParams={props.urlParams} location={{}} />,
storeState
const wrapper = shallow(
<DetailView
errorGroup={[]}
urlParams={props.urlParams}
location={{ state: '' }}
/>
);

expect(toJson(wrapper)).toMatchSnapshot();
expect(wrapper).toMatchSnapshot();
});

it('should render with data', () => {
const wrapper = mountWithRouterAndStore(
const wrapper = shallow(
<DetailView
errorGroup={props.errorGroup}
urlParams={props.urlParams}
location={{}}
/>,
storeState
location={{ state: '' }}
/>
);

expect(toJson(wrapper)).toMatchSnapshot();
expect(wrapper).toMatchSnapshot();
});
});
Loading

0 comments on commit 3a2db6e

Please sign in to comment.