fix: switch from id to title
Signed-off-by: asheen1234 <sergeantnumnumz@gmail.com>
This commit is contained in:
+3
-1
@@ -27,7 +27,9 @@ describe('GitLabRepoOwnerPicker', () => {
|
||||
const scaffolderApiMock: Partial<ScaffolderApi> = {
|
||||
autocomplete: jest
|
||||
.fn()
|
||||
.mockResolvedValue({ results: [{ id: 'owner1' }, { id: 'owner2' }] }),
|
||||
.mockResolvedValue({
|
||||
results: [{ title: 'owner1' }, { title: 'owner2' }],
|
||||
}),
|
||||
};
|
||||
|
||||
it('renders an input field', async () => {
|
||||
|
||||
@@ -69,8 +69,8 @@ export const GitLabRepoOwnerPicker = ({
|
||||
})
|
||||
.then(({ results }) => {
|
||||
const owners = results
|
||||
.map(r => r.id)
|
||||
.filter(id => !excludedOwners.includes(id));
|
||||
.map(r => r.title!)
|
||||
.filter(title => !excludedOwners.includes(title));
|
||||
|
||||
setAvailableOwners(owners);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user