fix: correct typo in user authentication error message for invalid credentials

This commit is contained in:
2026-06-12 04:55:10 +00:00
parent dc8efa1da5
commit 3b669ec44b
8 changed files with 138 additions and 60 deletions
+19 -6
View File
@@ -1,3 +1,5 @@
from playwright.sync_api import expect
from tests.conftest import BASE_URL
@@ -27,7 +29,7 @@ def test_profile_level_bar(alice):
page, user = alice
page.goto(f"{BASE_URL}/profile/{user['username']}", wait_until="domcontentloaded")
assert page.is_visible("text=Progress to next level")
level_bar = page.locator(".level-bar .bar")
level_bar = page.locator(".profile-level-bar .bar")
assert level_bar.is_visible()
@@ -235,9 +237,14 @@ def test_profile_customization_global_toggle(alice):
page.goto(f"{BASE_URL}/profile/{user['username']}", wait_until="domcontentloaded")
form = page.locator(f"form[action='/profile/{user['username']}/customization/global']")
if form.count() > 0:
was_checked = form.locator("input[name='value']").is_checked()
form.locator("button[type='submit']").click()
page.wait_for_url(f"**/profile/{user['username']}", wait_until="domcontentloaded")
button = form.locator("button[type='submit']")
expect(button).to_have_text("Disable")
button.click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
expect(button).to_have_text("Enable")
button.click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
expect(button).to_have_text("Disable")
def test_profile_customization_pagetype_toggle(alice):
@@ -245,6 +252,12 @@ def test_profile_customization_pagetype_toggle(alice):
page.goto(f"{BASE_URL}/profile/{user['username']}", wait_until="domcontentloaded")
form = page.locator(f"form[action='/profile/{user['username']}/customization/pagetype']")
if form.count() > 0:
form.locator("button[type='submit']").click()
page.wait_for_url(f"**/profile/{user['username']}", wait_until="domcontentloaded")
button = form.locator("button[type='submit']")
expect(button).to_have_text("Disable")
button.click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
expect(button).to_have_text("Enable")
button.click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
expect(button).to_have_text("Disable")
+10 -11
View File
@@ -416,21 +416,20 @@ def test_project_make_private(alice):
page, _ = alice
_create_project(page, "PrivateToggleProject")
slug = page.url.rstrip("/").split("/")[-1]
form_sel = f"form[action='/projects/{slug}/private']"
form = page.locator(form_sel)
if form.count() > 0:
was_private = form.locator("input[name='value']").is_checked()
form.locator("button[type='submit']").click()
page.wait_for_url(f"**/projects/{slug}", wait_until="domcontentloaded")
page.locator(".project-actions-more").click()
page.locator(".context-menu-item:has-text('Make private')").click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
page.wait_for_url(f"**/projects/{slug}", wait_until="domcontentloaded")
expect(page.locator(".badge-type:has-text('Private')")).to_be_visible()
def test_project_make_readonly(alice):
page, _ = alice
_create_project(page, "ReadonlyToggleProject")
slug = page.url.rstrip("/").split("/")[-1]
form_sel = f"form[action='/projects/{slug}/readonly']"
form = page.locator(form_sel)
if form.count() > 0:
form.locator("button[type='submit']").click()
page.wait_for_url(f"**/projects/{slug}", wait_until="domcontentloaded")
page.locator(".project-actions-more").click()
page.locator(".context-menu-item:has-text('Make read-only')").click()
page.locator(".dialog-overlay.visible .dialog-confirm").click()
page.wait_for_url(f"**/projects/{slug}", wait_until="domcontentloaded")
expect(page.locator(".badge-type:has-text('Read-only')")).to_be_visible()