chore: fixes failing e2e test when searching within a relationship field

This commit is contained in:
Jacob Fletcher
2023-05-17 12:25:24 -04:00
parent 1c25d965ac
commit 698a8abe6e
2 changed files with 4 additions and 5 deletions

View File

@@ -33,7 +33,6 @@ const SelectAdapter: React.FC<ReactSelectAdapterProps> = (props) => {
isLoading,
onMenuOpen,
components,
selectProps,
} = props;
const classes = [
@@ -48,7 +47,6 @@ const SelectAdapter: React.FC<ReactSelectAdapterProps> = (props) => {
placeholder={getTranslation(placeholder, i18n)}
captureMenuScroll
{...props}
{...selectProps}
value={value}
onChange={onChange}
isDisabled={disabled}

View File

@@ -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);
});