Adjust E2E test fixtures

This changeset adjusts the scope of the end-to-end (E2E) test fixtures so that they behave as intended and we have truly isolated tests.  We may adjust these again in the future depending on our needs, but for right now this will hopefully keep things simple for us as we start to build out an E2E test library.

Thank you, @terrazoon, for flagging this!

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2024-03-25 12:08:34 -04:00
parent c83655c48c
commit 1aa2501d1d

View File

@@ -68,7 +68,7 @@ def login_for_end_to_end_testing(browser):
context.storage_state(path=auth_state_path)
@pytest.fixture(scope="session")
@pytest.fixture()
def end_to_end_authenticated_context(browser):
# Create and load a previously authenticated context for Playwright E2E
# tests.
@@ -82,13 +82,13 @@ def end_to_end_authenticated_context(browser):
return context
@pytest.fixture(scope="session")
@pytest.fixture()
def end_to_end_context(browser):
context = browser.new_context()
return context
@pytest.fixture(scope="session")
@pytest.fixture()
def authenticated_page(end_to_end_context):
# Open a new page and go to the site.
page = end_to_end_context.new_page()