Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestSubmitPageTranslationWithComponents for Wagtail 4 #601

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions wagtail_localize/tests/test_translation_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ def test_post_submit_page_translation(self):
},
)

self.assertContains(
response, "component-form__fieldname-custom_text_field error"
components = list(response.context["components"])
_, _, component_form = components[1]
self.assertEqual(
component_form.errors["custom_text_field"], ["This field is required."]
)
# Check that error message is actually rendered
self.assertContains(response, "This field is required")

self.assertEqual(CustomTranslationData.objects.count(), 0)
Expand Down