generated from nationalarchives/da-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Login before all e2e playwright tests that need authentication
- Loading branch information
1 parent
4152a31
commit 4b0c933
Showing
3 changed files
with
59 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture() | ||
def authenticated_page(page): | ||
page.goto("/login") | ||
page.get_by_label("Email address").fill(os.environ.get("AYR_TEST_USERNAME")) | ||
page.get_by_label("Password").fill(os.environ.get("AYR_TEST_PASSWORD")) | ||
page.get_by_role("button", name="Sign in").click() | ||
page.wait_for_url("/poc-search-view") | ||
return page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters