@Feature(summary = "The administrator can edit the project languages",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void editProjectLanguages() throws Exception {
ProjectLanguagesTab projectLanguagesTab = new LoginWorkFlow()
.signIn("admin", "admin")
.goToProjects()
.goToProject("about fedora")
.gotoSettingsTab()
.gotoSettingsLanguagesTab()
.expectEnabledLocaleListCount(3);
List<String> enabledLocaleList = projectLanguagesTab
.getEnabledLocaleList();
assertThat(enabledLocaleList)
.contains("French[fr]", "Hindi[hi]", "Polish[pl]")
.as("The enabled list contains three languages");
assertThat(enabledLocaleList)
.doesNotContain("English (United States)[en-US]")
.as("The enabled list does not contain " +
"'English (United States)[en-US]'");
projectLanguagesTab = projectLanguagesTab
.gotoSettingsTab()
.gotoSettingsLanguagesTab()
.removeLocale("pl")
.expectEnabledLocaleListCount(2);
enabledLocaleList = projectLanguagesTab
.getEnabledLocaleList();
assertThat(enabledLocaleList)
.doesNotContain("English (United States)[en-US]")
.doesNotContain("Polish[pl]")
.as("The enabled list does not contain 'US English' or Polish");
enabledLocaleList = projectLanguagesTab
.gotoSettingsTab()
.gotoSettingsLanguagesTab()
.enterSearchLanguage("en-US")
.addLanguage("English (United States)[en-US]")
.expectEnabledLocaleListCount(3)