diff --git a/src/components/ImportForm/ComponentSection/GitOptions.tsx b/src/components/ImportForm/ComponentSection/GitOptions.tsx index 0c628b107..f5004a696 100644 --- a/src/components/ImportForm/ComponentSection/GitOptions.tsx +++ b/src/components/ImportForm/ComponentSection/GitOptions.tsx @@ -27,14 +27,14 @@ const GitOptions: React.FC> = ({ name="source.git.revision" label="Git reference" helperText="Optional branch, tag or commit." - data-testid="git-reference" + data-test="git-reference" /> } diff --git a/src/components/ImportForm/ComponentSection/__tests__/ComponentSection.spec.tsx b/src/components/ImportForm/ComponentSection/__tests__/ComponentSection.spec.tsx index ff2b18126..ad0cc5ec2 100644 --- a/src/components/ImportForm/ComponentSection/__tests__/ComponentSection.spec.tsx +++ b/src/components/ImportForm/ComponentSection/__tests__/ComponentSection.spec.tsx @@ -58,10 +58,9 @@ describe('ComponentSection', () => { await user.type(source, 'https://gitlab.com/abcd/repo.git'); await user.tab(); - await waitFor(() => { + await waitFor(() => // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion - const inputElement = screen.getByTestId('url-annotation') as HTMLInputElement; - expect(inputElement.value).toBe('gitlab.com'); - }); + expect((screen.getByTestId('url-annotation') as HTMLInputElement).value).toBe('gitlab.com'), + ); }); });