feat(деньги): валовая прибыль начислено минус себестоимость
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ from test_admin_design_ui import browser # noqa: E402,F401
|
||||
|
||||
MONEY = {"period_days": 30, "revenue_rub": 1000, "refunded_rub": 0, "cost_rub": 250,
|
||||
"flow_rub": 750, "charged_rub": 800, "accounts_total_rub": 2000,
|
||||
"accounts_count": 2, "unpriced": 0, "topups_rub": 0}
|
||||
"accounts_count": 2, "unpriced": 0, "topups_rub": 0, "profit_rub": 500}
|
||||
MONTHS = [{"month": "2026-09", "revenue_rub": 500, "cost_rub": 100},
|
||||
{"month": "2026-10", "revenue_rub": 500, "cost_rub": 150}]
|
||||
PAYMENTS = [
|
||||
@@ -97,9 +97,11 @@ def test_money_cards_charts_and_period(browser, site):
|
||||
page.add_init_script("localStorage.setItem('token','t')")
|
||||
page.goto(site + "/admin/v2/money")
|
||||
page.wait_for_selector(".grid .card")
|
||||
assert page.locator(".grid .card").count() == 4
|
||||
assert page.locator(".grid .card").count() == 5
|
||||
assert page.locator(".chart").count() == 2
|
||||
assert "1\u00a0000" in page.locator(".grid").inner_text()
|
||||
grid = page.locator(".grid").inner_text()
|
||||
assert "1\u00a0000" in grid
|
||||
assert "\u041f\u0440\u0438\u0431\u044b\u043b\u044c" in grid and "500" in grid
|
||||
page.locator(".toolbar button", has_text="90 дней").click()
|
||||
page.wait_for_timeout(500)
|
||||
assert any("days=90" in c for c in Handler.calls)
|
||||
|
||||
Reference in New Issue
Block a user