new test framework #1

Merged
dan merged 47 commits from wip-new-framework into dev 2023-11-22 21:40:14 +01:00
Showing only changes of commit ee1acebf3d - Show all commits

View file

@ -1,4 +1,11 @@
## this file will not be used later
## split into
# -> setup.setup_authentic.py
# and
# -> tests
import pytest
from icecream import ic
from playwright.sync_api import Browser, Locator, expect
# playwright = sync_playwright().start()
@ -29,10 +36,13 @@ def setup_context(browser, state_file=None):
@pytest.fixture(scope="session", autouse=True)
def admin_login(browser: Browser, dotenv_config, STATES):
# ic(dotenv_config)
CONFIG = dotenv_config
context = setup_context(browser)
page = context.new_page()
page.goto(CONFIG["domain"])
url = "https://" + CONFIG["DOMAIN"]
ic(url)
page.goto(url)
welcome_message = CONFIG.get("welcome_message")
if 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"])
yield context, page
context.close()
def test_true():
assert 1 + 1 == 2