mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 00:37:37 -02:30
Add new tests for rbac on some of the org pages
This commit is contained in:
@@ -10,4 +10,14 @@ describe('<OrganizationView />', () => {
|
||||
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);
|
||||
expect(wrapper.find('.pf-c-tabs__button[children="Notifications"]').length).toBe(0);
|
||||
wrapper.find('Organization').setState({
|
||||
isNotifAdmin: true
|
||||
});
|
||||
expect(wrapper.find('.pf-c-tabs__item').length).toBe(4);
|
||||
expect(wrapper.find('.pf-c-tabs__button[children="Notifications"]').length).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user