mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
initial
This commit is contained in:
@@ -3600,7 +3600,9 @@ 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(os.getenv("NOTIFY_E2E_TEST_URI"))
|
||||
# TODO
|
||||
page.goto("http://localhost:6012/")
|
||||
# page.goto(os.getenv("NOTIFY_E2E_TEST_URI"))
|
||||
|
||||
sign_in_button = page.get_by_role("link", name="Sign in")
|
||||
|
||||
@@ -3622,8 +3624,11 @@ def login_for_end_to_end_testing(browser):
|
||||
continue_button = page.get_by_role("button", name=re.compile("Continue"))
|
||||
|
||||
# Sign in to the site.
|
||||
email_address_input.fill(os.getenv("NOTIFY_E2E_TEST_EMAIL"))
|
||||
password_input.fill(os.getenv("NOTIFY_E2E_TEST_PASSWORD"))
|
||||
# TODO
|
||||
email_address_input.fill("ken.kehl@fedramp.gov")
|
||||
password_input.fill("SunPra1r13")
|
||||
# email_address_input.fill(os.getenv("NOTIFY_E2E_TEST_EMAIL"))
|
||||
# password_input.fill(os.getenv("NOTIFY_E2E_TEST_PASSWORD"))
|
||||
continue_button.click()
|
||||
|
||||
# Wait for the next page to fully load.
|
||||
@@ -3683,7 +3688,9 @@ def end_to_end_authenticated_context(browser):
|
||||
login_for_end_to_end_testing(browser)
|
||||
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
# TODO
|
||||
"playwright/.auth/", "state.json"
|
||||
# os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
)
|
||||
context = browser.new_context(storage_state=auth_state_path)
|
||||
|
||||
|
||||
@@ -3,20 +3,22 @@ import os
|
||||
import re
|
||||
|
||||
import pytest
|
||||
from dotenv import load_dotenv
|
||||
from playwright.sync_api import expect
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Not authenticating test users.")
|
||||
def test_accounts_page(end_to_end_authenticated_context):
|
||||
def test_accounts_page(end_to_end_context):
|
||||
load_dotenv()
|
||||
# Open a new page and go to the staging site.
|
||||
page = end_to_end_authenticated_context.new_page()
|
||||
page = end_to_end_context.new_page()
|
||||
print(page)
|
||||
|
||||
accounts_uri = "{}accounts".format(os.getenv("NOTIFY_E2E_TEST_URI"))
|
||||
|
||||
page.goto(accounts_uri)
|
||||
|
||||
# Check to make sure that we've arrived at the next page.
|
||||
page.wait_for_load_state("domcontentloaded")
|
||||
print(page)
|
||||
|
||||
# Check to make sure that we've arrived at the next page.
|
||||
# Check the page title exists and matches what we expect.
|
||||
|
||||
Reference in New Issue
Block a user