'Scenario: Ensure that language selection is working fine.
First I go to the user dashboard page in studio. I can see \'English\' is selected by default.
Then I choose \'Dummy Language\' from drop down (at top of the page).
Then I visit the student account settings page and I can see the language has been updated to \'Dummy Language\'
in both drop downs.'

@flaky
def test_studio_language_change(self):

    dummy_language = u'Dummy    Language    (Esperanto)'
    self.dashboard_page.visit()
    language_selector = self.dashboard_page.language_selector
    self.assertEqual(get_selected_option_text(language_selector), u'English')
    select_option_by_text(language_selector, dummy_language)
    self.dashboard_page.wait_for_ajax()
    self.account_settings.visit()
    self.assertEqual(self.account_settings.value_for_dropdown_field('pref-lang'), dummy_language)
    self.assertEqual(get_selected_option_text(language_selector), u'Dummy    Language    (Esperanto)')
