Say what each action did in a one-line notice (closes #383)
check / check (push) Waiting to run
check / check (push) Waiting to run
Every action on the webhook pages, and signing out, redirects with a fixed notice code in the URL, and the page it lands on shows one line saying what was done. noticeFor maps codes to fixed text and an unknown code shows nothing, so nothing from the URL is echoed. One partial, templates/notice.html, shows the line under the navbar on every page; the error page shows none. Replay and resubmit use the same codes and partial in place of their own query parameters and event log banners. Model: opus-5-5
This commit is contained in:
@@ -83,6 +83,22 @@ func TestErrorPage_DeletedTarget(t *testing.T) {
|
||||
assertErrorPage(t, w, http.StatusNotFound, backToWebhooks)
|
||||
}
|
||||
|
||||
// TestErrorPage_ShowsNoNotice pins that a notice code in the URL of a
|
||||
// page that fails is not shown above the error.
|
||||
func TestErrorPage_ShowsNoNotice(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
env := newTestEnv(t)
|
||||
|
||||
userID, _ := env.seedUser(t, "owner", "somepassword")
|
||||
cookies := env.authCookies(t, userID, "owner")
|
||||
|
||||
w := env.get("/hook/no-such-webhook?notice=webhook-saved", cookies)
|
||||
|
||||
assertErrorPage(t, w, http.StatusNotFound, backToWebhooks)
|
||||
assert.NotContains(t, w.Body.String(), "Webhook saved.")
|
||||
}
|
||||
|
||||
func TestErrorPage_UnknownPath(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user