Repository navigation
Description
Context — e2e/tests/ holds 44 scenarios, about 9,000 lines, each its own file and its own launch on a virgin profile: 01–35 are the previous suite ported, 36–40 the acceptance sheet's cases, 41–44 were added since. The files follow the history of the application, not what a user does: a note's life is told over 02, 03, 04, 22 and 41, the HTTP area over 30, 31, 32, 34, 35 and 40, and 36–40 walk again paths that a ported scenario holds. Every launch is paid in full on Windows, where the suite is bound by the software renderer. Asked by the owner: start again from what a user needs, with precise journeys, and not end with sixty tests. It replaces the merging of scenarios begun in #1501, whose groups serve here as input.
Change — The suite is rewritten from the user's side: about a dozen journeys, each one a person with a goal walking the application from one end to the other in a single launch, together meeting every path a user takes through the application, at least in its nominal case. A journey's steps are what the user lives, in that order. The branches, the edge cases and the error codes are not walked here: they are held by the unit tests (#1714). What the suite is for is to prove, on Windows, Linux and macOS alike, that the application behaves the same for the person using it: how it starts, is reached from outside (a second launch, the global actions, the tray), hides, comes back and ends, and how it exchanges with the system (clipboard, file dialogs, window). And a person who was not here must be able to read and write the suite: a journey reads as its steps, in the user's words, without the plumbing, which lives in an SDK of the user's actions on the window (#1829).
This ticket is the reference of the journeys and of their rules. The work is in the tickets of the milestone: the SDK first (#1829), then the journeys in eight lots, each its own pull request into dev/1.3.2: 1 and 13 (#1830), 2 and 3 (#1831), 4 (#1832), 5 and 6 (#1833), 7 (#1834), 8 (#1835), 9 and 10 (#1836), 11 and 12 (#1837).
To do
- Before any scenario is written, the journeys below are the first deliverable: the owner reads them. The reference is the application, not the guides: every nominal path a user takes is a step of a journey, or is named as out of reach. The guides are not mapped step by step; the documentation viewer is checked only for the number of its sections and their kind (1.4).
- A journey is one file, one
#[test]of namede2e::steps, each step opening on what the user wants and ending on what they see. It launches once, seeds its own state, waits on conditions (eventually) and never on a duration, and a failure stays located: the last screen and the log intarget/e2e/scenarios/<scenario>/. Only a journey whose point is the virgin profile (1) or a profile left with no library (12) starts empty. - Few files. The suite stays at about thirteen journey files, fifteen at most. A path found later becomes a step of the journey it belongs to, not a new file. The SDK is one file per area (E2E: an SDK of the user's actions on the window, to write journeys #1829), not one per journey.
- Readable and writable by a person who did not write it. Today the driver is low-level (
click,press,eventuallyon anauthor_id) and every file redefines its own private functions, which is what makes a scenario long. The journeys are written on the SDK of the user's actions (E2E: an SDK of the user's actions on the window, to write journeys #1829): methods that press a button, a shortcut, type a text in a field, drag, read the screen, named in the user's words and grouped by area. A journey describes the actions; their carrying out on the window lives in the SDK. The SDK goes only through the window, as a person does: it never calls the core, never injects an action, never writes the profile, and a journey's set-up is made of the same actions. The rules:- A step is three to eight lines: what the user does, then what they see.
- The SDK acts and reads; a step asserts, with
expect_…and a sentence. A failure says what the user would have seen (« the palette is open on the recent notes »), never an id. - No
author_id, coordinate or duration in a journey: controls and places are named (board().drag_card_into("Deploy", "Infra")). - A journey defines no action of its own: one it lacks is added to the SDK.
- A file is named after its goal:
01_first_day.rs,02_snippet_to_paste.rs… - The style, fixed once by this example:
step("an empty snippet left by Esc writes nothing", || { app.notes().new_snippet(); app.press(Shortcut::Escape); app.notes().expect_cards(0, "no note was written"); });
- A short section in
CONTRIBUTING.mdfor a developer new to the project, brought by E2E: an SDK of the user's actions on the window, to write journeys #1829: running the suite or one journey, watching one run with every frame painted (DEVNOTES_E2E_PAINT_ALL,DEVNOTES_E2E_GPU) and why CI paints nothing, where captures and logs go, and what to do when a change breaks a journey. - The same behaviour on every system. All journeys run on the three platforms of the CI
e2ejob. A step that must differ by system names the difference and asserts that system's own answer (macOS keeps its own window buttons and minimises a closed window, Linux serves the tray on a bus): no step is skipped bycfgwithout being said. The contract that is walked end to end, in journey 7 and in the steps of the others that touch it: the single instance (a second launch hands over to the running window and ends); each global action, with the window shown, hidden to the tray and minimised; the tray's entries (Open DevNotes, Palette, New note, Paste from clipboard, Quit); Close to tray and Minimize to tray, on and off; relaunch and quit, quitting asking before it loses a request left changed; the clipboard both ways (a note copied, the clipboard captured); the file dialogs (import, export, attach, save an attachment elsewhere, save an answer, a request's file body, a runner's data file, a tool's file read or saved); the window's state remembered. What a scenario cannot reach is named, not left silent. - The update check: today every launch of the
e2eflavour asks GitHub (desktop.rs,UPDATES), so a branch older than the last release would see the prompt open in the middle of a scenario. A door of thee2eflavour points the check to the scenario's local server (e2e/src/server.rs), and step 13.7 walks the prompt. - The old scenarios are read for what they learned about the driver (focus waits, the renderer's pace, the doors
--actionandDEVNOTES_E2E_DIALOG), not as a structure. Each step of an old file is found in a journey or named as dropped in the pull request; the old file is deleted as its journey lands, so that two suites are never left side by side. - Out of reach, as today: the system's file dialog itself (the flavour answers a path), a file dropped on the window from the system, a global accelerator pressed on the machine (a second launch's
--actionstands for it), a shortcut already held by another application at startup (the flavour takes no global key), the session entry Start with the system writes (the flavour flips the switch only), a link opened in the browser, an attachment opened in its application, and the installation of an update and of the packages (packages.yml). - The journeys land in the eight lots named above, after the SDK; each lot adds to the SDK the actions it needs.
- The documents that name the scenarios follow, with the last lot to land: the E2E line of
CLAUDE.md(01–35),docs/architecture.md→ "The scenarios, on the assembled window" (« One file per scenario », the list of journeys), and thedesktop-e2e-testingskill. - The suite's time, its number of launches and its lines, before (44 launches) and after, from the CI
e2ejob on the three platforms.
The journeys
1. First day — a virgin profile, a real relaunch
- The launch writes nothing in the terminal. The gate asks to protect the library: a phrase under twelve characters, or two that differ, is refused; a good one opens the Notes area on the Getting started space and its sample notes.
- I quit and start again: the gate asks for the phrase; a wrong one is refused and nothing opens; the right one opens the library.
- I follow the first tour on the samples themselves: open a sample from its card, copy psql connection and fill its fields, open the API response as a graph, find a word in Release day with Ctrl+F, format the snippet to format, tick an item of Things to try from its card.
- About → Documentation opens, offline, with its sections, each of its kind; Esc returns where I was.
2. A snippet, from writing to pasting
- New snippet then Esc on an empty one writes nothing. Typing a title, a language chosen from the keyboard in its menu, code with
{{host}}and{{port=22}}, a context and tags writes it on the way out; the card shows them, the footer counts what the code holds. - I copy it from its card: it asks for the fields, previews the result and copies it filled; a field left empty takes the value the text suggests; the values come back next time; Copy as is keeps the braces; cancelling keeps nothing. A note with no field is copied at once from its card, and the copy is acknowledged.
- I format it: the sample written on one line is formatted, its fields intact, the banner says how many lines changed and Undo goes back; a syntax error is said; a language Prettier does not read leaves the button disabled and says why.
- A JSON snippet opens as a graph, a tree and side by side: selecting a node selects its lines, a search steps to its matches, everything folds and opens.
- I find and replace in the code, keep Tab in the text, expand the note over the cards and fold its header: the draft survives each. A title being typed is kept when I click another card, and when I quit with the editor open.
- I reach the cards from the keyboard: the arrows walk them, Enter opens one. From its card's ⋯ menu I duplicate the snippet, and send the copy to another space with Move to…
3. Keeping, correcting and losing a note
- I pin it, give it a priority from its digit and a due date: it sorts on top, wears its priority, and Untriaged finds it.
- I attach a file and a pasted image: the card counts them, the image grows in the lightbox, two files of one name stay apart, a file over 10 MB is refused, an attachment is saved elsewhere, a removal needs a second click.
- I edit the code twice: History lists the versions newest first, shows what going back would change, and going back drops the later ones. A Note keeps its versions too; a todo list has none.
- I delete it from the keyboard, in two presses: the undo bar takes it back; once the bar has gone, Ctrl+Z still does.
- I delete again: the Trash restores one note, deletes one for good and empties the rest; a relaunch finds it as left.
4. The other kinds of note
- Note, made with Ctrl+Shift+N: written formatted from every button of the toolbar and the shortcuts (heading, bold, italic, strikethrough, inline code, quote, link, lists, table grown by a row and a column, a pasted code block keeping its language); a box ticked on the card or in the editor is kept,
2 * 3 * 4stays as typed; Present steps through the sections, opens the map of headings and leaves on Esc. - Todo list, made with Ctrl+Shift+L: typed a row at a time, split by Enter, pasted line by line, reordered with Alt+arrows, an empty row removed; ticked from the card without opening it, the card showing its progress.
- Calculation, made with Ctrl+Shift+M: each line computed as it is typed, a name usable below it, an error said beside its line, results picked and summed in the footer, the last lines on the card; a relaunch shows that only what I wrote was kept.
- Drawing, made with Ctrl+Shift+D: shapes, an arrow that follows its shape, text, a shape removed with Delete, zoomed and shown whole with F; the card shows its picture; it is exported as a PNG and an SVG, and inserted into the Note of step 1, which shows it, resized by its corners.
- Code snippet with Ctrl+N. The Kind menu turns the list and a snippet into a Note; a drawing offers no change.
5. Finding things
- Ctrl+K goes to the search. I search with the accents left out (
deploiementfinds « Déploiement »), and a word of a list item, of a source and a tag: each card quotes the matching line; nothing found says so. - I filter: All, Pinned, Untriaged; the Type, Priority, Tags and Format menus with their counts, several values of one menu adding up, the menu saying how many are ticked; Clear the filters removes them with the search.
- I sort and group by date, priority, format and title, with Pinned first; a group folds; the choice comes back after a relaunch.
- I manage the tags: renamed on all their notes, corrected in case alone, merged onto an existing tag, deleted — each said before it runs.
- I select several notes (X, Ctrl-click, Shift-click) and move them, set a priority, add a tag, send them to the trash: each action says what it changed and undoes exactly that. Esc steps back from the selection, then the filters.
6. Spaces, folders and the board
- I make a space, rename it, pin it and choose it, and it is remembered; All spaces shows every note, a space its own; deleting it asks where its notes go, and needs a second space.
- I make a folder (a second under the same name is refused), a sub-folder, rename it, change a colour; I file a selection into it and take it back, a note filed from its card wears the folder's chip; deleting the folder leaves its notes in its parent.
- I drag a folder onto another and offer it back with Alt+arrows, then onto another space, where it arrives with its notes; deleted with its notes, they wait in the trash.
- On the Board, folders are zones holding their notes: I drag a card into a zone and out, move and resize a zone, draw a folder on the ground, tick a zone, then Align and Other arrangements, undone. File into is the keyboard twin. After a relaunch the layout is as left and the view is remembered space by space.
- I open a folder: empty, it offers the card a note is made from; from a zone's title, its own board one level down, with its breadcrumb; a note made inside is filed there. Esc gives the search back, then leaves the folder.
7. Reaching DevNotes from anywhere — the same on every system
- A second launch while DevNotes runs hands over to the running window and ends, without a second window.
- The palette opens from the window's key and from a second launch's action (
--action palette): it narrows as I type, opens a note on Enter, copies with Ctrl+C after asking the fields, offers + Create a note “…” when nothing matches;>lists the commands,@chooses where to search, the notes of one space included,#lists a tag; it also finds requests, tools and spaces. - The clipboard captured into a note and a new empty note, each from a second launch's action, the window shown.
- With Close to tray, the close button puts the window away and the application stays, however the system does it (macOS minimises it). With Minimize to tray, minimising puts it away too. The global actions still answer with the window put away and with it minimised: the palette comes up over it, a note is made, the clipboard is captured. A second launch brings the window back.
- The tray's entries — Open DevNotes, Palette, New note, Paste from clipboard, Quit — each do what they say, driven the same way on every system, and under Linux through the real item served on a bus of the scenario's own. Open DevNotes brings the window back as it was; Quit ends the application.
- With Close to tray off, the close button ends the application, and the next launch finds the library as it was left.
8. The tools
- From the notes, the shortcut and the tool search (Ctrl+Shift+T) reach the tools; a keyword finds a tool; the home sorts them by category.
- Every tool and every reference of the catalogue, walked as one table (a row per tool: its name, what its Example answers): opened from the keyboard, its Example typed in, its answer read, copied as shown and, where they differ, Raw; a reference searched and a row of it found.
- A star makes a favourite and the last ones opened are Recent; both survive a relaunch.
- Save as note files the result with its title, space, folder and tags, never what was typed; a tool's input is filled from a note.
- The tools that touch files: a file hashed, a file read into Base64 with its image's preview and decoded bytes saved back, a QR code saved as PNG and SVG, a fictitious identity saved.
9. Calling an API
- From the empty rail I make a collection, a folder and a request, moved with Alt+arrows, filed and taken out with Alt+→ and Alt+←, renamed in place and with F2; a request and a folder deleted after confirmation; the fold is kept across a relaunch, the tabs reopen in the order they were dragged to, a middle click closes one, and a draft asks before it closes.
- I write a request with parameters, headers, Inherited auth taken from the collection's Settings… (its headers added too), then Basic, Bearer and API key, and bodies in JSON, form, multipart and a file; Ctrl+Enter sends it to the local server: status, duration and size, the body formatted, raw, as a tree and as a graph, the headers, the cookies, the timeline; Ctrl+S saves it into the collection. A slow send is cancelled. A value of the answer is kept in a variable by a rule made from its explorer, and the next request uses it; the cookie jar lists what the server set, and empties.
- A GraphQL request names the variables it lacks, and is sent; a WebSocket connects, the log shows each message sent and received, a message kept is sent again.
- Two environments, Local and Production, each with a colour and a secret:
{{base_url}}resolves from the chosen level and its card says from where; the secret is masked and shown when asked; a name defined nowhere blocks the send and Set in… leads to where it goes; Production, protected, asks before a POST and not before a GET. - The request written as code for several targets, its secret left as a variable until a yes.
- The history holds the sends with their secrets masked, reopens one as a request or a draft and erases it; an answer is saved to a file and kept as a note.
10. Scripts, tests and runs
- A script before the send adds a header; a script after the response keeps a value of the answer in a variable the next request uses; a test reads the answer and appears in the Tests tab with what was expected and received; the console hears all of them.
- A script that throws stops the send and leads back to its line; a file a script asks to send waits for a yes.
- I run the collection over two iterations with a data file, one request left out with Space: the results list every other request, what failed opens on its assertion, Stop at the first failure ends the run, nothing goes into the history; the order I arranged is kept across a relaunch, and quitting with a request left changed asks first.
11. Several libraries, and moving notes between them
- From File → Libraries… I create a second library with its own phrase, and rename it: the gate lists both, each opens with its own phrase and its own samples.
- A switch asks before it loses a request left changed; a deletion is named before it runs; neither the open library nor the last one can be deleted.
- I export everything, a space with a phrase, everything in the clear, and a selection; an export of nothing asks nothing and leaves no file.
- In the other library I import them: a protected file asks its phrase, spaces merge by name, a note already there is skipped so a second import adds nothing, folders come back arranged, and each import reports, even when it changed nothing. Copy selection as Markdown puts title, space, context, tags and content on the clipboard.
12. Looking after the library — ends on a profile with no library
- A copy is taken at launch. I change the passphrase: the session carries on; after a quit the old phrase is refused and the new one opens.
- I delete notes then restore the launch's copy, taken before the change: it opens with the new phrase, the library comes back and the one it replaced is set aside, with its place told.
- With the application closed I damage the database file: the gate says so instead of starting on it and offers to set it aside, the passphrase unchanged.
- Forgotten your passphrase? archives the library and the gate asks for a new phrase.
13. Making it mine
- A preference applies on a button: the theme and the density show while chosen and go back on Cancel; Apply keeps them; the language is switched; the file on disk holds one key per setting and nothing before Apply. The title bar's button switches the theme in one click.
- The default note type, the lines a card previews, indenting with Tab, line wrapping, the calculation's decimals and the acknowledgement of a copy are each seen where they act.
- A global variable
hostis offered to a snippet's{{host}}; what is typed on the note comes first. - I move a canvas key; a combination another action holds is flagged; Reset goes back; the area keys are read by position.
- Ctrl+1/2/3 and the title bar reach Notes, Tools and HTTP, each keeping its state, and the window reopens on the last area.
- The window is maximised then restored, by its control and by a double click on the title bar, and the next launch remembers it; it is minimised; it is closed.
- About shows the version, Keyboard shortcuts lists them, What's new reads the changelog. An update served by the local server is offered: Later closes the prompt, Do not offer version … again silences that version over a relaunch, Check for updates finds it again.
Tests
- This ticket is about tests: the
e2ejob is green on Windows, Linux and macOS after each merge, and after the last one every step of the 44 old files is found in a journey or named as dropped in a pull request. - Every nominal path of the application is a step of a journey or named out of reach, and the suite's launches go from 44 to about 13, in fifteen files at most, without the CI time growing.
- Readable by someone new: a person who has not seen the suite writes one step from
CONTRIBUTING.mdand the SDK's catalogue alone, and no journey defines an action of its own. - A journey's failure points at its step: the last screen and the log are left in
target/e2e/scenarios/<scenario>/.
Generated by Claude Code
Activity
vmillet-dev commentedon Dec 4, 2026
Done in
dev/1.3.2: the end-to-end suite is now thirteen journeys,e2e/tests/01_first_day.rsto13_making_it_mine.rs, each one#[test]on one launch, written with the SDK of #1860 (e2e/src/sdk/) — noauthor_id, coordinate or duration in a journey.Lots: #1861, #1862, #1863, #1864, #1869, #1873, #1878, #1879. Each lot's pull request holds the table of the old steps: where each one is now, or why it was dropped.
Defects the journeys found, each fixed in its own pull request with a test that fails without it:
#1880 (Note editor: every tool is in reach in the side panel) is filed and left for later: it asks for a choice of layout.
Before → after
dev/1.3.1dev/1.3.2#[test]s, so launchesCI
e2e(the « Scenarios » step of theE2Ejob, the build aside),dev/1.3.1's last run →dev/1.3.2's push run (#1879's last run in brackets): Ubuntu 317 → 192 s (254), Windows 556 → 392 s (435), macOS 572 → 546 s (542). Locally (Windows), the thirteen take 238 s.Green on Windows, Linux and macOS:
dev/1.3.2's push run at 4a811aa, every job.