Convert add_purchase.js to TypeScript; drop dead add_edition.js (issue #17)

- Add ts/add_purchase.ts: typed port of add_purchase.js. Replaces getEl with
  document.querySelector; types the search-select:change CustomEvent detail
  (SearchSelectChangeDetail / SearchSelectOption)
- Point add_purchase / edit_purchase views at compiled dist/add_purchase.js
- Delete add_edition.js: no Edition model/view/url/template references it
  (feature was removed; the script was dead)
- Delete the now-superseded add_game.js / add_purchase.js source files
- Tighten test_rendered_pages assertions to the dist/ script paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 13:27:05 +02:00
parent b03d9241fc
commit daae9b8944
5 changed files with 35 additions and 59 deletions
+2 -2
View File
@@ -125,14 +125,14 @@ class RenderedPagesTest(TestCase):
def test_add_game_form(self):
html = self.get("games:add_game").content.decode()
self.assertIn("add_game.js", html)
self.assertIn("dist/add_game.js", html)
self.assertIn("submit_and_redirect", html)
self.assertIn("Submit &amp; Create Purchase", html) # & correctly escaped
self.assertNoEscapedTags(html)
def test_add_purchase_form(self):
html = self.get("games:add_purchase").content.decode()
self.assertIn("add_purchase.js", html)
self.assertIn("dist/add_purchase.js", html)
self.assertIn("Submit &amp; Create Session", html)
self.assertIn("<tr>", html)
self.assertNoEscapedTags(html)