mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-05 22:10:44 -04:00
Added a new E2ETest config and adjusted a couple of things
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -81,8 +81,7 @@ class Config(object):
|
||||
"IBAN": "GB33BUKB20201555555555",
|
||||
"swift": "ABCDEF12",
|
||||
"notify_billing_email_addresses": [
|
||||
"generic@digital.cabinet-office.gov.uk",
|
||||
"first.last@digital.cabinet-office.gov.uk",
|
||||
"tts-benefits-studio@gsa.gov",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -152,6 +151,25 @@ class Staging(Production):
|
||||
HEADER_COLOUR = "#00ff00" # $green
|
||||
|
||||
|
||||
class E2ETest(Staging):
|
||||
"""
|
||||
An environment config that is intended to operate as if it were in the
|
||||
staging environment but with the configuration of the development and test
|
||||
environments so the E2E tests work.
|
||||
"""
|
||||
|
||||
# Borrowed from development environment
|
||||
SESSION_COOKIE_SECURE = False
|
||||
SESSION_PROTECTION = None
|
||||
HTTP_PROTOCOL = "http"
|
||||
ASSET_DOMAIN = ""
|
||||
ASSET_PATH = "/static/"
|
||||
|
||||
# Borrowed from test environment
|
||||
TESTING = True
|
||||
WTF_CSRF_ENABLED = False
|
||||
|
||||
|
||||
class Demo(Staging):
|
||||
HEADER_COLOUR = "#6F72AF" # $mauve
|
||||
|
||||
@@ -173,6 +191,7 @@ class Scanning(Production):
|
||||
configs = {
|
||||
"development": Development,
|
||||
"test": Test,
|
||||
"e2etest": E2ETest,
|
||||
"scanning": Scanning,
|
||||
"staging": Staging,
|
||||
"demo": Demo,
|
||||
|
||||
@@ -3593,7 +3593,7 @@ def end_to_end_context(browser):
|
||||
def end_to_end_authenticated_context(browser):
|
||||
# Create and load a previously authenticated context for Playwright E2E
|
||||
# tests.
|
||||
login_for_end_to_end_testing(browser)
|
||||
# login_for_end_to_end_testing(browser)
|
||||
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
|
||||
@@ -15,7 +15,7 @@ def _bypass_sign_in(end_to_end_context):
|
||||
|
||||
sign_in_button = page.get_by_role("link", name="Sign in")
|
||||
|
||||
# Test trying to sign in. Because we are loading the email and password
|
||||
# Sign in to the site - E2E test accounts are set to flow through.
|
||||
sign_in_button.click()
|
||||
|
||||
# Wait for the next page to fully load.
|
||||
|
||||
Reference in New Issue
Block a user