fix(editor): Task 8 round 1, sync tag, cascaded leave ask
This commit is contained in:
1 parent
07bebbc855
commit
579d8afff4
10 files changed
+359
-83
No files matched your search
@@ -42,13 +42,18 @@ async function open(page: Page) {
|
||||
await page.goto('/app/admin')
|
||||
await stepUpAdmin(page, dict, actor.secret)
|
||||
await page.goto(overviewPath(seed.sheetId))
|
||||
await reopenDraft(page)
|
||||
return seed.sheetId
|
||||
}
|
||||
|
||||
/** From the overview, the draft through its link (same document). */
|
||||
async function reopenDraft(page: Page) {
|
||||
await page
|
||||
.getByRole('link', { name: dict['admin.overview.open_draft'] })
|
||||
.click()
|
||||
await expect(
|
||||
page.getByRole('heading', { level: 1, name: draftTitle(dict) }),
|
||||
).toBeVisible()
|
||||
return seed.sheetId
|
||||
}
|
||||
|
||||
/** The history menu's jump to the last entry of the overview, several entries back. */
|
||||
@@ -122,12 +127,7 @@ test.describe('leaving the editor by a history jump', () => {
|
||||
(url) => url.pathname === overviewPath(sheetId),
|
||||
)
|
||||
expect(await leftFlags(page)).toBe(0)
|
||||
await page
|
||||
.getByRole('link', { name: dict['admin.overview.open_draft'] })
|
||||
.click()
|
||||
await expect(
|
||||
page.getByRole('heading', { level: 1, name: draftTitle(dict) }),
|
||||
).toBeVisible()
|
||||
await reopenDraft(page)
|
||||
await expect(page.getByText(leftNotice)).toHaveCount(0)
|
||||
})
|
||||
|
||||
@@ -159,5 +159,7 @@ test.describe('leaving the editor by a history jump', () => {
|
||||
(url) => url.pathname === overviewPath(sheetId),
|
||||
)
|
||||
expect(await leftFlags(page)).toBe(0)
|
||||
await reopenDraft(page)
|
||||
await expect(page.getByText(leftNotice)).toHaveCount(0)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user