fix: add render_vue_finalize()
methods for grids, forms
to make the templates just that much cleaner
This commit is contained in:
parent
784f974c0d
commit
f7e371d21d
7 changed files with 71 additions and 16 deletions
|
@ -405,6 +405,12 @@ class TestForm(TestCase):
|
|||
self.assertIn('<script type="text/x-template" id="wutta-form-template">', html)
|
||||
self.assertNotIn('@submit', html)
|
||||
|
||||
def test_render_vue_finalize(self):
|
||||
form = self.make_form()
|
||||
html = form.render_vue_finalize()
|
||||
self.assertIn('<script>', html)
|
||||
self.assertIn("Vue.component('wutta-form', WuttaForm)", html)
|
||||
|
||||
def test_render_vue_field(self):
|
||||
self.pyramid_config.include('pyramid_deform')
|
||||
schema = self.make_schema()
|
||||
|
|
|
@ -855,6 +855,12 @@ class TestGrid(WebTestCase):
|
|||
html = grid.render_vue_template()
|
||||
self.assertIn('<script type="text/x-template" id="wutta-grid-template">', html)
|
||||
|
||||
def test_render_vue_finalize(self):
|
||||
grid = self.make_grid()
|
||||
html = grid.render_vue_finalize()
|
||||
self.assertIn('<script>', html)
|
||||
self.assertIn("Vue.component('wutta-grid', WuttaGrid)", html)
|
||||
|
||||
def test_get_vue_columns(self):
|
||||
|
||||
# error if no columns are set
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue