* make it so that the actual tests can be moved anywhere, for example in abra recipe repos -> major refactoring with pytest test discovery magic * create RUNNER_DICT dynamically with importlib -> none of the tests are hardcoded, more tests can be added by placing a folder * autoload fixtures with pytest plugins * add URL fixture to navigate on web pages. Includes url parser based on python urllib to generate correct links * fix nextcloud setups and tests * add email groundwork with imbox Reviewed-on: local-it-infrastructure/e2e_tests#7 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
19 lines
1 KiB
Python
19 lines
1 KiB
Python
def test_onlyoffice(nc_session):
|
|
"""Test Onlyoffice in Nextcloud"""
|
|
context, page = nc_session
|
|
# if page.query_selector('.close-icon'):
|
|
# page.get_by_role("button", name="Close modal").click()
|
|
page.get_by_role("link", name="New file/folder menu").click()
|
|
page.get_by_role("link", name="New document").click()
|
|
page.locator("#view9-input-file").fill("test.docx")
|
|
page.get_by_role("button", name="Submit").click()
|
|
outer_frame = page.frame_locator("#onlyofficeFrame")
|
|
check_for(outer_frame.locator("body"))
|
|
inner_frame = outer_frame.frame_locator("#app > iframe")
|
|
check_for(inner_frame.locator("body"))
|
|
onlyoffice = page.frame("frameEditor")
|
|
check_for(onlyoffice.locator('//*[@id="area_id"]'))
|
|
onlyoffice.locator("#btn-goback").click()
|
|
page.get_by_role("link", name="Not favorited test .docx Share Actions").get_by_role("link", name="Actions").click()
|
|
page.get_by_role("link", name="Delete file").click()
|
|
context.tracing.stop(path=f"{RECORDS}/onlyoffice.zip")
|