test(editor): reference dialog, filter and the owner journey, specs follow the dialog
This commit is contained in:
1 parent
7a64daf251
commit
8b42816270
20 files changed
+1546
-1171
No files matched your search
@@ -8,9 +8,9 @@ import {
|
||||
closeFinding,
|
||||
copyKeyOf,
|
||||
editorActor,
|
||||
expectNoDialog,
|
||||
geometryField,
|
||||
historyButton,
|
||||
libraryRoot,
|
||||
openEditor,
|
||||
openCitations,
|
||||
openTab,
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
selectTab,
|
||||
shapeWith,
|
||||
standardShape,
|
||||
startReference,
|
||||
storedCopy,
|
||||
UNSAVED_LINE,
|
||||
} from '../support/editor'
|
||||
@@ -217,21 +218,37 @@ test.describe('editor shell, width crossing (H)', () => {
|
||||
)
|
||||
})
|
||||
|
||||
test('the references form keeps its typed text, in the Références tab', async ({
|
||||
test('the reference dialog stays while narrow: draft, focus and a notice kept (R2F-5)', async ({
|
||||
page,
|
||||
}) => {
|
||||
await open(page)
|
||||
await openTab(page, dict, 'references')
|
||||
await startReference(page, dict)
|
||||
const field = page.locator('#reference-form-citation')
|
||||
await field.fill('Saisie')
|
||||
await expect(field).toBeFocused()
|
||||
await page.setViewportSize(NARROW)
|
||||
await expect(field).toBeVisible()
|
||||
await expect(field).toHaveAttribute('readonly', '')
|
||||
await expect(field).toHaveValue('Saisie')
|
||||
await expect(field).toBeFocused()
|
||||
await expect(
|
||||
page.getByText(dict['editor.findings.flip_narrow']),
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
page.getByRole('button', { name: dict['editor.reference.add'] }),
|
||||
).toBeDisabled()
|
||||
await page.setViewportSize(WIDE)
|
||||
await expect(field).not.toHaveAttribute('readonly', '')
|
||||
await expect(field).toHaveValue('Saisie')
|
||||
await expect(field).toBeFocused()
|
||||
await expect(saveLine(page)).not.toHaveText(UNSAVED_LINE)
|
||||
await page.keyboard.press('Escape')
|
||||
await page
|
||||
.getByRole('button', { name: dict['editor.references.add'] })
|
||||
.locator('dialog[open]')
|
||||
.getByRole('button', { name: dict['editor.findings.discard'] })
|
||||
.click()
|
||||
await keepsTypedValue(
|
||||
page,
|
||||
page.locator('#tab-reference-new-citation'),
|
||||
dict['editor.reference.add'],
|
||||
'references',
|
||||
)
|
||||
await expect(libraryRoot(page).getByRole('searchbox')).toBeVisible()
|
||||
await expectNoDialog(page)
|
||||
})
|
||||
|
||||
test('the annotation edit body keeps its tool and its pending creation', async ({
|
||||
|
||||
Reference in new issue
Block a user