fix(ui): published, draft and changed labels should now be correctly displayed (#8382)
Fixes the issue where the published or changed document is always shown as "Changed" instead of "Published" or "Draft"  Statuses: - Published - when the current version is also the published version - Changed - when the current version is a draft version but a published version exists - Draft - when the current version is a draft and no published versions exist --------- Co-authored-by: Jessica Chowdhury <jessica@trbl.design>
This commit is contained in:
@@ -647,7 +647,7 @@ describe('versions', () => {
|
||||
|
||||
await textField.fill('spanish published')
|
||||
await saveDocAndAssert(page)
|
||||
await expect(status).toContainText('Changed')
|
||||
await expect(status).toContainText('Published')
|
||||
|
||||
await textField.fill('spanish draft')
|
||||
await saveDocAndAssert(page, '#action-save-draft')
|
||||
@@ -662,6 +662,16 @@ describe('versions', () => {
|
||||
await expect(publishSpecificLocale).toContainText('English')
|
||||
await publishSpecificLocale.click()
|
||||
|
||||
await wait(500)
|
||||
|
||||
await expect(async () => {
|
||||
await expect(
|
||||
page.locator('.payload-toast-item:has-text("Updated successfully.")'),
|
||||
).toBeVisible()
|
||||
}).toPass({
|
||||
timeout: POLL_TOPASS_TIMEOUT,
|
||||
})
|
||||
|
||||
id = await page.locator('.id-label').getAttribute('title')
|
||||
|
||||
const data = await payload.find({
|
||||
|
||||
Reference in New Issue
Block a user