From d7a459dc2509f8e6d65726e313c41a6bcb348cd4 Mon Sep 17 00:00:00 2001 From: Sakaki <1138960+logbie@users.noreply.github.com> Date: Sun, 27 Sep 2026 18:17:44 +0000 Subject: [PATCH 1/2] test(admin): cover unnamed editor status selects GET /admin/pages/new and /admin/posts/new must render Status and the status select inside one label. This fails while those controls stay a span plus select inside a div. Co-Authored-By: Paperclip --- tests/integration/README.md | 2 ++ tests/integration/editor-labels.test.wfl | 39 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/integration/editor-labels.test.wfl diff --git a/tests/integration/README.md b/tests/integration/README.md index 7a1ed65..c0c4757 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -7,6 +7,7 @@ program argument, for example: wfl --test tests/integration/server-port.test.wfl /absolute/path/to/wfl wfl --test tests/integration/authentication.test.wfl /absolute/path/to/wfl wfl --test tests/integration/content-users.test.wfl /absolute/path/to/wfl +wfl --test tests/integration/editor-labels.test.wfl /absolute/path/to/wfl wfl --test tests/integration/media.test.wfl /absolute/path/to/wfl wfl --test tests/integration/throttle.test.wfl /absolute/path/to/wfl wfl --test tests/integration/recovery.test.wfl /absolute/path/to/wfl @@ -46,6 +47,7 @@ all response-header values. Tests manage synthetic cookies explicitly. | `server-port.test.wfl` | Original Python cases: configured ephemeral port, missing setting, absent config; exact startup URLs, installer status/content type/form/CSRF. | | `authentication.test.wfl` | Installer CSRF and input rejection without mutation, first admin/session creation, setup locking, login response cookie flags, invalid credentials, CSRF, logout methods, and expired sessions. | | `content-users.test.wfl` | Draft/publication, escaped title and rendered Markdown, pagination, page navigation/update/delete, mutation methods, CSRF, author ownership, admin user/settings boundaries, password update, account removal and revoked access. | +| `editor-labels.test.wfl` | New page and post forms: the Status text and `select name="status"` share one `label.field.field--inline`. A second program argument selects an older application tree for the red run. | | `media.test.wfl` | Configured and legacy storage, generated safe names, byte retrieval, missing/wrong CSRF, extension/empty/malformed/oversized rejection, author denial, method enforcement, database/file consistency on deletion. | | `throttle.test.wfl` | Exactly ten failed credentials, next request blocked, persistence across restart, expired-window recovery and successful-login clearing. | | `recovery.test.wfl` | Stopped-site database-plus-upload backup, restart, actual restore after a later change, HTTP content/media and login, SQLite integrity and foreign-key checks. | diff --git a/tests/integration/editor-labels.test.wfl b/tests/integration/editor-labels.test.wfl new file mode 100644 index 0000000..ffbea10 --- /dev/null +++ b/tests/integration/editor-labels.test.wfl @@ -0,0 +1,39 @@ +include from "fixtures/http-helpers.wfl" + +// Implicit label: the Status text and status select share one label element. +define action called editor_inline_label with parameters html_text: + store open_marker as "" + expect close_at is greater than 0 to be yes + return substring of label_tail and 0 and close_at +end action + +describe "Editor status labels through HTTP": + test "new page and post status selects sit inside the Status label": + store site_spec as http_new_site of "configured" + try: + store running_site as http_launch of site_spec + try: + store admin_cookie as http_install of site_spec + for each editor_route in ["/admin/pages/new", "/admin/posts/new"]: + store editor_reply as http_get of site_spec and editor_route and admin_cookie + expect editor_reply["status"] to equal 200 + store label_html as editor_inline_label of editor_reply["body"] + expect label_html to contain "Status" + expect label_html to contain "" to be no + expect label_html contains "type=\"file\"" to be no + end for + finally: + call http_stop with running_site + end try + finally: + call http_destroy with site_spec + end try + end test +end describe From 40855a686c95a1455c6f4d22cd409956f5d52f87 Mon Sep 17 00:00:00 2001 From: Sakaki <1138960+logbie@users.noreply.github.com> Date: Sun, 27 Sep 2026 18:17:44 +0000 Subject: [PATCH 2/2] fix(admin): label the page and post status selects Use the settings form's label.field.field--inline wrapper so the visible Status text names the select. Options, names, and main.wfl stay put. Co-Authored-By: Paperclip --- admin/templates/page_form.html | 4 ++-- admin/templates/post_form.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/templates/page_form.html b/admin/templates/page_form.html index 5a25e65..9d9c7b4 100644 --- a/admin/templates/page_form.html +++ b/admin/templates/page_form.html @@ -16,13 +16,13 @@ Body Markdown -
+
+
Cancel diff --git a/admin/templates/post_form.html b/admin/templates/post_form.html index f1363f7..f603313 100644 --- a/admin/templates/post_form.html +++ b/admin/templates/post_form.html @@ -16,13 +16,13 @@ Body Markdown — **bold**, *italic*, [links](/x), lists, `code` -
+
+
Cancel