From 698a8abe6ecf77beac19b991a54acbe176dbb750 Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Wed, 17 May 2023 12:25:24 -0400 Subject: [PATCH] chore: fixes failing e2e test when searching within a relationship field --- src/admin/components/elements/ReactSelect/index.tsx | 2 -- test/fields-relationship/e2e.spec.ts | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/admin/components/elements/ReactSelect/index.tsx b/src/admin/components/elements/ReactSelect/index.tsx index 6e43dbda3..1bc314e1b 100644 --- a/src/admin/components/elements/ReactSelect/index.tsx +++ b/src/admin/components/elements/ReactSelect/index.tsx @@ -33,7 +33,6 @@ const SelectAdapter: React.FC = (props) => { isLoading, onMenuOpen, components, - selectProps, } = props; const classes = [ @@ -48,7 +47,6 @@ const SelectAdapter: React.FC = (props) => { placeholder={getTranslation(placeholder, i18n)} captureMenuScroll {...props} - {...selectProps} value={value} onChange={onChange} isDisabled={disabled} diff --git a/test/fields-relationship/e2e.spec.ts b/test/fields-relationship/e2e.spec.ts index 3f736cd33..f02c058db 100644 --- a/test/fields-relationship/e2e.spec.ts +++ b/test/fields-relationship/e2e.spec.ts @@ -329,13 +329,14 @@ describe('fields - relationship', () => { test('should show useAsTitle on relation', async () => { await page.goto(url.edit(docWithExistingRelations.id)); - const field = page.locator('#field-relationshipWithTitle .relationship--single-value__text'); + const field = page.locator('#field-relationshipWithTitle'); + const value = field.locator('.relationship--single-value__text'); // Check existing relationship for correct title - await expect(field).toHaveText(relationWithTitle.name); + await expect(value).toHaveText(relationWithTitle.name); await field.click({ delay: 100 }); - const options = page.locator('.rs__option'); + const options = field.locator('.rs__option'); await expect(options).toHaveCount(2); });