// Copyright 2023 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package testutil import ( "strings" "golang.org/x/net/html" "go.pinniped.dev/internal/here" ) type ChooseIDPPageExpectedValue struct { DisplayName string URL string } func spaces(howMany int) string { return strings.Repeat(" ", howMany) } func withNewline(s string) string { return s + "\n" } func htmlEscapedForHTMLTemplate(s string) string { // The HTML templating package also escapes plus characters, which html.EscapeString does not. return strings.ReplaceAll(html.EscapeString(s), "+", "+") } func ExpectedChooseIDPPageHTML(wantCSS string, wantJS string, wantIDPs []ChooseIDPPageExpectedValue) string { top := here.Docf(`