From 9291fb5a73d3ce17918018d372ea24e604aa6a15 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Thu, 15 Oct 2026 15:49:04 +0000 Subject: [PATCH] Key status tests: the card order without a type line (section 32.2 points 6-8) --- tests/test_key_status.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/test_key_status.py b/tests/test_key_status.py index 85f6869..014d6e4 100644 --- a/tests/test_key_status.py +++ b/tests/test_key_status.py @@ -102,18 +102,22 @@ class KeyStatusAddressPathTests(SessionMixin, unittest.TestCase): self.assertEqual([entry["last_checked_at"] for entry in status], [None, None, None]) self.assertEqual([entry["next_check_due"] for entry in status], [None, None, None]) - def test_the_dashboard_card_shows_the_path_between_the_name_and_the_type(self): - # createKeyCard() renders the path between the name and the type, and an - # empty path is skipped (section 31 point 4). + def test_the_dashboard_card_shows_the_path_under_the_name(self): + # createKeyCard() renders the name, then the model, then the path, and an + # empty path is skipped (sections 31.4 and 32.2 point 7). The type shares + # the top line with the number now, so it has no line of its own + # (section 32.2 point 6). script = read_static("app.js") self.assertIn("entry.address_path", script) name_index = script.index("card.append(top, name);") + model_index = script.index("card.append(model);") path_index = script.index("card.append(path);") - type_index = script.index("card.append(type);") - self.assertLess(name_index, path_index) - self.assertLess(path_index, type_index) + self.assertLess(name_index, model_index) + self.assertLess(model_index, path_index) self.assertIn("if (entry.address_path) {", script) + self.assertNotIn("card.append(type);", script) + self.assertNotIn("Hardware key", script) if __name__ == "__main__":