Improve backtest lazy loading and test automation
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from playwright.sync_api import expect, sync_playwright
|
||||
|
||||
BASE_URL = "http://127.0.0.1:8100"
|
||||
pytestmark = [pytest.mark.playwright, pytest.mark.e2e]
|
||||
|
||||
|
||||
def test_settings_reject_invalid_loan_amount_without_silent_zero_fallback() -> None:
|
||||
def test_settings_reject_invalid_loan_amount_without_silent_zero_fallback(base_url: str) -> None:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
page = browser.new_page(viewport={"width": 1440, "height": 1000})
|
||||
|
||||
page.goto(BASE_URL, wait_until="domcontentloaded", timeout=30000)
|
||||
page.goto(base_url, wait_until="domcontentloaded", timeout=30000)
|
||||
expect(page.locator("text=Create a private workspace URL").first).to_be_visible(timeout=10000)
|
||||
page.get_by_role("button", name="Get started").click()
|
||||
page.wait_for_url(f"{BASE_URL}/*", timeout=15000)
|
||||
page.wait_for_url(f"{base_url}/*", timeout=15000)
|
||||
workspace_url = page.url
|
||||
|
||||
page.goto(f"{workspace_url}/settings", wait_until="domcontentloaded", timeout=30000)
|
||||
|
||||
Reference in New Issue
Block a user