Package org.zanata.page.administration

Examples of org.zanata.page.administration.ManageLanguagePage


        }
        return teamMemberPage.joinLanguageTeam();
    }

    public ManageLanguagePage addLanguage(String localeId) {
        ManageLanguagePage manageLanguagePage =
                goToHome().goToAdministration().goToManageLanguagePage();
        List<String> locales = manageLanguagePage.getLanguageLocales();
        if (locales.contains(localeId)) {
            log.warn("{} has already been added, enabling by default", localeId);
            return manageLanguagePage.enableLanguageByDefault(localeId);
        }
        // continue to add the new language
        return manageLanguagePage.addNewLanguage().enableLanguageByDefault()
                .inputLanguage(localeId).saveLanguage();
    }
View Full Code Here


            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 181709)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void addLanguageAsEnabled() throws Exception {
        String language = "Goa'uld";
        String languageDisplayName = "goa'uld[Goa'uld]";
        ManageLanguagePage manageLanguagePage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToHomePage()
                .goToAdministration()
                .goToManageLanguagePage();

        assertThat(manageLanguagePage.getLanguageLocales())
                .doesNotContain(language)
                .as("The language is not listed");

        manageLanguagePage = manageLanguagePage
                .addNewLanguage()
                .inputLanguage(language)
                .saveLanguage();

        assertThat(manageLanguagePage.getLanguageLocales())
                .contains(language)
                .as("The language is listed");

        assertThat(manageLanguagePage.languageIsEnabled(language))
                .isTrue()
                .as("The language is enabled by default");

        List<String> enabledLocaleList = manageLanguagePage
                .goToHomePage()
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsLanguagesTab()
View Full Code Here

            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 181709)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void addLanguageAsDisabled() throws Exception {
        String language = "Klingon";
        String languageDisplayName = "klingon[Klingon]";
        ManageLanguagePage manageLanguagePage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToHomePage()
                .goToAdministration()
                .goToManageLanguagePage();

        assertThat(manageLanguagePage.getLanguageLocales())
                .doesNotContain(language)
                .as("The language is not listed");

        manageLanguagePage = manageLanguagePage
                .addNewLanguage()
                .inputLanguage(language)
                .disableLanguageByDefault()
                .saveLanguage();

        assertThat(manageLanguagePage.getLanguageLocales())
                .contains(language)
                .as("The language is listed");
        assertThat(manageLanguagePage.languageIsEnabled(language))
                .isFalse()
                .as("The language is disabled by default");

        List<String> enabledLocaleList = manageLanguagePage.goToHomePage()
                .goToProjects()
                .goToProject("about fedora")
                .gotoSettingsTab()
                .gotoSettingsLanguagesTab()
                .waitForLocaleListVisible()
View Full Code Here

    @Feature(summary = "The administrator can add a known language to Zanata",
            tcmsTestPlanIds = 5316, tcmsTestCaseIds = 181709)
    @Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
    public void addKnownLanguage() throws Exception {
        String language = "ru-RU";
        ManageLanguagePage manageLanguagePage = new LoginWorkFlow()
                .signIn("admin", "admin")
                .goToHomePage()
                .goToAdministration()
                .goToManageLanguagePage();

        assertThat(manageLanguagePage.getLanguageLocales())
                .doesNotContain(language)
                .as("The language is not listed");

        AddLanguagePage addLanguagePage = manageLanguagePage
                .addNewLanguage()
                .inputLanguage("ru-RU");

        Map<String, String> languageInfo = addLanguagePage.getLanguageDetails();
View Full Code Here

TOP

Related Classes of org.zanata.page.administration.ManageLanguagePage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.