diff --git a/__tests__/App.test.jsx b/__tests__/App.test.jsx
index 013e5cf725..0a1870eca0 100644
--- a/__tests__/App.test.jsx
+++ b/__tests__/App.test.jsx
@@ -108,17 +108,6 @@ describe('', () => {
});
});
- test('onLogoClick sets selected nav back to defaults', () => {
- const appWrapper = shallow();
-
- appWrapper.setState({ activeGroup: 'foo', activeItem: 'bar' });
- expect(appWrapper.state().activeItem).toBe('bar');
- expect(appWrapper.state().activeGroup).toBe('foo');
-
- appWrapper.instance().onLogoClick();
- expect(appWrapper.state().activeGroup).toBe(DEFAULT_ACTIVE_GROUP);
- });
-
test('onLogout makes expected call to api client', async (done) => {
const logout = jest.fn(() => Promise.resolve());
const api = { logout };
diff --git a/__tests__/components/TowerLogo.test.jsx b/__tests__/components/TowerLogo.test.jsx
index 10e3461443..28151624f3 100644
--- a/__tests__/components/TowerLogo.test.jsx
+++ b/__tests__/components/TowerLogo.test.jsx
@@ -29,11 +29,10 @@ describe('', () => {
});
test('adds navigation to route history on click', () => {
- const onLogoClick = jest.fn();
logoWrapper = mount(
-
+
);
@@ -43,12 +42,26 @@ describe('', () => {
expect(towerLogoElem.props().history.length).toBe(2);
});
+ test('linkTo prop is optional', () => {
+ logoWrapper = mount(
+
+
+
+
+
+ );
+ findChildren();
+ expect(towerLogoElem.props().history.length).toBe(1);
+ logoWrapper.simulate('click');
+ expect(towerLogoElem.props().history.length).toBe(1);
+ });
+
test('handles mouse over and out state.hover changes', () => {
const onLogoClick = jest.fn();
logoWrapper = mount(
-
+
);
diff --git a/src/App.jsx b/src/App.jsx
index a87b1a7944..e8de658220 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -34,7 +34,6 @@ class App extends Component {
this.onLogout = this.onLogout.bind(this);
this.onAboutModalClose = this.onAboutModalClose.bind(this);
this.onAboutModalOpen = this.onAboutModalOpen.bind(this);
- this.onLogoClick = this.onLogoClick.bind(this);
this.onNavToggle = this.onNavToggle.bind(this);
};
@@ -72,10 +71,6 @@ class App extends Component {
this.setState(({ isNavOpen }) => ({ isNavOpen: !isNavOpen }));
}
- onLogoClick () {
- this.setState({ activeGroup: 'views_group' });
- }
-
render () {
const {
ansible_version,
@@ -105,11 +100,7 @@ class App extends Component {
- }
+ logo={}
toolbar={