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
@@ -3,6 +3,7 @@ import type { Locator, Page, TestInfo } from '@playwright/test'
|
||||
import { expect, test } from '../support/browser'
|
||||
import { dropLateReplays, routeToSandbox } from '../support/sandbox'
|
||||
import {
|
||||
addReference,
|
||||
backToDrawing,
|
||||
copyKeyOf,
|
||||
storedCopy,
|
||||
@@ -94,20 +95,18 @@ test.describe('editor shell, kept places (B2a)', () => {
|
||||
expect(await layerTransform(page)).toBe(zoomed)
|
||||
})
|
||||
|
||||
test('the Références tab keeps its form text and no id repeats, panel open included', async ({
|
||||
test('the Références tab keeps its search and no id repeats, panel open included', async ({
|
||||
page,
|
||||
}) => {
|
||||
await open(page)
|
||||
await openTab(page, dict, 'references')
|
||||
await page
|
||||
.getByRole('button', { name: dict['editor.references.add'] })
|
||||
.click()
|
||||
await page.locator('#tab-reference-new-citation').fill('Smith 1999')
|
||||
const search = page.getByRole('searchbox', {
|
||||
name: dict['editor.references.search'],
|
||||
})
|
||||
await search.fill('Smith 1999')
|
||||
await openTab(page, dict, 'general')
|
||||
await openTab(page, dict, 'references')
|
||||
await expect(page.locator('#tab-reference-new-citation')).toHaveValue(
|
||||
'Smith 1999',
|
||||
)
|
||||
await expect(search).toHaveValue('Smith 1999')
|
||||
for (const tab of ['general', 'findings', 'verification']) {
|
||||
await selectTab(page, dict, tab)
|
||||
}
|
||||
@@ -133,14 +132,7 @@ test.describe('editor shell, kept places (B2a)', () => {
|
||||
await open(page)
|
||||
// An edit first, so « Enregistrer » is enabled: a reference added in its tab.
|
||||
await openTab(page, dict, 'references')
|
||||
await page
|
||||
.getByRole('button', { name: dict['editor.references.add'] })
|
||||
.click()
|
||||
await page.locator('#tab-reference-new-type').selectOption('book')
|
||||
await page.locator('#tab-reference-new-citation').fill('Smith 1999')
|
||||
await page
|
||||
.getByRole('button', { name: dict['editor.reference.add'] })
|
||||
.click()
|
||||
await addReference(page, dict, 'Smith 1999')
|
||||
await openCitations(page, dict, 'Constat A')
|
||||
const targets = [
|
||||
page.getByRole('button', { name: dict['common.save'], exact: true }),
|
||||
|
||||
Reference in new issue
Block a user