feat: add per-row css class support for grids
This commit is contained in:
parent
f6fb6957e3
commit
e332975ce9
11 changed files with 253 additions and 75 deletions
|
@ -31,6 +31,17 @@ class TestUserView(WebTestCase):
|
|||
view.configure_grid(grid)
|
||||
self.assertTrue(grid.is_linked('person'))
|
||||
|
||||
def test_grid_row_class(self):
|
||||
model = self.app.model
|
||||
user = model.User(username='barney', active=True)
|
||||
data = dict(user)
|
||||
view = self.make_view()
|
||||
|
||||
self.assertIsNone(view.grid_row_class(user, data, 1))
|
||||
|
||||
user.active = False
|
||||
self.assertEqual(view.grid_row_class(user, data, 1), 'has-background-warning')
|
||||
|
||||
def test_configure_form(self):
|
||||
model = self.app.model
|
||||
barney = model.User(username='barney')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue