mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 12:19:47 -04:00
code review feedback
This commit is contained in:
@@ -5,33 +5,6 @@ import pytest
|
||||
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
|
||||
|
||||
|
||||
def login_for_end_to_end_testing(browser):
|
||||
# Open a new page and go to the staging site.
|
||||
context = browser.new_context()
|
||||
page = context.new_page()
|
||||
page.goto(f"{E2E_TEST_URI}/sign-in")
|
||||
|
||||
# Wait for the next page to fully load.
|
||||
page.wait_for_load_state("domcontentloaded")
|
||||
# Save storage state into the file.
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
)
|
||||
context.storage_state(path=auth_state_path)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def end_to_end_authenticated_context(browser):
|
||||
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
)
|
||||
|
||||
context = browser.new_context(storage_state=auth_state_path)
|
||||
|
||||
return context
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def end_to_end_context(browser):
|
||||
context = browser.new_context()
|
||||
|
||||
Reference in New Issue
Block a user