upgrade to patternfly 2.x, pf/react-core 3.x (#184)

This commit is contained in:
Keith Grant
2019-04-30 08:19:19 -04:00
committed by GitHub
parent 6fe93f474f
commit ffade973a9
13 changed files with 1317 additions and 904 deletions

View File

@@ -2,14 +2,16 @@ import React from 'react';
import { mountWithContexts } from '../../../../enzymeHelpers';
import Organization from '../../../../../src/pages/Organizations/screens/Organization/Organization';
describe('<OrganizationView />', () => {
describe.only('<Organization />', () => {
const me = {
is_super_user: true,
is_system_auditor: false
};
test('initially renders succesfully', () => {
mountWithContexts(<Organization me={me} />);
});
test('notifications tab shown/hidden based on permissions', () => {
const wrapper = mountWithContexts(<Organization me={me} />);
expect(wrapper.find('.pf-c-tabs__item').length).toBe(3);
@@ -18,6 +20,6 @@ describe('<OrganizationView />', () => {
isNotifAdmin: true
});
expect(wrapper.find('.pf-c-tabs__item').length).toBe(4);
expect(wrapper.find('.pf-c-tabs__button[children="Notifications"]').length).toBe(1);
expect(wrapper.find('button.pf-c-tabs__button[children="Notifications"]').length).toBe(1);
});
});