add comments
This commit is contained in:
parent
aa913445f6
commit
ee1acebf3d
1 changed files with 15 additions and 1 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
|
## this file will not be used later
|
||||||
|
## split into
|
||||||
|
# -> setup.setup_authentic.py
|
||||||
|
# and
|
||||||
|
# -> tests
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from icecream import ic
|
||||||
from playwright.sync_api import Browser, Locator, expect
|
from playwright.sync_api import Browser, Locator, expect
|
||||||
|
|
||||||
# playwright = sync_playwright().start()
|
# playwright = sync_playwright().start()
|
||||||
|
|
@ -29,10 +36,13 @@ def setup_context(browser, state_file=None):
|
||||||
|
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
def admin_login(browser: Browser, dotenv_config, STATES):
|
def admin_login(browser: Browser, dotenv_config, STATES):
|
||||||
|
# ic(dotenv_config)
|
||||||
CONFIG = dotenv_config
|
CONFIG = dotenv_config
|
||||||
context = setup_context(browser)
|
context = setup_context(browser)
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.goto(CONFIG["domain"])
|
url = "https://" + CONFIG["DOMAIN"]
|
||||||
|
ic(url)
|
||||||
|
page.goto(url)
|
||||||
welcome_message = CONFIG.get("welcome_message")
|
welcome_message = CONFIG.get("welcome_message")
|
||||||
if welcome_message:
|
if welcome_message:
|
||||||
check_for(page.get_by_text(welcome_message))
|
check_for(page.get_by_text(welcome_message))
|
||||||
|
|
@ -163,3 +173,7 @@ def user_session(browser: Browser, dotenv_config, STATES):
|
||||||
page.goto(CONFIG["domain"])
|
page.goto(CONFIG["domain"])
|
||||||
yield context, page
|
yield context, page
|
||||||
context.close()
|
context.close()
|
||||||
|
|
||||||
|
|
||||||
|
def test_true():
|
||||||
|
assert 1 + 1 == 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue