'Test behaviour of `Language` field.
Given that I am a registered user.
And I visit my Profile page.
And I set the profile visibility to public and set default values for public fields.
Then I set language value to `Urdu`.
Then displayed language should be `Urdu` and language field mode should be `display`
And I reload the page.
Then displayed language should be `Urdu` and language field mode should be `display`
Then I set empty value for language.
Then displayed language should be `Add language` and language field mode should be `placeholder`
And I reload the page.
Then displayed language should be `Add language` and language field mode should be `placeholder`
And I make `language` field editable
Then `language` field mode should be `edit`
And `language` field icon should be visible.'

def test_language_field(self):

    (username, __) = self.log_in_as_unique_user()
    profile_page = self.visit_profile_page(username, privacy=self.PRIVACY_PUBLIC)
    self._test_dropdown_field(profile_page, 'language_proficiencies', 'Urdu', 'Urdu', 'display')
    self._test_dropdown_field(profile_page, 'language_proficiencies', '', 'Add    language', 'placeholder')
    profile_page.make_field_editable('language_proficiencies')
    self.assertTrue(profile_page.mode_for_field('language_proficiencies'), 'edit')
