Adjust TestE2EFullIntegration for new form_post flow.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
428f389c7d
commit
9fba8d2203
@ -242,17 +242,13 @@ func TestE2EFullIntegration(t *testing.T) {
|
|||||||
// Expect to be redirected to the upstream provider and log in.
|
// Expect to be redirected to the upstream provider and log in.
|
||||||
browsertest.LoginToUpstream(t, page, env.SupervisorUpstreamOIDC)
|
browsertest.LoginToUpstream(t, page, env.SupervisorUpstreamOIDC)
|
||||||
|
|
||||||
// Expect to be redirected to the localhost callback.
|
// Expect to be redirected to the downstream callback which is serving the form_post HTML.
|
||||||
t.Logf("waiting for redirect to callback")
|
t.Logf("waiting for response page %s", downstream.Spec.Issuer)
|
||||||
browsertest.WaitForURL(t, page, regexp.MustCompile(`\Ahttp://127\.0\.0\.1:[0-9]+/callback\?.+\z`))
|
browsertest.WaitForURL(t, page, regexp.MustCompile(regexp.QuoteMeta(downstream.Spec.Issuer)))
|
||||||
|
|
||||||
// Wait for the "pre" element that gets rendered for a `text/plain` page, and
|
// The response page should have done the background fetch() and POST'ed to the CLI's callback.
|
||||||
// assert that it contains the success message.
|
// It should now be in the "success" state.
|
||||||
t.Logf("verifying success page")
|
formpostExpectSuccessState(t, page)
|
||||||
browsertest.WaitForVisibleElements(t, page, "pre")
|
|
||||||
msg, err := page.First("pre").Text()
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, "you have been logged in and may now close this tab", msg)
|
|
||||||
|
|
||||||
// Expect the CLI to output a list of namespaces in JSON format.
|
// Expect the CLI to output a list of namespaces in JSON format.
|
||||||
t.Logf("waiting for kubectl to output namespace list JSON")
|
t.Logf("waiting for kubectl to output namespace list JSON")
|
||||||
|
Loading…
Reference in New Issue
Block a user