fix: localised relationship fields (#7178)
Fixes the issue where locale is not passed into the relationship field resulting in documents without titles in some situations 
This commit is contained in:
@@ -234,6 +234,23 @@ describe('Localization', () => {
|
||||
await expect(page.locator('.row-1 .cell-title')).toContainText(spanishTitle)
|
||||
})
|
||||
})
|
||||
|
||||
describe('localized relationships', () => {
|
||||
test('ensure relationship field fetches are localised as well', async () => {
|
||||
await page.goto(url.list)
|
||||
await changeLocale(page, spanishLocale)
|
||||
|
||||
const localisedPost = page.locator('.cell-title a').first()
|
||||
const localisedPostUrl = await localisedPost.getAttribute('href')
|
||||
await page.goto(serverURL + localisedPostUrl)
|
||||
await page.waitForURL(serverURL + localisedPostUrl)
|
||||
|
||||
const selectField = page.locator('#field-children .rs__control')
|
||||
await selectField.click()
|
||||
|
||||
await expect(page.locator('#field-children .rs__menu')).toContainText('spanish-relation2')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
async function fillValues(data: Partial<LocalizedPost>) {
|
||||
|
||||
Reference in New Issue
Block a user