many styling changes to applets and palettes applet esp.; all applets seeded w. < 3rows bumped to 3 w. new migration in apps.applets; setting palette no longer reloads entire page, only preset background-color vars; two new ITs in apps.dash.tests.ITs.test_views.SetPaletteTest to ensure dash.views functionality fires; unified h2 applet title html structure & styled its text vertically to waste less applet space
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -299,6 +299,24 @@ class SetPaletteTest(TestCase):
|
||||
response = self.client.post("/dashboard/set_palette", data={"palette": "palette-default"})
|
||||
self.assertRedirects(response, "/", fetch_redirect_response=False)
|
||||
|
||||
def test_set_palette_returns_json_when_requested(self):
|
||||
response = self.client.post(
|
||||
"/dashboard/set_palette",
|
||||
data={"palette": "palette-sepia"},
|
||||
headers={"Accept": "application/json"},
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.json(), {"palette": "palette-sepia"})
|
||||
|
||||
def test_locked_palette_returns_unchanged_json(self):
|
||||
response = self.client.post(
|
||||
"/dashboard/set_palette",
|
||||
data={"palette": "palette-nirvana"},
|
||||
headers={"Accept": "application/json"},
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.json(), {"palette": "palette-default"})
|
||||
|
||||
def test_dashboard_contains_set_palette_form(self):
|
||||
response = self.client.get(self.url)
|
||||
parsed = lxml.html.fromstring(response.content)
|
||||
|
||||
Reference in New Issue
Block a user