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:
@@ -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 & 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 & Create Session", html)
|
||||
self.assertIn("<tr>", html)
|
||||
self.assertNoEscapedTags(html)
|
||||
|
||||
Reference in New Issue
Block a user