mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -03:30
Fix tests after delete button cleanup
This commit is contained in:
@@ -54,9 +54,6 @@ describe('<UserToken/>', () => {
|
||||
description: 'cdfsg',
|
||||
scope: 'read',
|
||||
});
|
||||
TokensAPI.readOptions.mockResolvedValue({
|
||||
data: { actions: { POST: true } },
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<UserToken setBreadcrumb={jest.fn()} user={user} />
|
||||
@@ -87,15 +84,11 @@ describe('<UserToken/>', () => {
|
||||
description: 'cdfsg',
|
||||
scope: 'read',
|
||||
});
|
||||
TokensAPI.readOptions.mockResolvedValue({
|
||||
data: { actions: { POST: true } },
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<UserToken setBreadcrumb={jest.fn()} user={user} />
|
||||
);
|
||||
});
|
||||
expect(TokensAPI.readDetail).toBeCalledWith(2);
|
||||
expect(TokensAPI.readOptions).toBeCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,7 +57,6 @@ describe('<UserTokenDetail/>', () => {
|
||||
expect(
|
||||
wrapper.find('UserDateDetail[label="Last Modified"]').prop('date')
|
||||
).toBe('2020-06-23T19:56:38.441353Z');
|
||||
expect(wrapper.find('Button[aria-label="Edit"]').length).toBe(1);
|
||||
expect(wrapper.find('Button[aria-label="Delete"]').length).toBe(1);
|
||||
});
|
||||
test('should delete token properly', async () => {
|
||||
|
||||
Reference in New Issue
Block a user