mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Merge pull request #6604 from jakemcdermott/remove-state-checks-from-user-test
Remove state checks from user list test Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
362fdaeecc
@ -121,17 +121,8 @@ describe('UsersList with full permissions', () => {
|
||||
});
|
||||
|
||||
test('Users are retrieved from the api and the components finishes loading', async () => {
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === true
|
||||
);
|
||||
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
|
||||
expect(loadUsers).toHaveBeenCalled();
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === false
|
||||
);
|
||||
});
|
||||
|
||||
test('Selects one team when row is checked', async () => {
|
||||
@ -255,17 +246,7 @@ describe('UsersList with full permissions', () => {
|
||||
});
|
||||
|
||||
test('Add button shown for users with ability to POST', async () => {
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === true
|
||||
);
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === false
|
||||
);
|
||||
expect(wrapper.find('ToolbarAddButton').length).toBe(1);
|
||||
await waitForElement(wrapper, 'ToolbarAddButton', el => el.length === 1);
|
||||
});
|
||||
});
|
||||
|
||||
@ -280,16 +261,8 @@ describe('UsersList without full permissions', () => {
|
||||
});
|
||||
|
||||
wrapper = mountWithContexts(<UsersList />);
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === true
|
||||
);
|
||||
await waitForElement(
|
||||
wrapper,
|
||||
'UsersList',
|
||||
el => el.state('hasContentLoading') === false
|
||||
);
|
||||
await waitForElement(wrapper, 'ContentLoading', el => el.length === 1);
|
||||
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
|
||||
expect(wrapper.find('ToolbarAddButton').length).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user