A create or a settings save sometimes lands without its success toast, so two walkthroughs fail now and then #222
Open
opened 2026-10-16 01:52:36 +00:00 by cgalo5758
·
1 comment
Labels
Clear labels
accessibility
area/billing
area/catalog
area/discourse
area/domains
area/entitlements
area/fedwiki
area/identity
area/integrations
area/licensing
area/member-ui
area/meta
area/operator-ui
area/ops
area/testing
duplicate
good-first-issue
invalid
privacy
security
upstream
wontfix
A barrier for people using assistive technology or a keyboard alone.
The Stripe mirror, checkout, subscriptions, invoices, fulfillment.
Products, prices, plan ladders, purchasability.
The Discourse integration.
The domains registry, claims, placements, the certificate ask.
Entitlement sets, rules, grants, pools, provisioning.
The Federated Wiki integration and farm sync.
Sign-in, sessions, persons, organizations, workspaces, roles.
The provider registry, outbox and webhooks in general.
Licenses, the contributor agreement, SPDX headers.
Member pages.
The repository itself, its contributing guide, CI, the tracker and the workflow.
Operator pages, forms, lists, the design system.
Deployment, configuration, migrations, workflows, instance settings.
The test stack, screens, lint, walkthroughs.
Closed because another issue already covers it.
Small, self-contained, and explained enough to be a first contribution.
Closed because it is not a ticket for this repository.
Touches what a person's data reveals.
Touches authentication, authorization, secrets or data exposure.
Waits on another repository or project before it can move.
Closed because it will not be done, with the reason in the last comment.
kind
bug
The software does something other than what it promises; closed when it again does what it promises.
kind
debt
Code, tests or tooling to clean up with nothing visible changing; closed when they are cleaner.
kind
design
A question to settle before work can be defined; closed when the decision is written down.
kind
docs
Documentation that is wrong or missing; closed when it says the right thing.
kind
enhancement
Something the software does not do yet; closed when it does.
priority
critical
Blocks the active milestone or harms members now.
priority
high
Next in line inside the active milestone.
priority
low
Inside the active milestone, when nothing else is left.
priority
medium
Inside the active milestone, after the high ones.
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wiki-cafe/member-console#222
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
TestIntegrationSettingsWalkthroughhas failed at least four times in full suite runs, andTestPlanLaddersWalkthroughonce, each on the same wait:Each passed when run again alone; the plan ladders walkthrough passed four runs out of four.
The wait is
browsertest.AwaitToast(test/e2e/browsertest/shell.go:41). It polls every 100 ms for 20 seconds (shell.go:43, throughWaitTrueintest/e2e/browsertest/wait.go:27) until one of the two shell toasts,#successToastor#errorToast, carries Bootstrap'sshowclass. Then it reads the toast, closes it and waits for it to hide. Every failing call came right afterClickAndLand(wait.go:97), on a page the browser had just navigated to:test/e2e/operator-walkthroughs/integration_settings_test.go:114-115and:163-164), which redirects to the settings page with?flash=saved(internal/server/operator_integration_settings.go:408);integration_settings_test.go:178-179), which redirects with?flash=cleared(operator_integration_settings.go:453);test/e2e/operator-walkthroughs/plan_ladders_test.go:175,:187), which lands on the new ladder's page with?flash=created(internal/server/operator_record_page.go:57-58).No htmx response can carry the toast to such a page. The server writes the message into
#successToastand marks the elementdata-show-on-load(internal/embeds/templates/operator.html:383-384).internal/embeds/static/success-toast.jsshows it once:showFlashToastOnLoad(:52) runs fromhtmx.onLoad(:61-64), removes the marker and shows the toast with a five-second autohide (:57-58). Earlier runs of these walkthroughs missed the toast on about one landing in thirty, and in those missesdata-show-on-loadstayed on the element, soshowFlashToastOnLoadhad never run.A likely cause, not yet confirmed: the operator page loads htmx and
success-toast.jsas separate deferred scripts, with one other script between them (operator.html:27,:29). A deferred script runs after parsing has ended, whendocument.readyStateisinteractive, so htmx 4.0.0 (internal/embeds/static/htmx.min.js) starts itself withsetTimeoutinstead of onDOMContentLoaded. That start processes the body once and fireshtmx:after:process, the eventhtmx.onLoadlistens for. The browser may run the timer before it runssuccess-toast.js, for example while that file is still loading. The listener is then added after the only event it would have caught, and the toast never shows. A busy machine during a full run makes that order more likely, which fits a walkthrough that passes alone.The wait also cannot see a toast that showed and hid itself before polling began, and its message does not say which of the two happened.
What should happen
Every page that arrives with a flash message shows its toast, whatever order the deferred scripts run in. When the walkthrough wait times out, its message says whether
data-show-on-loadis still set, so a toast that never showed is told apart from one the wait missed.Where
internal/embeds/static/success-toast.js:52-69and the script order ininternal/embeds/templates/operator.html:25-34.AwaitToastintest/e2e/browsertest/shell.go:41-52.integration_settings_test.go:115,:164,:179andplan_ladders_test.go:187, which have failed, andproducts_test.go:99andentitlement_sets_test.go:74in the same directory, which wait the same way after a create.Steps
docs/testing.mddescribes for the Go browser walkthroughs (type 7, end-to-end tests).make testseveral times. Now and thenTestIntegrationSettingsWalkthroughorTestPlanLaddersWalkthroughfails with the message above.go test ./test/e2e/operator-walkthroughs/ -run <name> -count=1. It passes.Why it matters
An operator who creates a plan ladder, a product or an entitlement set, or saves or clears an integration setting, is sometimes left without the confirmation the page is meant to give. And a walkthrough that fails by chance teaches people to rerun it, so a real failure of the same wait gets rerun too.
TestPlanLaddersWalkthroughfailed again on the same wait in a full suite run, after the ladder create's landing (nowplan_ladders_test.go:197), and passed when run alone. The change under test touched only FedWiki tests.