File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,6 +156,26 @@ def test_studio_wizard_has_dynamic_fields(self):
156156 field_name = f"x_evt_{ test_field .technical_name } "
157157 self .assertIn (field_name , studio_wizard ._fields )
158158
159+ def test_is_studio_event_type_flag (self ):
160+ """Test the is_studio_event_type computed field that drives step-1 UX."""
161+ # Studio-backed event type → flag is True
162+ wizard = self .env ["spp.create.event.wizard" ].create (
163+ {
164+ "partner_id" : self .registrant .id ,
165+ "event_type_id" : self .event_type .id ,
166+ "collection_date" : date .today (),
167+ }
168+ )
169+ self .assertTrue (wizard .is_studio_event_type )
170+
171+ # Switching to a non-Studio event type → flag flips to False
172+ wizard .event_type_id = self .regular_event_type
173+ self .assertFalse (wizard .is_studio_event_type )
174+
175+ # Clearing the event type → flag is False
176+ wizard .event_type_id = False
177+ self .assertFalse (wizard .is_studio_event_type )
178+
159179 def test_inactive_studio_type_does_not_redirect (self ):
160180 """Test that inactive Studio types don't trigger redirect."""
161181 # Deactivate the Studio event type
You can’t perform that action at this time.
0 commit comments