0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-20 02:46:10 +02:00

Textual and CSS selector adaptions for nextcloud 29

This commit is contained in:
Arne Tarara 2024-08-15 19:01:39 +02:00
parent 8e500edbfc
commit a46e5672f7
No known key found for this signature in database
GPG key ID: 2540198A4079785B
5 changed files with 18 additions and 18 deletions

View file

@ -21,9 +21,9 @@ def run(playwright: Playwright, browser_name: str) -> None:
try: try:
log_note("Login") log_note("Login")
page.goto("http://nc/") page.goto("http://nc/")
page.get_by_label("Account name or email").click() page.get_by_label("Login with username or email").click()
page.get_by_label("Account name or email").fill("Crash") page.get_by_label("Login with username or email").fill("Crash")
page.get_by_label("Account name or email").press("Tab") page.get_by_label("Login with username or email").press("Tab")
page.get_by_label("Password", exact=True).fill("Override") page.get_by_label("Password", exact=True).fill("Override")
page.get_by_label("Password", exact=True).press("Enter") page.get_by_label("Password", exact=True).press("Enter")
log_note("Create new text file") log_note("Create new text file")

View file

@ -22,8 +22,8 @@ def run(playwright: Playwright, browser_name: str) -> None:
try: try:
page.goto("http://nc/login") page.goto("http://nc/login")
log_note("Login") log_note("Login")
page.get_by_label("Account name or email").fill("Crash") page.get_by_label("Login with username or email").fill("Crash")
page.get_by_label("Account name or email").press("Tab") page.get_by_label("Login with username or email").press("Tab")
page.get_by_label("Password", exact=True).fill("Override") page.get_by_label("Password", exact=True).fill("Override")
page.get_by_label("Password", exact=True).press("Enter") page.get_by_label("Password", exact=True).press("Enter")
log_note("Wait for welcome popup") log_note("Wait for welcome popup")
@ -31,14 +31,14 @@ def run(playwright: Playwright, browser_name: str) -> None:
sleep(5) sleep(5)
log_note("Close welcome popup") log_note("Close welcome popup")
with contextlib.suppress(TimeoutError): with contextlib.suppress(TimeoutError):
page.locator('button.first-run-wizard__close-button').click(timeout=15_000) page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]').click(timeout=15_000)
log_note("Go to calendar") log_note("Go to calendar")
page.get_by_role("link", name="Calendar").click() page.get_by_role("link", name="Calendar").click()
# Second welcome screen? # Second welcome screen?
with contextlib.suppress(TimeoutError): with contextlib.suppress(TimeoutError):
page.locator('button.first-run-wizard__close-button').click(timeout=15_000) page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]').click(timeout=15_000)
log_note("Create event") log_note("Create event")
event_name = "Weekly sync" event_name = "Weekly sync"

View file

@ -21,9 +21,9 @@ def create_user(playwright: Playwright, browser_name: str, username: str, passwo
page = context.new_page() page = context.new_page()
log_note("Login") log_note("Login")
page.goto("http://nc/") page.goto("http://nc/")
page.get_by_label("Account name or email").click() page.get_by_label("Login with username or email").click()
page.get_by_label("Account name or email").fill("Crash") page.get_by_label("Login with username or email").fill("Crash")
page.get_by_label("Account name or email").press("Tab") page.get_by_label("Login with username or email").press("Tab")
page.get_by_label("Password", exact=True).fill("Override") page.get_by_label("Password", exact=True).fill("Override")
page.get_by_label("Password", exact=True).press("Enter") page.get_by_label("Password", exact=True).press("Enter")
@ -32,7 +32,7 @@ def create_user(playwright: Playwright, browser_name: str, username: str, passwo
sleep(5) sleep(5)
with contextlib.suppress(TimeoutError): with contextlib.suppress(TimeoutError):
page.locator('button.first-run-wizard__close-button').click(timeout=15_000) page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]').click(timeout=15_000)
log_note("Create user") log_note("Create user")
page.get_by_role("link", name="Open settings menu").click() page.get_by_role("link", name="Open settings menu").click()
page.get_by_role("link", name="Users").first.click() page.get_by_role("link", name="Users").first.click()

View file

@ -94,9 +94,9 @@ def collaborate(playwright: Playwright, browser_name: str) -> None:
def login(page, username, password): def login(page, username, password):
page.goto("http://nc/login") page.goto("http://nc/login")
page.get_by_label("Account name or email").click() page.get_by_label("Login with username or email").click()
page.get_by_label("Account name or email").fill(username) page.get_by_label("Login with username or email").fill(username)
page.get_by_label("Account name or email").press("Tab") page.get_by_label("Login with username or email").press("Tab")
page.get_by_label("Password", exact=True).fill(password) page.get_by_label("Password", exact=True).fill(password)
page.get_by_label("Password", exact=True).press("Enter") page.get_by_label("Password", exact=True).press("Enter")

View file

@ -35,9 +35,9 @@ def create_conversation(playwright: Playwright, browser_name: str) -> str:
try: try:
log_note("Login as admin") log_note("Login as admin")
page.goto("http://nc/") page.goto("http://nc/")
page.get_by_label("Account name or email").click() page.get_by_label("Login with username or email").click()
page.get_by_label("Account name or email").fill("Crash") page.get_by_label("Login with username or email").fill("Crash")
page.get_by_label("Account name or email").press("Tab") page.get_by_label("Login with username or email").press("Tab")
page.get_by_label("Password", exact=True).fill("Override") page.get_by_label("Password", exact=True).fill("Override")
page.get_by_role("button", name="Log in").click() page.get_by_role("button", name="Log in").click()
@ -53,7 +53,7 @@ def create_conversation(playwright: Playwright, browser_name: str) -> str:
# Second welcome screen? # Second welcome screen?
with contextlib.suppress(TimeoutError): with contextlib.suppress(TimeoutError):
page.locator('button.first-run-wizard__close-button').click(timeout=15_000) page.locator('#firstrunwizard .modal-container__content button[aria-label=Close]').click(timeout=15_000)
# Headless browsers trigger a warning in Nextcloud, however they actually work fine # Headless browsers trigger a warning in Nextcloud, however they actually work fine
log_note("Close headless warning") log_note("Close headless warning")