A chapter you can see, in the colour you chose
A chapter did not show until the notebook had a note in it. "Nothing here" was asked of the notes alone, so a notebook whose only contents were chapters showed the empty-list panel with the chapters hidden behind it — making a chapter in a fresh notebook appeared to do nothing at all. It is asked of every row now, and a notebook with chapters but no loose notes says so in one line rather than looking like a list that failed to load. The colour is chosen while the chapter is being made, in the dialog that asks for its name. It is what tells one chapter from the next, and having to right-click a fresh one to say which it is meant two visits for one decision. Renaming and recolouring afterwards are one entry in its menu and one write; the server already took the colour on create, the client simply never sent it. The word "here" is gone. The line along the top of the pane says which of the two places you are in, and saying it twice was noise. Thirteen suites green: 338 browser checks, 241 unit tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebf1f1bc62
commit
165ccf3cf7
8 files changed
+197
-66
No files matched your search
+30
-1
@@ -24,10 +24,14 @@ try {
|
||||
|
||||
const titles = () =>
|
||||
p.locator("[data-note-row] [data-note-title]").evaluateAll((els) => els.map((e) => e.textContent.trim()));
|
||||
const addChapter = async (name) => {
|
||||
/* The colour is chosen while the chapter is being made. It is what tells one
|
||||
chapter from the next, and having to right-click a fresh one to say which
|
||||
it is meant two visits for a single decision. */
|
||||
const addChapter = async (name, colour = null) => {
|
||||
await p.locator("[data-add-chapter]").click();
|
||||
await p.waitForTimeout(600);
|
||||
await p.getByLabel("Chapter name").fill(name);
|
||||
if (colour) await p.locator(`[data-colour-option="${colour}"]`).click();
|
||||
await p.getByRole("button", { name: "Create", exact: true }).click();
|
||||
await p.waitForTimeout(2000);
|
||||
};
|
||||
@@ -66,6 +70,31 @@ try {
|
||||
const server = (await api(p, "GET", "/chapters")).body;
|
||||
check(server.length === 1 && server[0].name === "Rechnungen", "the server has it", JSON.stringify(server));
|
||||
|
||||
/* ── in an empty notebook too ──
|
||||
* "Nothing here" was asked of the notes alone, so a notebook whose only
|
||||
* contents were chapters showed the empty-list panel with the chapters hidden
|
||||
* behind it: making a chapter in a fresh notebook appeared to do nothing. */
|
||||
await createNotebook(p, "Leeres Buch");
|
||||
await p.locator("button").filter({ hasText: "Leeres Buch" }).first().click();
|
||||
await p.waitForTimeout(1000);
|
||||
await addChapter("Nur ein Kapitel", "#a371f7");
|
||||
check(
|
||||
(await p.locator("[data-chapter-row]").count()) === 1,
|
||||
"a chapter shows in a notebook that has no notes at all",
|
||||
String(await p.locator("[data-chapter-row]").count())
|
||||
);
|
||||
const madeWithColour = (await api(p, "GET", "/chapters")).body.find((c) => c.name === "Nur ein Kapitel");
|
||||
check(
|
||||
madeWithColour?.color === "#a371f7",
|
||||
"and the colour picked while making it is stored with it",
|
||||
String(madeWithColour?.color)
|
||||
);
|
||||
check(
|
||||
(await p.locator("[data-no-loose-notes]").count()) === 1,
|
||||
"and the list says why it is otherwise empty rather than looking broken"
|
||||
);
|
||||
await openNotebook();
|
||||
|
||||
/* ── filing a note ── */
|
||||
check(
|
||||
(await p.locator("[data-move-note]").count()) === 0,
|
||||
|
||||
Reference in new issue
Block a user