Hide Eurostar note during provisional loads
This commit is contained in:
parent
06e622d817
commit
1407cb8246
2 changed files with 2 additions and 1 deletions
2
app.py
2
app.py
|
|
@ -635,7 +635,7 @@ def _results(station_crs, slug, travel_date, journey_type, return_date):
|
||||||
for row in section["rows"]
|
for row in section["rows"]
|
||||||
if row.get("row_type") == "trip"
|
if row.get("row_type") == "trip"
|
||||||
]
|
]
|
||||||
if all_es_prices and all(price is None for price in all_es_prices):
|
if not provisional_timetable and all_es_prices and all(price is None for price in all_es_prices):
|
||||||
no_prices_note = "Eurostar prices not yet available — tickets may not be on sale yet."
|
no_prices_note = "Eurostar prices not yet available — tickets may not be on sale yet."
|
||||||
|
|
||||||
dt = date.fromisoformat(travel_date)
|
dt = date.fromisoformat(travel_date)
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ def test_results_can_render_from_weekday_timetable_cache(monkeypatch):
|
||||||
assert '/api/results_refresh/BRI/paris/2026-06-22' in html
|
assert '/api/results_refresh/BRI/paris/2026-06-22' in html
|
||||||
assert 'refreshFullResults()' in html
|
assert 'refreshFullResults()' in html
|
||||||
assert 'window.location.reload()' not in html
|
assert 'window.location.reload()' not in html
|
||||||
|
assert 'Eurostar prices not yet available' not in html
|
||||||
|
|
||||||
|
|
||||||
def test_results_refresh_reloads_when_exact_timetable_differs(monkeypatch):
|
def test_results_refresh_reloads_when_exact_timetable_differs(monkeypatch):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue