diff --git a/src/.coveragerc b/src/.coveragerc index e517db2..d5929ea 100644 --- a/src/.coveragerc +++ b/src/.coveragerc @@ -5,6 +5,7 @@ omit = */tests/* */routing.py */reset_staging_db.py + */delete_stale_my_sea_draws.py [report] show_missing = true \ No newline at end of file diff --git a/src/functional_tests/test_gameboard.py b/src/functional_tests/test_gameboard.py index 159ef0d..7a8be3d 100644 --- a/src/functional_tests/test_gameboard.py +++ b/src/functional_tests/test_gameboard.py @@ -3,6 +3,7 @@ from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from .base import FunctionalTest +from .sig_page import _seed_earthman_sig_pile from apps.applets.models import Applet from apps.epic.models import DeckVariant, Room from apps.lyric.models import Token, User @@ -11,6 +12,17 @@ from apps.lyric.models import Token, User class GameboardNavigationTest(FunctionalTest): def setUp(self): super().setUp() + # Re-seed the Earthman DeckVariant up front — TransactionTestCase + # flushes migration data between tests, so by the time the user + # is created (`create_pre_authenticated_session` inside each test + # method), the post_save signal in `apps/lyric/models.py:537`'s + # `DeckVariant.objects.filter(slug="earthman").first()` would + # return None + skip `unlocked_decks.add(earthman)`. That left + # `test_game_kit_panel_shows_token_inventory`'s `id_kit_earthman_ + # deck` selector unrenderable (applet falls through to the + # `{% empty %}` `id_kit_card_deck` placeholder). CI #340 trap. + # See [[feedback-transactiontestcase-flush]]. + _seed_earthman_sig_pile() Applet.objects.get_or_create(slug="new-game", defaults={"name": "New Game", "context": "gameboard"}) Applet.objects.get_or_create(slug="my-games", defaults={"name": "My Games", "context": "gameboard"}) Applet.objects.get_or_create(slug="game-kit", defaults={"name": "Game Kit", "context": "gameboard"})