test(editor): lot K review fixes, filled-document save proof
This commit is contained in:
1 parent
bb99edd2dd
commit
4cc27a8231
10 files changed
+132
-32
No files matched your search
@@ -49,16 +49,21 @@ async function createSheetFromAdmin(page: Page, tag: string): Promise<string> {
|
||||
.getByRole('link', { name: dict['admin.home.all_sheets'] })
|
||||
.click()
|
||||
await main(page).getByRole('link', { name: dict['admin.sheets.new'] }).click()
|
||||
await page.getByLabel(dict['admin.sheet_form.name_fr']).fill(`Chien ${tag}`)
|
||||
await page.getByLabel(dict['admin.sheet_form.name_en']).fill(`Dog ${tag}`)
|
||||
// The form is briefly replaced while the page re-reads the account's rights: a
|
||||
// choice made in that instant is lost, so the species is chosen last.
|
||||
// The list page has a species filter with the same label: wait for the form's heading.
|
||||
await expect(
|
||||
main(page).getByRole('heading', {
|
||||
level: 1,
|
||||
name: dict['admin.sheets.new'],
|
||||
}),
|
||||
).toBeVisible()
|
||||
const species = page.getByLabel(dict['admin.sheet_form.species'], {
|
||||
exact: true,
|
||||
})
|
||||
await expect(species.locator('option[value="canine"]')).toHaveCount(1)
|
||||
await species.selectOption('canine')
|
||||
await expect(species).toHaveValue('canine')
|
||||
await page.getByLabel(dict['admin.sheet_form.name_fr']).fill(`Chien ${tag}`)
|
||||
await page.getByLabel(dict['admin.sheet_form.name_en']).fill(`Dog ${tag}`)
|
||||
await page
|
||||
.getByRole('button', { name: dict['admin.sheet_form.submit'] })
|
||||
.click()
|
||||
|
||||
Reference in new issue
Block a user