chore: fixes failing e2e test when searching within a relationship field
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user