Skip to content

Commit

Permalink
Fix missing static files in the styleguide
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage authored and gasman committed Apr 29, 2024
1 parent bd63ab2 commit a29cbcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions wagtail/contrib/styleguide/tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.test import TestCase
from django.urls import reverse

from wagtail.admin.staticfiles import versioned_static
from wagtail.test.utils import WagtailTestUtils


Expand All @@ -13,3 +14,10 @@ def test_styleguide(self):

self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "wagtailstyleguide/base.html")

custom_css = versioned_static("wagtailstyleguide/css/animate-progress.css")
widget_css = versioned_static("wagtailadmin/css/panels/draftail.css")
widget_js = versioned_static("wagtailadmin/js/draftail.js")
self.assertContains(response, custom_css)
self.assertContains(response, widget_css)
self.assertContains(response, widget_js)
2 changes: 1 addition & 1 deletion wagtail/contrib/styleguide/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, *args, **kwargs):

@property
def media(self):
return forms.Media(
return super().media + forms.Media(
css={
"all": [versioned_static("wagtailstyleguide/css/animate-progress.css")]
}
Expand Down

0 comments on commit a29cbcc

Please sign in to comment.