Fix tests after delete button cleanup

This commit is contained in:
mabashian
2020-12-08 14:12:57 -05:00
parent 97837a05e6
commit f2c86cc962
2 changed files with 0 additions and 8 deletions

View File

@@ -54,9 +54,6 @@ describe('<UserToken/>', () => {
description: 'cdfsg', description: 'cdfsg',
scope: 'read', scope: 'read',
}); });
TokensAPI.readOptions.mockResolvedValue({
data: { actions: { POST: true } },
});
await act(async () => { await act(async () => {
wrapper = mountWithContexts( wrapper = mountWithContexts(
<UserToken setBreadcrumb={jest.fn()} user={user} /> <UserToken setBreadcrumb={jest.fn()} user={user} />
@@ -87,15 +84,11 @@ describe('<UserToken/>', () => {
description: 'cdfsg', description: 'cdfsg',
scope: 'read', scope: 'read',
}); });
TokensAPI.readOptions.mockResolvedValue({
data: { actions: { POST: true } },
});
await act(async () => { await act(async () => {
wrapper = mountWithContexts( wrapper = mountWithContexts(
<UserToken setBreadcrumb={jest.fn()} user={user} /> <UserToken setBreadcrumb={jest.fn()} user={user} />
); );
}); });
expect(TokensAPI.readDetail).toBeCalledWith(2); expect(TokensAPI.readDetail).toBeCalledWith(2);
expect(TokensAPI.readOptions).toBeCalled();
}); });
}); });

View File

@@ -57,7 +57,6 @@ describe('<UserTokenDetail/>', () => {
expect( expect(
wrapper.find('UserDateDetail[label="Last Modified"]').prop('date') wrapper.find('UserDateDetail[label="Last Modified"]').prop('date')
).toBe('2020-06-23T19:56:38.441353Z'); ).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); expect(wrapper.find('Button[aria-label="Delete"]').length).toBe(1);
}); });
test('should delete token properly', async () => { test('should delete token properly', async () => {