panel-redesign: links into Domain settings carry no anchor
Follows the design commit before it: the domain page's menu entries
Report address / Rate limit / Export, the DMARC record's note and the
delete page's "Export the domain" lead to /outbound/domains/{id}/settings
as it opens, not scrolled to a box.
go test -count=1 ./internal/web/...: ok
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -105,7 +105,7 @@ func TestNewDomainHasNoReports(t *testing.T) {
|
||||
|
||||
// The domain the stand started with has none either.
|
||||
has(t, "domain page", pageOf(t, s.h.HandleDomainDetail, "/outbound/domains/1"),
|
||||
`Report address: <a href="/outbound/domains/1/settings#reports">no reports</a>`)
|
||||
`Report address: <a href="/outbound/domains/1/settings">no reports</a>`)
|
||||
}
|
||||
|
||||
// Each of the three choices is saved, comes back selected, and is what the
|
||||
@@ -130,7 +130,7 @@ func TestDomainReportAddressThreeChoices(t *testing.T) {
|
||||
has(t, "settings after hosted", settings(), `<option value="hosted" selected>`)
|
||||
lacks(t, "settings after hosted", settings(), `value="`+hostedForExample+`"`) // the typed field stays empty
|
||||
has(t, "domain page after hosted", pageOf(t, s.h.HandleDomainDetail, "/outbound/domains/1"),
|
||||
`Report address: <a href="/outbound/domains/1/settings#reports">`+hostedEscaped+`</a>`,
|
||||
`Report address: <a href="/outbound/domains/1/settings">`+hostedEscaped+`</a>`,
|
||||
`rua=mailto:`+hostedEscaped)
|
||||
// The ingest allow-list was rebuilt for the new address.
|
||||
if last := maps.got[len(maps.got)-1]; !contains(last.Recipients, hostedForExample) {
|
||||
@@ -145,7 +145,7 @@ func TestDomainReportAddressThreeChoices(t *testing.T) {
|
||||
}
|
||||
has(t, "settings after custom", settings(), `<option value="custom" selected>`, `value="reports@hub.example"`)
|
||||
has(t, "domain page after custom", pageOf(t, s.h.HandleDomainDetail, "/outbound/domains/1"),
|
||||
`Report address: <a href="/outbound/domains/1/settings#reports">reports@hub.example</a>`, `rua=mailto:reports@hub.example`,
|
||||
`Report address: <a href="/outbound/domains/1/settings">reports@hub.example</a>`, `rua=mailto:reports@hub.example`,
|
||||
`<h3>Report authorization</h3>`) // the address is on another domain than the senders
|
||||
if last := maps.got[len(maps.got)-1]; contains(last.Recipients, hostedForExample) || contains(last.Recipients, "reports@hub.example") {
|
||||
t.Errorf("the allow-list after choosing another host: %v", last.Recipients)
|
||||
|
||||
@@ -98,7 +98,7 @@ func TestDomainPageShowsRecordsApplicationsAndConnection(t *testing.T) {
|
||||
`<td class="sp-mono sp-nowrap"><strong>prod-server</strong></td>`, `alerts@<wbr>example.org`, `200 / h`, `2 IPs`,
|
||||
`href="/outbound/domains/1/applications/`+idStr(a.ID)+`">Edit</a>`,
|
||||
`mail.example.org`, `STARTTLS (submission)`, `action="/outbound/domains/1/dns-recheck"`,
|
||||
`href="/outbound/log?domain=example.org"`, `href="/outbound/domains/1/settings#reports"`, `href="/outbound/domains/1/delete"`)
|
||||
`href="/outbound/log?domain=example.org"`, `href="/outbound/domains/1/settings"`, `href="/outbound/domains/1/delete"`)
|
||||
|
||||
// The flash the redirects carry.
|
||||
rec := send(s.h.HandleDomainDetail, &globalPrincipal, "GET", "/outbound/domains/1?appsaved=1", s.paths, nil)
|
||||
@@ -339,7 +339,7 @@ func TestDeleteConfirmNamesTheApplicationsThatGoWithTheDomain(t *testing.T) {
|
||||
t.Fatalf("delete confirmation = %d:\n%s", rec.Code, body)
|
||||
}
|
||||
has(t, "delete", body, `<h1 class="title is-3">Delete example.org</h1>`, `permanently delete its DKIM signing key;`,
|
||||
`<form method="post" action="/outbound/domains/1/delete">`, `Delete example.org</button>`, `href="/outbound/domains/1/settings#export"`)
|
||||
`<form method="post" action="/outbound/domains/1/delete">`, `Delete example.org</button>`, `href="/outbound/domains/1/settings"`)
|
||||
lacks(t, "delete", body, `credentials`)
|
||||
|
||||
for _, login := range []string{"prod-server", "alerts"} {
|
||||
|
||||
Reference in New Issue
Block a user