cleanup (#18)
- remove demo runner - improve docs - rename all tests to test_* (previously, also setup_* and cleanup_* existed) to improve stability as it is not guaranteed that pytest.ini is loaded. - improve logging formatting - improve full integration test Reviewed-on: local-it-infrastructure/e2e_tests#18 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
8b9dd47f9e
commit
0fafa22272
18 changed files with 58 additions and 81 deletions
|
|
@ -12,7 +12,7 @@ TEST_USER = os.environ["TEST_USER"]
|
|||
TEST_PASS = os.environ["TEST_PASS"]
|
||||
|
||||
|
||||
def setup_admin_state(context: BrowserContext, env_config: dict[str, str], DIR: DirManager, URL: BaseUrl):
|
||||
def test_setup_admin_state(context: BrowserContext, env_config: dict[str, str], DIR: DirManager, URL: BaseUrl):
|
||||
# go to page
|
||||
page = context.new_page()
|
||||
page.goto(URL.get())
|
||||
|
|
@ -50,7 +50,8 @@ def create_invite_link(admin_context: BrowserContext, env_config: dict[str, str]
|
|||
page.locator('input[name="name"]').click()
|
||||
linkname = "test_link_123"
|
||||
page.locator('input[name="name"]').fill(linkname)
|
||||
page.get_by_placeholder("Wählen Sie ein Objekt aus.").click()
|
||||
placeholder_pattern = re.compile(r"Wählen Sie ein|Select an")
|
||||
page.get_by_placeholder(placeholder_pattern).click()
|
||||
page.get_by_role("option", name=re.compile(r"invitation-enrollment-flow")).click()
|
||||
|
||||
# force, because else we get "intercepts pointer events"
|
||||
|
|
@ -82,7 +83,7 @@ def create_user(user_context: BrowserContext, invitelink):
|
|||
expect(page.locator("ak-library")).to_be_visible()
|
||||
|
||||
|
||||
def setup_user_state(
|
||||
def test_setup_user_state(
|
||||
context: BrowserContext, env_config: dict[str, str], DIR: DirManager, URL: BaseUrl, check_if_user_exists
|
||||
):
|
||||
# load admin cookies to context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue