21 lines
633 B
Python
Raw Normal View History

2025-11-09 10:02:10 +01:00
import pytest
BASE_URL = "http://127.0.0.1:8080"
@pytest.mark.asyncio
async def test_user_registration(page):
await page.goto(f"{BASE_URL}/")
await page.wait_for_load_state("networkidle")
await page.click("text=Register")
await page.wait_for_url("**/register")
await page.fill("#full_name", "Test User")
await page.fill("#email", "testuser@example.com")
await page.fill("#password", "password123")
await page.fill("#confirm_password", "password123")
await page.check("#terms")
await page.click("button[type=submit]")
await page.wait_for_url("**/login")
assert "/login" in page.url