Skip to content

Commit

Permalink
Clarify comments in product tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyh authored and whatnick committed Dec 11, 2020
1 parent 19b597d commit 27ae280
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions integration_tests/test_page_loads.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,25 @@ def test_uninitialised_overview(


def test_uninitialised_product(empty_client: FlaskClient, summary_store: SummaryStore):
"""
An unsummarised product should still be viewable on the product page.
(but should be described as not summarised)
"""
# Populate one product, so they don't get the usage error message ("run cubedash generate")
# Then load an unpopulated product.
summary_store.refresh_product(summary_store.get_dataset_type("ls7_nbar_albers"))
summary_store.get_or_update("ls7_nbar_albers")

html = get_html(empty_client, "/products/ls7_nbar_scene")

# The page should load without error, but will display 'unknown' fields
# The page should load without error, but will mention its lack of information
assert html.find("h2", first=True).text == "ls7_nbar_scene"
assert (
"Product not summarised" in one_element(html, ".header-stat-information").text
)

# ... but the one we populated doesn't show it:
# ... and a product that we populated does not have the message:
html = get_html(empty_client, "/products/ls7_nbar_albers")
assert (
"Product not summarised"
Expand Down

0 comments on commit 27ae280

Please sign in to comment.