sky wheel: element contributor display; sign + house tooltips — TDD
sky_save now re-fetches from PySwiss server-side on save so stored chart_data always carries enriched element format (contributors/stellia/ parades). New sky/data endpoint serves fresh PySwiss data to the My Sky applet on load, replacing the stale inline json_script approach. natus-wheel.js: sign ring slices (data-sign-name) and house ring slices (data-house) now have click handlers with _activateSign/_activateHouse; em-dash fallback added for classic elements with empty contributor lists. Action URLs sky/preview, sky/save, sky/data lose trailing slashes. Jasmine: T12 sign tooltip, T13 house tooltip, T14 enriched element contributor display (symbols, Stellium/Parade formations, em-dash fallback). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"""Integration tests for the My Sky dashboard views.
|
||||
|
||||
sky_view — GET /dashboard/sky/ → renders sky template
|
||||
sky_preview — GET /dashboard/sky/preview/ → proxies to PySwiss (no DB write)
|
||||
sky_save — POST /dashboard/sky/save/ → saves natal data to User model
|
||||
sky_preview — GET /dashboard/sky/preview → proxies to PySwiss (no DB write)
|
||||
sky_save — POST /dashboard/sky/save → saves natal data to User model
|
||||
"""
|
||||
|
||||
import json
|
||||
@@ -113,14 +113,13 @@ class SkySaveTest(TestCase):
|
||||
self.assertEqual(response.status_code, 405)
|
||||
|
||||
def test_saves_sky_fields_to_user(self):
|
||||
chart = {"planets": {}, "houses": {}, "elements": {}}
|
||||
payload = {
|
||||
"birth_dt": "1990-06-15T08:30:00",
|
||||
"birth_lat": 51.5074,
|
||||
"birth_lon": -0.1278,
|
||||
"birth_place": "London, UK",
|
||||
"house_system": "O",
|
||||
"chart_data": chart,
|
||||
"chart_data": {},
|
||||
}
|
||||
response = self._post(payload)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
@@ -131,7 +130,6 @@ class SkySaveTest(TestCase):
|
||||
self.assertAlmostEqual(float(self.user.sky_birth_lon), -0.1278, places=3)
|
||||
self.assertEqual(self.user.sky_birth_place, "London, UK")
|
||||
self.assertEqual(self.user.sky_house_system, "O")
|
||||
self.assertEqual(self.user.sky_chart_data, chart)
|
||||
|
||||
def test_invalid_json_returns_400(self):
|
||||
response = self.client.post(
|
||||
|
||||
Reference in New Issue
Block a user