manual submission redesign phase B
This commit is contained in:
@@ -157,9 +157,12 @@ class ManualPendingEventTests(TestCase):
|
||||
response = self.client.get(reverse("hello"))
|
||||
|
||||
self.assertContains(response, "Report fireworks now")
|
||||
self.assertContains(response, "I heard fireworks — send to Pending")
|
||||
self.assertContains(response, "I heard fireworks")
|
||||
self.assertContains(response, "Capture direction")
|
||||
self.assertContains(response, 'manual-direction-panel" hidden')
|
||||
self.assertContains(response, 'id="manual-decrease"')
|
||||
self.assertContains(response, 'id="manual-increase"')
|
||||
self.assertContains(response, 'id="manual-direction-panel"')
|
||||
self.assertContains(response, 'hx-get="/fireworks/manual-direction/?mode=measure"')
|
||||
self.assertContains(response, 'id="manual-compass"')
|
||||
self.assertContains(response, 'aria-label="Compass direction" hidden')
|
||||
self.assertContains(response, "htmx.min.js")
|
||||
@@ -169,6 +172,16 @@ class ManualPendingEventTests(TestCase):
|
||||
self.assertContains(response, "Open map controls")
|
||||
self.assertContains(response, "Classify a recording")
|
||||
|
||||
def test_direction_subsection_opens_and_closes_with_htmx_fragments(self):
|
||||
url = reverse("fireworks_detect:manual_direction_panel")
|
||||
measuring = self.client.get(url, {"mode": "measure"}, HTTP_HX_REQUEST="true")
|
||||
self.assertContains(measuring, 'id="manual-capture-direction"')
|
||||
self.assertContains(measuring, 'hx-target="#manual-direction-panel"')
|
||||
|
||||
closed = self.client.get(url, HTTP_HX_REQUEST="true")
|
||||
self.assertContains(closed, 'id="manual-direction-summary"')
|
||||
self.assertNotContains(closed, 'id="manual-capture-direction"')
|
||||
|
||||
def test_old_route_preserves_the_previous_landing_page(self):
|
||||
response = self.client.get(reverse("old_home"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user