From 2c4374a97cc34ed001f4ca6903ba035a55a1d120 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Fri, 14 Jun 2024 11:51:43 +0200 Subject: [PATCH] chore: remove unnecessary test Signed-off-by: Benjamin Janssens --- .../RepoUrlPicker/RepoUrlPicker.test.tsx | 58 ------------------- 1 file changed, 58 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 573838b960..59c09c106c 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -316,64 +316,6 @@ describe('RepoUrlPicker', () => { }); }); - it('should call the scmAuthApi with the correct params if only a project is set', async () => { - const SecretsComponent = () => { - const { secrets } = useTemplateSecrets(); - return ( -
{JSON.stringify({ secrets })}
- ); - }; - const { getByTestId } = await renderInTestApp( - - -
, - }} - /> - - - , - ); - - await act(async () => { - // need to wait for the debounce to finish - await new Promise(resolve => setTimeout(resolve, 600)); - }); - - expect(mockScmAuthApi.getCredentials).toHaveBeenCalledWith({ - url: 'https://server.bitbucket.org', - additionalScope: { - repoWrite: true, - }, - }); - - const currentSecrets = JSON.parse( - getByTestId('current-secrets').textContent!, - ); - - expect(currentSecrets).toEqual({ - secrets: { testKey: 'abc123' }, - }); - }); - it('should not call the scmAuthApi if secret is available in the state', async () => { const SecretsComponent = () => { const { secrets } = useTemplateSecrets();