mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-19 18:36:09 +02:00
Syntactic fixes
This commit is contained in:
parent
b966eb09c2
commit
53b65629d7
2 changed files with 5 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
|||
import contextlib
|
||||
import random
|
||||
import string
|
||||
from time import time_ns, sleep
|
||||
from playwright.sync_api import TimeoutError
|
||||
|
||||
|
||||
def login(page, username='Crash', password='Override'):
|
||||
def login_nextcloud(page, username='Crash', password='Override'):
|
||||
page.goto("http://nc/login")
|
||||
page.locator('#user').fill(username)
|
||||
page.locator('#password').fill(password)
|
||||
|
@ -23,7 +25,7 @@ def log_note(message: str) -> None:
|
|||
def close_modal(page) -> None:
|
||||
with contextlib.suppress(TimeoutError):
|
||||
sleep(5) # Sleep to make sure the modal has time to appear before continuing navigation
|
||||
page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]', timeout=15_000).click()
|
||||
page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]').click(timeout=15_000)
|
||||
|
||||
|
||||
def timeout_handler(signum, frame):
|
||||
|
|
|
@ -34,7 +34,7 @@ def main(browser_name: str = "chromium"):
|
|||
page.locator(install_selector).click()
|
||||
|
||||
# 3. Dashboard
|
||||
page.locator('.app-dashboard', timeout=240_000)
|
||||
page.locator('.app-dashboard').wait_for(timeout=240_000)
|
||||
log_note("Installation complete")
|
||||
browser.close()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue