diff options
| -rwxr-xr-x | bin/idp | 4 | ||||
| -rw-r--r-- | test/e2e_test.go | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -350,11 +350,11 @@ class IdentityProvider <h2>Sending SAML Response (IdP -> SP)</h2> <textarea readonly="readonly" disabled="disabled" cols=225 rows=40><%=- @builder.build.to_xml(pretty: true) -%></textarea> - <form action="<%= url %>" method="post"> + <form id="postback-form" action="<%= url %>" method="post"> <%- saml_params.each do |(key, value)| -%> <input type="hidden" name="<%= key %>" value="<%= value %>" /> <%- end -%> - <input type="submit" value="Submit" /> + <input id="submit-button" type="submit" value="Submit" /> </form> </body> </html> diff --git a/test/e2e_test.go b/test/e2e_test.go index c25a4f8..14648ec 100644 --- a/test/e2e_test.go +++ b/test/e2e_test.go @@ -44,6 +44,11 @@ func TestHelloWorld(t *testing.T) { action := x.Must(page.Locator("#idp-form").GetAttribute("action")) assert.Equal(t, "http://idp.example.com:8080/saml/new", action) assert.NoError(t, page.Locator("#submit-button").Click()) + + action = x.Must(page.Locator("#postback-form").GetAttribute("action")) + assert.Equal(t, "http://ui.example.com:8080/saml/assertions", action) + assert.NoError(t, page.Locator("#submit-button").Click()) + assert.Contains(t, x.Must(page.Content()), "Received SAML Response") }) }) }) |
