From dce50fe18bbc8fc5a42313ed61fb9f67d94f7f27 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Thu, 3 Jan 2019 09:40:48 -0500 Subject: [PATCH] update route group params --- __tests__/App.test.jsx | 18 +++---- .../components/NavExpandableGroup.test.jsx | 4 +- src/App.jsx | 8 ++-- src/components/NavExpandableGroup.jsx | 4 +- src/index.jsx | 10 ++-- .../Organizations/views/Organization.add.jsx | 47 ++++++++++--------- 6 files changed, 46 insertions(+), 45 deletions(-) diff --git a/__tests__/App.test.jsx b/__tests__/App.test.jsx index 9048c3fab5..420d6832ab 100644 --- a/__tests__/App.test.jsx +++ b/__tests__/App.test.jsx @@ -17,7 +17,7 @@ describe('', () => { ', () => { ], }, { - title: 'Group Two', + groupTitle: 'Group Two', groupId: 'group_two', routes: [ { title: 'Fiz', path: '/fiz' }, @@ -77,19 +77,13 @@ describe('', () => { expect(appWrapper.state().activeGroup).toBe(DEFAULT_ACTIVE_GROUP); }); - test('logout button click triggers expected callback', async (done) => { + test('onLogout makes expected call to api client', async (done) => { const logout = jest.fn(() => Promise.resolve()); const api = { logout }; - const appWrapper = mount( - - - - - - ); + const appWrapper = shallow(); - appWrapper.find('button[id="button-logout"]').simulate('click'); + appWrapper.instance().onLogout(); await asyncFlush(); expect(api.logout).toHaveBeenCalledTimes(1); @@ -106,6 +100,6 @@ describe('', () => { ); - expect(api.get).toHaveBeenCalledTimes(1); + expect(getConfig).toHaveBeenCalledTimes(1); }); }); diff --git a/__tests__/components/NavExpandableGroup.test.jsx b/__tests__/components/NavExpandableGroup.test.jsx index 68cf571f7d..7619dcbfcd 100644 --- a/__tests__/components/NavExpandableGroup.test.jsx +++ b/__tests__/components/NavExpandableGroup.test.jsx @@ -12,7 +12,7 @@ describe('NavExpandableGroup', () => {