'Test behaviour of a dropdown field.'

def _test_dropdown_field(self, field_id, title, initial_value, new_values, success_message=SUCCESS_MESSAGE, reloads_on_save=False):

    self.assertEqual(self.account_settings_page.title_for_field(field_id), title)
    self.assertEqual(self.account_settings_page.value_for_dropdown_field(field_id, focus_out=True), initial_value)
    for new_value in new_values:
        self.assertEqual(self.account_settings_page.value_for_dropdown_field(field_id, new_value, focus_out=True), new_value)
        self.account_settings_page.wait_for_ajax()
        if reloads_on_save:
            self.account_settings_page.wait_for_loading_indicator()
        else:
            self.browser.refresh()
            self.account_settings_page.wait_for_page()
        self.assertEqual(self.account_settings_page.value_for_dropdown_field(field_id, focus_out=True), new_value)
