From a6b90538ef7ba0c25b571fcf12e137afbb1331f9 Mon Sep 17 00:00:00 2001 From: Matthias Lindinger Date: Tue, 10 Mar 2026 08:18:30 +0100 Subject: [PATCH] Add test case Signed-off-by: Matthias Lindinger --- .../RepoUrlPicker/GitlabRepoPicker.test.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx index 0e461d745a..6cf1825460 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx @@ -176,5 +176,42 @@ describe('GitlabRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ owner: 'my-mock-owner' }); }); + + it('should render description if allowed owners are passed', async () => { + const { findByText } = await renderInTestApp( + + + , + ); + + expect( + await findByText( + /GitLab namespace where this repository will belong to./, + ), + ).toBeInTheDocument(); + }); + + it('should render description if no allowed owners are passed', async () => { + const { findByText } = await renderInTestApp( + + + , + ); + + expect( + await findByText( + /GitLab namespace where this repository will belong to./, + ), + ).toBeInTheDocument(); + }); }); });