try to pass message back in 'next' field

This commit is contained in:
Kenneth Kehl
2024-08-29 08:28:38 -07:00
parent 33e616a8f1
commit e4c99dc15b
2 changed files with 6 additions and 3 deletions

View File

@@ -149,11 +149,14 @@ def _handle_e2e_tests(redirect_url):
return redirect(
url_for(
"main.show_accounts_or_dashboard",
next=os.getenv("NOTIFY_E2E_TEST_EMAIL"),
next="EMAIL_IS_OK",
)
)
except Exception as e:
return redirect(url_for("main.show_accounts_or_dashboard", next=f"{e}"))
stre = str(e)
stre = stre.replace(" ", "_")
# Trying to get a message back to playwright somehow since we can't see the admin logs
return redirect(url_for(f"https://{stre}"))
# return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url))

View File

@@ -92,7 +92,7 @@ def test_create_new_template(end_to_end_context):
print(f"WHAT IS THE TEST EMAIL {os.getenv('NOTIFY_E2E_TEST_EMAIL')}")
page = end_to_end_context.new_page()
print(f"INITIAL PAGE IS {page}")
x = page.goto(f"{E2E_TEST_URI}/sign-in")
page.goto(f"{E2E_TEST_URI}/sign-in")
# Wait for the next page to fully load.
page.wait_for_load_state("domcontentloaded")
print(f"PAGE ON ENTER TEST_CREATE_NEW_TEMPLATE AFTER SIGNING IN IS {page}")