diff --git a/app/assets/javascripts/app/views/object_manager/attribute/boolean.jst.eco b/app/assets/javascripts/app/views/object_manager/attribute/boolean.jst.eco index 9b9bcef84..51408ec45 100644 --- a/app/assets/javascripts/app/views/object_manager/attribute/boolean.jst.eco +++ b/app/assets/javascripts/app/views/object_manager/attribute/boolean.jst.eco @@ -13,14 +13,14 @@ - checked<% end %>/> + checked<% end %>/> false - checked<% end %>/> + checked<% end %>/> diff --git a/spec/system/system/object_manager_spec.rb b/spec/system/system/object_manager_spec.rb index 4d973aed7..3bd5c1fa8 100644 --- a/spec/system/system/object_manager_spec.rb +++ b/spec/system/system/object_manager_spec.rb @@ -114,6 +114,24 @@ RSpec.describe 'Admin Panel > Objects', type: :system do expect(ObjectManager::Attribute.last.data_option['options']).to eq(expected_data_options) end + it 'checks default boolean value visibility' do + page.find('.js-new').click + + fill_in 'Name', with: 'bool1' + find('input[name=display]').set('Bool 1') + + page.find('select[name=data_type]').select('Boolean') + choose('data_option::default', option: 'true') + page.find('.js-submit').click + + td = page.find(:css, 'td', text: 'bool1') + tr = td.find(:xpath, './parent::tr') + + tr.click + + expect(page).to have_checked_field('data_option::default', with: 'true') + end + # https://github.com/zammad/zammad/issues/3647 context 'when setting Min/Max values for integer' do before do