0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-19 18:36:09 +02:00

Syntactic fixes

This commit is contained in:
Arne Tarara 2024-10-16 13:17:52 +02:00
parent b966eb09c2
commit 53b65629d7
No known key found for this signature in database
GPG key ID: 2540198A4079785B
2 changed files with 5 additions and 3 deletions

View file

@ -1,9 +1,11 @@
import contextlib
import random import random
import string
from time import time_ns, sleep from time import time_ns, sleep
from playwright.sync_api import TimeoutError 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.goto("http://nc/login")
page.locator('#user').fill(username) page.locator('#user').fill(username)
page.locator('#password').fill(password) page.locator('#password').fill(password)
@ -23,7 +25,7 @@ def log_note(message: str) -> None:
def close_modal(page) -> None: def close_modal(page) -> None:
with contextlib.suppress(TimeoutError): with contextlib.suppress(TimeoutError):
sleep(5) # Sleep to make sure the modal has time to appear before continuing navigation 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): def timeout_handler(signum, frame):

View file

@ -34,7 +34,7 @@ def main(browser_name: str = "chromium"):
page.locator(install_selector).click() page.locator(install_selector).click()
# 3. Dashboard # 3. Dashboard
page.locator('.app-dashboard', timeout=240_000) page.locator('.app-dashboard').wait_for(timeout=240_000)
log_note("Installation complete") log_note("Installation complete")
browser.close() browser.close()