extensive refactor push to continue to liberate applets from dashboard; new _applets.html & .gear.html template partials for use across all -board views; all applets.html sections have been liberated into their own _applet-<applet-name>.html template partials in their respective templates/apps/*board/_partials/ dirs; gameboard.html & home.html greatly simplified; .gear-btn describes gear menu now, #id_<*board nickname>*gear IDs abandoned; as such, .gear-btn styling moved from _dashboard.scss to _base.scss; new applets.js file contains related initGearMenus scripts, which no longer waits for window reload; new apps.applets.utils file manages applet_context() fn; new gameboard.js file but currently empty (false start); updates across all sorts of ITs & dash- & gameboard FTs
This commit is contained in:
@@ -66,6 +66,7 @@ class NewListTest(TestCase):
|
||||
response = self.post_invalid_input()
|
||||
self.assertContains(response, html.escape(EMPTY_ITEM_ERROR))
|
||||
|
||||
@override_settings(COMPRESS_ENABLED=False)
|
||||
class ListViewTest(TestCase):
|
||||
def test_uses_list_template(self):
|
||||
mylist = List.objects.create()
|
||||
@@ -358,7 +359,7 @@ class ProfileViewTest(TestCase):
|
||||
[username_input] = parsed.cssselect("#id_new_username")
|
||||
self.assertEqual("discoman", username_input.get("value"))
|
||||
|
||||
class ToggleAppletsViewTest(TestCase):
|
||||
class ToggleDashAppletsViewTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create(email="disco@test.io")
|
||||
self.client.force_login(self.user)
|
||||
@@ -402,6 +403,13 @@ class ToggleAppletsViewTest(TestCase):
|
||||
self.assertEqual(len(parsed.cssselect("#id_applet_username")), 1)
|
||||
self.assertEqual(len(parsed.cssselect("#id_applet_palette")), 0)
|
||||
|
||||
def test_toggle_applets_does_not_affect_gameboard_applets(self):
|
||||
game_applet, _ = Applet.objects.get_or_create(
|
||||
slug="new-game", defaults={"name": "New Game", "context": "gameboard"}
|
||||
)
|
||||
self.client.post(self.url, {"applets": ["username", "palette"]})
|
||||
self.assertFalse(UserApplet.objects.filter(user=self.user, applet=game_applet). exists())
|
||||
|
||||
class AppletVisibilityContextTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create(email="disco@test.io")
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import lxml.html
|
||||
|
||||
from django.test import TestCase
|
||||
from django.test import override_settings, TestCase
|
||||
|
||||
from apps.lyric.models import Token, User, Wallet
|
||||
|
||||
|
||||
@override_settings(COMPRESS_ENABLED=False)
|
||||
class WalletViewTest(TestCase):
|
||||
def setUp(self):
|
||||
self.user = User.objects.create(email="capman@test.io")
|
||||
|
||||
Reference in New Issue
Block a user