mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 06:00:11 +03:00
- Added `bio` field to User model and migrations - Created `UserProfileUpdateSerializer` with RegexValidator (XSS) and Bleach (HTML sanitization) - Updated `ExternalSourceSerializer` to require `https://` or `magnet:` schemes - Replaced insecure extension checking with true MIME validation via `python-magic` in serializers (Subtitles, Images, Banners) - Fixed NextUI floating label overlap bug on magnet link input with `labelPlacement="outside"` and a placeholder. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Senpai-YoloBot <41898282+github-actions[bot]@users.noreply.github.com>
26 lines
823 B
Python
26 lines
823 B
Python
from playwright.sync_api import Page, expect, sync_playwright
|
|
|
|
def test_admin_upload(page: Page):
|
|
page.goto("http://localhost:3000/admin/upload")
|
|
page.wait_for_timeout(2000)
|
|
|
|
page.get_by_role("tab", name="Magnet Link").click()
|
|
page.wait_for_timeout(500)
|
|
|
|
input_field = page.locator('label:has-text("Magnet Link / Torrent URL")').locator('..').locator('input')
|
|
input_field.fill("invalid-link")
|
|
|
|
page.wait_for_timeout(500)
|
|
page.screenshot(path="/home/jules/verification/admin_upload.png")
|
|
|
|
if __name__ == "__main__":
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True)
|
|
page = browser.new_page()
|
|
try:
|
|
test_admin_upload(page)
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
finally:
|
|
browser.close()
|