feat(editor): header history, save line and Abandonner les modifications
Header Annuler/Retablir on every tab (aria-disabled, commit on pointerdown, refused blur commit skips the undo). Save line: unsaved count selector (savedDistance), saveLineState forms, server save time via readSaveTime (lastSave in the store, never the browser clock). Discard relabelled and names the stored copy. Tool column pair removed, glyphs in EditorGlyph. Rewritten or removed assertions (R-24): - editor-route.test: Revision 3 / unsaved text / Annuler les modifications -> save-line testid, Abandonner label, copy sentence in the dialog - editor-route-conflict, editor-route-recovery: Revision n and copy_cap/ copy_quota text queries -> save-line testid - editor-no-loss: discard button label - editor-annotations-tab: tool column undo/redo test -> no pair left (behaviour moved to editor-history-buttons.test) - e2e journey/annotations/recovery/structures/support saveDraft/lan: undo/redo and revision/unsaved text -> historyButton, saveLine helpers; structures toHaveCount(0) on old text -> exact Revision n line - editor-shell clickability: header Annuler/Retablir added
This commit is contained in:
1 parent
ab51ea764d
commit
99b669bf8f
29 files changed
+1397
-248
No files matched your search
@@ -8,11 +8,13 @@ import {
|
||||
editorActor,
|
||||
openEditor,
|
||||
openReferences,
|
||||
place,
|
||||
openSection,
|
||||
pickAnnotation,
|
||||
place,
|
||||
pointOf,
|
||||
revisionText,
|
||||
saveDraft,
|
||||
saveLine,
|
||||
seedDraft,
|
||||
selectTab,
|
||||
serverDocument,
|
||||
@@ -202,6 +204,9 @@ test.describe('editor structures (A4)', () => {
|
||||
await expect(
|
||||
node.getByText(dict['editor.findings.status.reviewed']),
|
||||
).toBeVisible()
|
||||
// The tab row (history buttons included) scrolled under the sticky top bar is not a
|
||||
// target-size finding of its own: audit it from the top.
|
||||
await page.evaluate(() => window.scrollTo(0, 0))
|
||||
await expectAccessible(page, 'the findings tree')
|
||||
|
||||
// Reorder: the new zone moves above the seeded one.
|
||||
@@ -244,9 +249,9 @@ test.describe('editor structures (A4)', () => {
|
||||
await page.reload()
|
||||
await selectTab(page, dict, 'findings')
|
||||
await expect(items.filter({ hasText: 'Catégorie renommée' })).toBeVisible()
|
||||
await expect(
|
||||
page.getByText(dict['editor.draft.status.unsaved'], { exact: false }),
|
||||
).toHaveCount(0)
|
||||
await expect(saveLine(page)).toHaveText(
|
||||
revisionText(dict, seed.revision + 1),
|
||||
)
|
||||
await expect(
|
||||
button(page, dict['editor.draft.recovery.restore']),
|
||||
).toHaveCount(0)
|
||||
|
||||
Reference in new issue
Block a user