text
stringlengths
0
133
[test.sh] backend up after 2s
[test.sh] frontend up after 1s
[test.sh] seeding...
[seed] created group id=1 with members=[1, 2, 3]
[test.sh] running pytest...
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 9 items
../tests/test_addexpense_sparse.py ......... [100%]
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_addexpense_sparse.py::test_no_page_errors
PASSED ../tests/test_addexpense_sparse.py::test_h1_add_expense
PASSED ../tests/test_addexpense_sparse.py::test_back_link_to_group
PASSED ../tests/test_addexpense_sparse.py::test_form_inputs_present
PASSED ../tests/test_addexpense_sparse.py::test_submit_button
PASSED ../tests/test_addexpense_sparse.py::test_quirk_summary_panel_above_form
PASSED ../tests/test_addexpense_sparse.py::test_quirk_amount_before_description
PASSED ../tests/test_addexpense_sparse.py::test_quirk_submit_before_cancel
PASSED ../tests/test_addexpense_sparse.py::test_quirk_split_among_two_columns
============================== 9 passed in 1.04s ===============================
[test.sh] starting backend (Flask :5001)...
[test.sh] starting frontend (Vite :5173)...
[test.sh] backend up after 2s
[test.sh] frontend up after 1s
[test.sh] seeding...
[seed] created group id=1 with members=[1, 2, 3]
[test.sh] running pytest...
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 9 items
../tests/test_addexpense_sparse.py ......... [100%]
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_addexpense_sparse.py::test_no_page_errors
PASSED ../tests/test_addexpense_sparse.py::test_h1_add_expense
PASSED ../tests/test_addexpense_sparse.py::test_back_link_to_group
PASSED ../tests/test_addexpense_sparse.py::test_form_inputs_present
PASSED ../tests/test_addexpense_sparse.py::test_submit_button
PASSED ../tests/test_addexpense_sparse.py::test_quirk_summary_panel_above_form
PASSED ../tests/test_addexpense_sparse.py::test_quirk_amount_before_description
PASSED ../tests/test_addexpense_sparse.py::test_quirk_submit_before_cancel
PASSED ../tests/test_addexpense_sparse.py::test_quirk_split_among_two_columns
============================== 9 passed in 1.04s ===============================
[test.sh] starting backend (Flask :5001)...
[test.sh] starting frontend (Vite :5173)...
[test.sh] backend up after 2s
[test.sh] frontend up after 1s
[test.sh] seeding...
[seed] created group id=1 with members=[1, 2, 3]
[test.sh] running pytest...
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 9 items
../tests/test_addexpense_sparse.py .......F. [100%]
=================================== FAILURES ===================================
_______________________ test_quirk_submit_before_cancel ________________________
page = <Page url='http://127.0.0.1:5173/add-expense/1'>
def test_quirk_submit_before_cancel(page):
"""In DOM order within form-actions, the primary submit button appears before the Cancel link."""
# Find the primary submit button and the cancel link, compare their bounding boxes by Y then X.
submit = page.get_by_role("button", name="Add Expense").first
cancel = page.locator('a:has-text("Cancel")').first
assert submit.count() > 0, "Missing 'Add Expense' submit button"
assert cancel.count() > 0, "Missing 'Cancel' link"
sb = submit.bounding_box()
cb = cancel.bounding_box()
assert sb is not None and cb is not None, "Could not measure submit/cancel positions"
# Variant: submit on the LEFT, cancel on the RIGHT (same row, submit.x < cancel.x).
# If they're on different rows, fall back to DOM order via JS evaluate.
same_row = abs(sb["y"] - cb["y"]) < 30
if same_row:
> assert sb["x"] < cb["x"], (
f"Variant has 'Add Expense' on the LEFT and 'Cancel' on the RIGHT; "
f"got submit.x={sb['x']} cancel.x={cb['x']}"
)
E AssertionError: Variant has 'Add Expense' on the LEFT and 'Cancel' on the RIGHT; got submit.x=762.296875 cancel.x=662.375
E assert 762.296875 < 662.375
/tests/test_addexpense_sparse.py:106: AssertionError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_addexpense_sparse.py::test_no_page_errors
PASSED ../tests/test_addexpense_sparse.py::test_h1_add_expense
PASSED ../tests/test_addexpense_sparse.py::test_back_link_to_group
PASSED ../tests/test_addexpense_sparse.py::test_form_inputs_present