@world.absorb
def verify_setting_entry(setting, display_name, value, explicitly_set):
 label_element = setting.find_by_css('.setting-label')[0]
 assert_equal(display_name, label_element.html.strip())
 label_for = label_element['for']
 if (setting.has_class('metadata-list-enum') or setting.has_class('metadata-dict') or setting.has_class('metadata-video-translations')):
  list_value = ', '.join((ele.value for ele in setting.find_by_css('.list-settings-item')))
  assert_equal(value, list_value)
 elif setting.has_class('metadata-videolist-enum'):
  list_value = ', '.join((ele.find_by_css('input')[0].value for ele in setting.find_by_css('.videolist-settings-item')))
  assert_equal(value, list_value)
 else:
  assert_equal(value, setting.find_by_id(label_for).value)
 if (not setting.has_class('metadata-videolist-enum')):
  settingClearButton = setting.find_by_css('.setting-clear')[0]
  assert_equal(explicitly_set, settingClearButton.has_class('active'))
  assert_equal((not explicitly_set), settingClearButton.has_class('inactive'))

@ world . absorb def verify_setting_entry ( setting , display_name , value , explicitly_set ) : label_element = setting . find_by_css ( '.setting-label' ) [ 0 ] assert_equal ( display_name , label_element . html . strip ( ) ) label_for = label_element [ 'for' ] if ( setting . has_class ( 'metadata-list-enum' ) or setting . has_class ( 'metadata-dict' ) or setting . has_class ( 'metadata-video-translations' ) ) : list_value = ', ' . join ( ( ele . value for ele in setting . find_by_css ( '.list-settings-item' ) ) ) assert_equal ( value , list_value ) elif setting . has_class ( 'metadata-videolist-enum' ) : list_value = ', ' . join ( ( ele . find_by_css ( 'input' ) [ 0 ] . value for ele in setting . find_by_css ( '.videolist-settings-item' ) ) ) assert_equal ( value , list_value ) else : assert_equal ( value , setting . find_by_id ( label_for ) . value ) if ( not setting . has_class ( 'metadata-videolist-enum' ) ) : settingClearButton = setting . find_by_css ( '.setting-clear' ) [ 0 ] assert_equal ( explicitly_set , settingClearButton . has_class ( 'active' ) ) assert_equal ( ( not explicitly_set ) , settingClearButton . has_class ( 'inactive' ) )
verify the capa module fields are set as expected in the advanced settings editor .