fix: regenerate state configs from dev; table-view wait matched an icon, not the table - #46
Merged
Merged
Conversation
…, Flood Tenders renames
…cyclone indicators renamed
…ait for any visible <table>
QA Tests ✅ passed
Download the consolidated-test-report artifact for the merged |
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #45 (get the pre-merge full regression green). Refs #44.
Why
Every automatic run targets dev: the PR gate,
main.yml(pointed at dev until the prod move) and nightly. The committedconfig/states/*.yamlwere discovered on 2026-06-17 and no longer match dev. The multistate tests select each configured indicator by its exact name, so every renamed or moved indicator fails its whole section.A fresh baseline on
main(Dispatch Tests, regression on dev, run 36150264203) failed on exactly these names:Elderly population,Children population(moved to vulnerability on dev), and the sixTotal Value of Flood Tenders…indicators (renamed toFlood Tenders : …)Population*,Total Number of Households*,…flood and cyclonenamesChange
Regenerated from dev with
scripts/discover_state_indicators.py(2026-09-25), one commit per state. Himachal Pradesh is unchanged; its only diff was the timestamp.Evidence
mainin CI:test_section_all_indicators_map_view[assam-Assam-exposure]failed with "2/4 indicators FAILED: Elderly population, Children population", and[assam-Assam-government-response]with "6/6 indicators FAILED".2 passed.Full Regression (pre-merge)run is the full check.Prod
Prod (
drr.open-contracting.in) still serves Assam only: the other four states 404 on 2026-09-25, so #43 holds and the prod move hasn't happened. Prod isn't targeted by any automatic run, so these dev-based configs don't break anything there. When prod catches up with dev they will already match it. Same plan as before, with no environment-specific config added.Second fix: every table-view test was failing (test bug)
Baseline shard 3: 15 of 15
TestMultiStateIndicatorsTableViewtests failed in every state, including Himachal Pradesh, which has no drift. Each indicator failed withTable validation failed: Message:(a blank timeout).The cause: the wait used
EC.visibility_of_element_located((By.CSS_SELECTOR, "table, .table, [class*='table']")). Selenium takes the first match in the document, and that first match is a Tabler icon (<svg class="tabler-icon …">, since "tabler" contains "table"), not the table. Waiting on that icon's visibility timed out while the real table was rendered. I checked in the browser with the test's exact flow (Assam → Table View → Sivasagar / Sibsagar → Total Number of Households): a<table>with the right column showed within 1 ms.The fix waits for any displayed
<table>.--rerunsoff:[uttar-pradesh-Uttar pradesh-hazard]→ 1 failed, "Table validation failed" on both indicators[uttar-pradesh-Uttar pradesh-hazard]and[assam-Assam-exposure]→ 2 passedThe other two shard 3 failures (
TestSectionCoverageByStateOdisha exposure, Assam government response: "No indicators successfully tested") are the same indicator-name drift as above.Third change: data gaps are reported, not failed
The first rerun of this PR (36165577942) left 4 failures, all of them the app working correctly with nothing to show:
Decision (agreed): these are reported, not failed.
AnalyticsPage.is_no_data_displayed()andis_indicator_listed().warnings.warn.warnings.warn. Map and table view still fail if an indicator really disappears.pytest.ini: dropped--disable-warningsso the warnings summary is actually printed. The only other warnings in the suite were my own local-p no:rerunfailuresconfig warnings.Verified locally against dev: UP chart view plus the Assam and Odisha table views →
3 passed. The UP run's summary names exactly the 2 expected indicators.A data card listing every "No data available." indicator will follow from this run's warnings summary.
Follow-up (not in this PR)
The chart and map waits (
canvas, svg, .chart, [class*='chart']andcanvas, svg) are satisfied by any visible SVG icon, so they pass even if no chart or map renders. That's the same substring-selector trap as the table wait, in the other direction. It needs the real chart and map containers; to be tracked as a separate card.Baseline summary (main, run 36150264203)