0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-14 18:35:08 +01:00

Remove prints, add timeouts

This commit is contained in:
Danilo Ješić 2023-06-09 11:49:51 +02:00
parent fc0b45dc86
commit ab4b43c93b
2 changed files with 4 additions and 5 deletions

View file

@ -1,5 +1,4 @@
from playwright.sync_api import sync_playwright
from time import time
def main():
with sync_playwright() as playwright:
@ -16,17 +15,14 @@ def main():
page.type('#adminlogin', 'Crash')
page.type('#adminpass', 'Override')
page.click('.primary')
print(time(), "Create user clicked")
# 2. Install all Apps
install_selector = '.button-vue--vue-primary'
page.wait_for_selector(install_selector)
page.click(install_selector)
print(time(), "Install apps clicked")
# 3. Dashboard
page.wait_for_selector('.app-dashboard')
print(time(), "Dashboard found")
browser.close()

View file

@ -5,7 +5,8 @@ def create_conversation(playwright: Playwright) -> str:
browser = playwright.chromium.launch(headless=True)
context = browser.new_context()
page = context.new_page()
page.goto("http://nc/login")
page.set_default_timeout(120_000)
page.goto("http://nc/")
page.get_by_label("Account name or email").click()
page.get_by_label("Account name or email").fill("Crash")
page.get_by_label("Account name or email").press("Tab")
@ -35,7 +36,9 @@ def talk(playwright: Playwright, url: str) -> None:
context_one = browser_one.new_context()
context_two = browser_two.new_context()
user_one = context_one.new_page()
user_one.set_default_timeout(120_000)
user_two = context_two.new_page()
user_two.set_default_timeout(120_000)
user_one.goto(url)
user_two.goto(url)