chore(alpha): update fields-relationship e2e tests (#5553)
* fix: handles filter options in form state merge * chore: fix and reintegrate fields-relationship e2e tests * chore: update withMergedProps function for e2e tests
This commit is contained in:
committed by
GitHub
parent
2a8b678a4b
commit
7cccca8194
@@ -192,7 +192,7 @@ export default buildConfigWithDefaults({
|
||||
},
|
||||
{
|
||||
admin: {
|
||||
useAsTitle: 'meta.title',
|
||||
useAsTitle: 'name',
|
||||
},
|
||||
fields: [
|
||||
...baseRelationshipFields,
|
||||
|
||||
@@ -251,7 +251,7 @@ describe('fields - relationship', () => {
|
||||
// then verify that the filtered field's options match
|
||||
let filteredField = page.locator(`#field-${fieldName} .react-select`)
|
||||
await filteredField.click({ delay: 100 })
|
||||
const filteredOptions = filteredField.locator('.rs__option')
|
||||
let filteredOptions = filteredField.locator('.rs__option')
|
||||
await expect(filteredOptions).toHaveCount(1) // one doc
|
||||
await filteredOptions.nth(0).click()
|
||||
await expect(filteredField).toContainText(relationOneDoc.id)
|
||||
@@ -268,6 +268,7 @@ describe('fields - relationship', () => {
|
||||
// then verify that the filtered field's options match
|
||||
filteredField = page.locator(`#field-${fieldName} .react-select`)
|
||||
await filteredField.click({ delay: 100 })
|
||||
filteredOptions = filteredField.locator('.rs__option')
|
||||
await expect(filteredOptions).toHaveCount(2) // two options because the currently selected option is still there
|
||||
await filteredOptions.nth(1).click()
|
||||
await expect(filteredField).toContainText(anotherRelationOneDoc.id)
|
||||
|
||||
Reference in New Issue
Block a user