snapshot: preserve builder deletion and onboarding ux improvements
This commit is contained in:
@@ -226,6 +226,41 @@ class OnboardingFlowTests(TestCase):
|
||||
self.assertIn('Benefits', html)
|
||||
self.assertIn('Essenszuschuss', html)
|
||||
|
||||
def test_onboarding_custom_section_with_checkbox_fields_shows_section_select_all(self):
|
||||
FormCustomSectionConfig.objects.create(
|
||||
form_type='onboarding',
|
||||
section_key='benefits',
|
||||
sort_order=10,
|
||||
title='Benefits',
|
||||
is_active=True,
|
||||
)
|
||||
FormCustomFieldConfig.objects.create(
|
||||
form_type='onboarding',
|
||||
field_key='meal_allowance',
|
||||
section_key='benefits',
|
||||
sort_order=0,
|
||||
field_type='checkbox',
|
||||
is_active=True,
|
||||
label='Essenszuschuss',
|
||||
)
|
||||
FormCustomFieldConfig.objects.create(
|
||||
form_type='onboarding',
|
||||
field_key='parking_spot',
|
||||
section_key='benefits',
|
||||
sort_order=1,
|
||||
field_type='checkbox',
|
||||
is_active=True,
|
||||
label='Parkplatz',
|
||||
)
|
||||
|
||||
response = self.client.get('/onboarding/new/', HTTP_HOST='localhost')
|
||||
html = response.content.decode('utf-8')
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn('data-section-checkbox-toggle', html)
|
||||
self.assertIn('Essenszuschuss', html)
|
||||
self.assertIn('Parkplatz', html)
|
||||
|
||||
@patch('workflows.views.process_onboarding_request.delay')
|
||||
def test_onboarding_custom_field_is_rendered_and_saved(self, mock_delay):
|
||||
FormCustomFieldConfig.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user