fix(tests): fix all 10 e2e test failures
- test_planner_calculate_htmx: click capex tab to reveal #tab-content (it starts display:none and only shows after tab switch) - test_planner_quote_sidebar_visible_wide: use browser.new_page() instead of page.context.new_page() (default contexts don't support new_page) - test_login/signup/quote_step1_loads: add .first to avoid strict mode violation from the feedback popover form - test_language_switcher_en_to_de: verify footer link href + navigate directly instead of click (avoids off-screen element timing issues) - test_landing_nav_no_overlap: filter display:none elements (zero-width bounding rect) so mobile-only nav div doesn't skew overlap check - test_quote_wizard_*: replace schema.sql (doesn't exist) with migrate() approach matching test_visual.py and test_e2e_flows.py; fix URL from /leads/quote to /en/leads/quote; use label click for display:none pill radios; add missing required fields for steps 6 (financing_status + decision_process) and 8 (services_needed); add contact_phone to step 9 All 1018 unit tests + 61 e2e tests now pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -202,16 +202,18 @@ def test_landing_nav_no_overlap(live_server, page):
|
||||
page.goto(live_server)
|
||||
page.wait_for_load_state("networkidle")
|
||||
|
||||
# Get bounding boxes of direct children in the nav's right-side flex container
|
||||
# Get bounding boxes of visible direct children in the nav inner div
|
||||
boxes = page.evaluate("""
|
||||
(() => {
|
||||
const navDiv = document.querySelector('nav > div');
|
||||
if (!navDiv) return [];
|
||||
const items = navDiv.children;
|
||||
return Array.from(items).map(el => {
|
||||
const r = el.getBoundingClientRect();
|
||||
return {top: r.top, bottom: r.bottom, left: r.left, right: r.right};
|
||||
});
|
||||
return Array.from(items)
|
||||
.map(el => {
|
||||
const r = el.getBoundingClientRect();
|
||||
return {top: r.top, bottom: r.bottom, left: r.left, right: r.right, width: r.width};
|
||||
})
|
||||
.filter(r => r.width > 0); // skip display:none / hidden elements
|
||||
})()
|
||||
""")
|
||||
# Check no horizontal overlap between consecutive items
|
||||
|
||||
Reference in New Issue
Block a user