mirror of
https://github.com/nextcloud/docker.git
synced 2025-03-15 19:05:09 +01:00
Remove prints, add timeouts
This commit is contained in:
parent
fc0b45dc86
commit
ab4b43c93b
2 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
from playwright.sync_api import sync_playwright
|
from playwright.sync_api import sync_playwright
|
||||||
from time import time
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
with sync_playwright() as playwright:
|
with sync_playwright() as playwright:
|
||||||
|
@ -16,17 +15,14 @@ def main():
|
||||||
page.type('#adminlogin', 'Crash')
|
page.type('#adminlogin', 'Crash')
|
||||||
page.type('#adminpass', 'Override')
|
page.type('#adminpass', 'Override')
|
||||||
page.click('.primary')
|
page.click('.primary')
|
||||||
print(time(), "Create user clicked")
|
|
||||||
|
|
||||||
# 2. Install all Apps
|
# 2. Install all Apps
|
||||||
install_selector = '.button-vue--vue-primary'
|
install_selector = '.button-vue--vue-primary'
|
||||||
page.wait_for_selector(install_selector)
|
page.wait_for_selector(install_selector)
|
||||||
page.click(install_selector)
|
page.click(install_selector)
|
||||||
print(time(), "Install apps clicked")
|
|
||||||
|
|
||||||
# 3. Dashboard
|
# 3. Dashboard
|
||||||
page.wait_for_selector('.app-dashboard')
|
page.wait_for_selector('.app-dashboard')
|
||||||
print(time(), "Dashboard found")
|
|
||||||
|
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ def create_conversation(playwright: Playwright) -> str:
|
||||||
browser = playwright.chromium.launch(headless=True)
|
browser = playwright.chromium.launch(headless=True)
|
||||||
context = browser.new_context()
|
context = browser.new_context()
|
||||||
page = context.new_page()
|
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").click()
|
||||||
page.get_by_label("Account name or email").fill("Crash")
|
page.get_by_label("Account name or email").fill("Crash")
|
||||||
page.get_by_label("Account name or email").press("Tab")
|
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_one = browser_one.new_context()
|
||||||
context_two = browser_two.new_context()
|
context_two = browser_two.new_context()
|
||||||
user_one = context_one.new_page()
|
user_one = context_one.new_page()
|
||||||
|
user_one.set_default_timeout(120_000)
|
||||||
user_two = context_two.new_page()
|
user_two = context_two.new_page()
|
||||||
|
user_two.set_default_timeout(120_000)
|
||||||
|
|
||||||
user_one.goto(url)
|
user_one.goto(url)
|
||||||
user_two.goto(url)
|
user_two.goto(url)
|
||||||
|
|
Loading…
Add table
Reference in a new issue