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")
|