Skip to content

Commit

Permalink
Polish 6.5 (elastic#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 <[email protected]>

* 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 31, 2018
1 parent 60e89d1 commit 3bc9ab0
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 3bc9ab0

Please sign in to comment.